Record Class ClientboundLevelChunkWithLightPacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundLevelChunkWithLightPacket(int x, int z, ClientboundLevelChunkPacketData chunkData, ClientboundLightUpdatePacketData lightData)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientboundLevelChunkPacketDataThe field for thechunkDatarecord component.private final ClientboundLightUpdatePacketDataThe field for thelightDatarecord component.private final intThe field for thexrecord component.private final intThe field for thezrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundLevelChunkWithLightPacket(int x, int z, ClientboundLevelChunkPacketData chunkData, ClientboundLightUpdatePacketData lightData) Creates an instance of aClientboundLevelChunkWithLightPacketrecord class.ClientboundLevelChunkWithLightPacket(LevelChunk levelChunk, LevelLightEngine lightEngine, @Nullable BitSet skyChangedLightSectionFilter, @Nullable BitSet blockChangedLightSectionFilter) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechunkDatarecord component.final booleanIndicates whether some other object is "equal to" this one.voidhandle(ClientGamePacketListener listener) final inthashCode()Returns a hash code value for this object.Returns the value of thelightDatarecord component.final StringtoString()Returns a string representation of this record class.type()intx()Returns the value of thexrecord component.intz()Returns the value of thezrecord component.Methods inherited from interface Packet
isSkippable, isTerminal
-
Field Details
-
x
private final int xThe field for thexrecord component. -
z
private final int zThe field for thezrecord component. -
chunkData
The field for thechunkDatarecord component. -
lightData
The field for thelightDatarecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, ClientboundLevelChunkWithLightPacket> STREAM_CODEC
-
-
Constructor Details
-
ClientboundLevelChunkWithLightPacket
public ClientboundLevelChunkWithLightPacket(LevelChunk levelChunk, LevelLightEngine lightEngine, @Nullable BitSet skyChangedLightSectionFilter, @Nullable BitSet blockChangedLightSectionFilter) -
ClientboundLevelChunkWithLightPacket
public ClientboundLevelChunkWithLightPacket(int x, int z, ClientboundLevelChunkPacketData chunkData, ClientboundLightUpdatePacketData lightData) Creates an instance of aClientboundLevelChunkWithLightPacketrecord class.- Parameters:
x- the value for thexrecord componentz- the value for thezrecord componentchunkData- the value for thechunkDatarecord componentlightData- the value for thelightDatarecord component
-
-
Method Details
-
type
- Specified by:
typein interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ClientGamePacketListener>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
x
public int x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
z
public int z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-
chunkData
Returns the value of thechunkDatarecord component.- Returns:
- the value of the
chunkDatarecord component
-
lightData
Returns the value of thelightDatarecord component.- Returns:
- the value of the
lightDatarecord component
-