Class SoundDataPacket

java.lang.Object
de.mrjulsen.dragnsounds.net.stc.SoundDataPacket
All Implemented Interfaces:
de.mrjulsen.mcdragonlib.net.IPacketBase<SoundDataPacket>, Comparable<SoundDataPacket>

public class SoundDataPacket extends Object implements de.mrjulsen.mcdragonlib.net.IPacketBase<SoundDataPacket>, Comparable<SoundDataPacket>
  • Constructor Details

    • SoundDataPacket

      public SoundDataPacket()
    • SoundDataPacket

      public SoundDataPacket(long soundId, int index, int bufferSize, boolean hasNext, byte[] data)
  • Method Details

    • encode

      public void encode(SoundDataPacket packet, net.minecraft.network.FriendlyByteBuf buf)
      Specified by:
      encode in interface de.mrjulsen.mcdragonlib.net.IPacketBase<SoundDataPacket>
    • decode

      public SoundDataPacket decode(net.minecraft.network.FriendlyByteBuf buf)
      Specified by:
      decode in interface de.mrjulsen.mcdragonlib.net.IPacketBase<SoundDataPacket>
    • handle

      public void handle(SoundDataPacket packet, Supplier<dev.architectury.networking.NetworkManager.PacketContext> contextSupplier)
      Specified by:
      handle in interface de.mrjulsen.mcdragonlib.net.IPacketBase<SoundDataPacket>
    • getSoundId

      public long getSoundId()
    • getIndex

      public int getIndex()
    • getBufferSize

      public int getBufferSize()
    • isHasNext

      public boolean isHasNext()
    • getData

      public byte[] getData()
    • compareTo

      public int compareTo(SoundDataPacket o)
      Specified by:
      compareTo in interface Comparable<SoundDataPacket>