Class ClientboundLevelEventPacket
java.lang.Object
net.minecraft.network.protocol.game.ClientboundLevelEventPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intcan be a block/item id or other depending on the soundtypeprivate final booleanIf true the sound is played across the serverprivate final BlockPosstatic final StreamCodec<FriendlyByteBuf, ClientboundLevelEventPacket> private final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionClientboundLevelEventPacket(int type, BlockPos pos, int data, boolean globalEvent) private -
Method Summary
Modifier and TypeMethodDescriptionintgetData()getPos()intgetType()voidhandle(ClientGamePacketListener handler) Passes this Packet on to the NetHandler for processing.booleantype()private voidwrite(FriendlyByteBuf buffer) 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, waitMethods 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:
typein interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
isGlobalEvent
public boolean isGlobalEvent() -
getType
public int getType() -
getData
public int getData() -
getPos
-