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 SoundCategory
category
private int
fixedX
private int
fixedY
private int
fixedZ
private Identifier
id
private float
pitch
private float
volume
-
Constructor Summary
Constructors Constructor Description PlaySoundIdS2CPacket()
PlaySoundIdS2CPacket(Identifier sound, SoundCategory category, Vec3d pos, float volume, float pitch)
-
Method Summary
Modifier and Type Method Description void
apply(ClientPlayPacketListener clientPlayPacketListener)
SoundCategory
getCategory()
float
getPitch()
Identifier
getSoundId()
float
getVolume()
double
getX()
double
getY()
double
getZ()
void
read(PacketByteBuf buf)
void
write(PacketByteBuf buf)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
read
in interfacePacket<ClientPlayPacketListener>
- Throws:
IOException
-
write
- Specified by:
write
in 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:
apply
in interfacePacket<ClientPlayPacketListener>
-