Class PlaySoundS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class PlaySoundS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description private SoundCategorycategoryprivate intfixedXprivate intfixedYprivate intfixedZprivate floatpitchprivate SoundEventsoundprivate floatvolume -
Constructor Summary
Constructors Constructor Description PlaySoundS2CPacket()PlaySoundS2CPacket(SoundEvent sound, SoundCategory category, double x, double y, double z, float volume, float pitch) -
Method Summary
Modifier and Type Method Description voidapply(ClientPlayPacketListener clientPlayPacketListener)SoundCategorygetCategory()floatgetPitch()SoundEventgetSound()floatgetVolume()doublegetX()doublegetY()doublegetZ()voidread(PacketByteBuf buf)voidwrite(PacketByteBuf buf)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.network.Packet
isWritingErrorSkippable
-
Field Details
-
sound
-
category
-
fixedX
private int fixedX -
fixedY
private int fixedY -
fixedZ
private int fixedZ -
volume
private float volume -
pitch
private float pitch
-
-
Constructor Details
-
PlaySoundS2CPacket
public PlaySoundS2CPacket() -
PlaySoundS2CPacket
public PlaySoundS2CPacket(SoundEvent sound, SoundCategory category, double x, double y, double z, float volume, float pitch)
-
-
Method Details
-
read
- Specified by:
readin interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
getSound
-
getCategory
-
getX
@Environment(CLIENT) public double getX() -
getY
@Environment(CLIENT) public double getY() -
getZ
@Environment(CLIENT) public double getZ() -
getVolume
@Environment(CLIENT) public float getVolume() -
getPitch
@Environment(CLIENT) public float getPitch() -
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>
-