public class PlaySoundS2CPacket extends Object implements Packet<ClientPlayPacketListener>
Modifier and Type | Field and Description |
---|---|
private SoundCategory |
category |
private int |
fixedX |
private int |
fixedY |
private int |
fixedZ |
private float |
pitch |
private SoundEvent |
sound |
private float |
volume |
Constructor and Description |
---|
PlaySoundS2CPacket() |
PlaySoundS2CPacket(SoundEvent sound,
SoundCategory category,
double x,
double y,
double z,
float volume,
float pitch) |
Modifier and Type | Method and Description |
---|---|
void |
apply(ClientPlayPacketListener clientPlayPacketListener) |
SoundCategory |
getCategory() |
float |
getPitch() |
SoundEvent |
getSound() |
float |
getVolume() |
double |
getX() |
double |
getY() |
double |
getZ() |
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 fixedX
private int fixedY
private int fixedZ
private float volume
private float pitch
public PlaySoundS2CPacket()
public PlaySoundS2CPacket(SoundEvent sound, SoundCategory category, double x, double y, double z, 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 double getX()
@Environment(value=CLIENT) public double getY()
@Environment(value=CLIENT) public double getZ()
@Environment(value=CLIENT) public float getVolume()
@Environment(value=CLIENT) public float getPitch()
public void apply(ClientPlayPacketListener clientPlayPacketListener)
apply
in interface Packet<ClientPlayPacketListener>