Class PlaySoundFromEntityS2CPacket
java.lang.Object
net.minecraft.network.packet.s2c.play.PlaySoundFromEntityS2CPacket
- All Implemented Interfaces:
Packet<ClientPlayPacketListener>
public class PlaySoundFromEntityS2CPacket extends Object implements Packet<ClientPlayPacketListener>
-
Field Summary
Fields Modifier and Type Field Description private SoundCategorycategoryprivate intentityIdprivate floatpitchprivate SoundEventsoundprivate floatvolume -
Constructor Summary
Constructors Constructor Description PlaySoundFromEntityS2CPacket()PlaySoundFromEntityS2CPacket(SoundEvent sound, SoundCategory category, Entity entity, float volume, float pitch) -
Method Summary
Modifier and Type Method Description voidapply(ClientPlayPacketListener clientPlayPacketListener)SoundCategorygetCategory()intgetEntityId()floatgetPitch()SoundEventgetSound()floatgetVolume()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
-
entityId
private int entityId -
volume
private float volume -
pitch
private float pitch
-
-
Constructor Details
-
PlaySoundFromEntityS2CPacket
public PlaySoundFromEntityS2CPacket() -
PlaySoundFromEntityS2CPacket
public PlaySoundFromEntityS2CPacket(SoundEvent sound, SoundCategory category, Entity entity, float volume, float pitch)
-
-
Method Details
-
read
- Specified by:
readin interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
write
- Specified by:
writein interfacePacket<ClientPlayPacketListener>- Throws:
IOException
-
getSound
-
getCategory
-
getEntityId
@Environment(CLIENT) public int getEntityId() -
getVolume
@Environment(CLIENT) public float getVolume() -
getPitch
@Environment(CLIENT) public float getPitch() -
apply
- Specified by:
applyin interfacePacket<ClientPlayPacketListener>
-