Class ClientboundSoundEntityPacket
java.lang.Object
net.minecraft.network.protocol.game.ClientboundSoundEntityPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public class ClientboundSoundEntityPacket
extends Object
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final float
private final long
private final Holder
<SoundEvent> private final SoundSource
static final StreamCodec
<RegistryFriendlyByteBuf, ClientboundSoundEntityPacket> private final float
-
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundSoundEntityPacket
(Holder<SoundEvent> pSound, SoundSource pSource, Entity pEntity, float pVolume, float pPitch, long pSeed) private
-
Method Summary
Modifier and TypeMethodDescriptionint
getId()
float
getPitch()
long
getSeed()
getSound()
float
void
handle
(ClientGamePacketListener pHandler) Passes this Packet on to the NetHandler for processing.type()
private void
write
(RegistryFriendlyByteBuf pBuffer) 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.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
-
sound
-
source
-
id
private final int id -
volume
private final float volume -
pitch
private final float pitch -
seed
private final long seed
-
-
Constructor Details
-
ClientboundSoundEntityPacket
public ClientboundSoundEntityPacket(Holder<SoundEvent> pSound, SoundSource pSource, Entity pEntity, float pVolume, float pPitch, long pSeed) -
ClientboundSoundEntityPacket
-
-
Method Details
-
write
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
getSound
-
getSource
-
getId
public int getId() -
getVolume
public float getVolume() -
getPitch
public float getPitch() -
getSeed
public long getSeed()
-