public class PlaySoundFromEntityS2CPacket extends Object implements Packet<ClientPlayPacketListener>
Modifier and Type | Field and Description |
---|---|
private SoundCategory |
category |
private int |
entityId |
private float |
pitch |
private SoundEvent |
sound |
private float |
volume |
Constructor and Description |
---|
PlaySoundFromEntityS2CPacket() |
PlaySoundFromEntityS2CPacket(SoundEvent sound,
SoundCategory category,
Entity entity,
float volume,
float pitch) |
Modifier and Type | Method and Description |
---|---|
void |
apply(ClientPlayPacketListener clientPlayPacketListener) |
SoundCategory |
getCategory() |
int |
getEntityId() |
float |
getPitch() |
SoundEvent |
getSound() |
float |
getVolume() |
void |
read(PacketByteBuf buf) |
void |
write(PacketByteBuf buf) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isWritingErrorSkippable
private SoundEvent sound
private SoundCategory category
private int entityId
private float volume
private float pitch
public PlaySoundFromEntityS2CPacket()
public PlaySoundFromEntityS2CPacket(SoundEvent sound, SoundCategory category, Entity entity, float volume, float pitch)
public void read(PacketByteBuf buf) throws IOException
read
in interface Packet<ClientPlayPacketListener>
IOException
public void write(PacketByteBuf buf) throws IOException
write
in interface Packet<ClientPlayPacketListener>
IOException
@Environment(value=CLIENT) public SoundEvent getSound()
@Environment(value=CLIENT) public SoundCategory getCategory()
@Environment(value=CLIENT) public int getEntityId()
@Environment(value=CLIENT) public float getVolume()
@Environment(value=CLIENT) public float getPitch()
public void apply(ClientPlayPacketListener clientPlayPacketListener)
apply
in interface Packet<ClientPlayPacketListener>