Class PlaySoundIdS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.PlaySoundIdS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class PlaySoundIdS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description private SoundCategorycategoryprivate intfixedXprivate intfixedYprivate intfixedZprivate Identifieridprivate floatpitchprivate floatvolume -
Constructor Summary
Constructors Constructor Description PlaySoundIdS2CPacket()PlaySoundIdS2CPacket(Identifier sound, SoundCategory category, Vec3d pos, float volume, float pitch) -
Method Summary
Modifier and Type Method Description voidapply(ClientPlayPacketListener clientPlayPacketListener)SoundCategorygetCategory()floatgetPitch()IdentifiergetSoundId()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
-
id
-
category
-
fixedX
private int fixedX -
fixedY
private int fixedY -
fixedZ
private int fixedZ -
volume
private float volume -
pitch
private float pitch
-
-
Constructor Details
-
PlaySoundIdS2CPacket
public PlaySoundIdS2CPacket() -
PlaySoundIdS2CPacket
public PlaySoundIdS2CPacket(Identifier sound, SoundCategory category, Vec3d pos, float volume, float pitch)
-
-
Method Details
-
read
- Specified by:
readin interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
getSoundId
-
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>
-