Class ClientboundLevelEventPacket
java.lang.Object
net.minecraft.network.protocol.game.ClientboundLevelEventPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
can be a block/item id or other depending on the soundtypeprivate final boolean
If true the sound is played across the serverprivate final BlockPos
static final StreamCodec
<FriendlyByteBuf, ClientboundLevelEventPacket> private final int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundLevelEventPacket
(int pType, BlockPos pPos, int pData, boolean pGlobalEvent) private
ClientboundLevelEventPacket
(FriendlyByteBuf p_178908_) -
Method Summary
Modifier and TypeMethodDescriptionint
getData()
getPos()
int
getType()
void
handle
(ClientGamePacketListener pHandler) Passes this Packet on to the NetHandler for processing.boolean
type()
private void
write
(FriendlyByteBuf p_132276_) Writes the raw packet data to the data stream.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
-
type
private final int type -
pos
-
data
private final int datacan be a block/item id or other depending on the soundtype -
globalEvent
private final boolean globalEventIf true the sound is played across the server
-
-
Constructor Details
-
ClientboundLevelEventPacket
-
ClientboundLevelEventPacket
-
-
Method Details
-
write
Writes the raw packet data to the data stream. -
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
isGlobalEvent
public boolean isGlobalEvent() -
getType
public int getType() -
getData
public int getData() -
getPos
-