Package de.mrjulsen.dragnsounds.net.stc
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 Summary
ConstructorDescriptionSoundDataPacket
(long soundId, int index, int bufferSize, boolean hasNext, byte[] data) -
Method Summary
Modifier and TypeMethodDescriptionint
decode
(net.minecraft.network.FriendlyByteBuf buf) void
encode
(SoundDataPacket packet, net.minecraft.network.FriendlyByteBuf buf) int
byte[]
getData()
int
getIndex()
long
void
handle
(SoundDataPacket packet, Supplier<dev.architectury.networking.NetworkManager.PacketContext> contextSupplier) boolean
-
Constructor Details
-
SoundDataPacket
public SoundDataPacket() -
SoundDataPacket
public SoundDataPacket(long soundId, int index, int bufferSize, boolean hasNext, byte[] data)
-
-
Method Details
-
encode
- Specified by:
encode
in interfacede.mrjulsen.mcdragonlib.net.IPacketBase<SoundDataPacket>
-
decode
- Specified by:
decode
in interfacede.mrjulsen.mcdragonlib.net.IPacketBase<SoundDataPacket>
-
handle
public void handle(SoundDataPacket packet, Supplier<dev.architectury.networking.NetworkManager.PacketContext> contextSupplier) - Specified by:
handle
in interfacede.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
- Specified by:
compareTo
in interfaceComparable<SoundDataPacket>
-