Record Class ClientboundLightUpdatePacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundLightUpdatePacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundLightUpdatePacket(int x, int z, ClientboundLightUpdatePacketData lightData)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientboundLightUpdatePacketDataThe field for thelightDatarecord component.static final StreamCodec<io.netty.buffer.ByteBuf, ClientboundLightUpdatePacket> private final intThe field for thexrecord component.private final intThe field for thezrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClientboundLightUpdatePacket(int x, int z, ClientboundLightUpdatePacketData lightData) Creates an instance of aClientboundLightUpdatePacketrecord class.ClientboundLightUpdatePacket(ChunkPos pos, LevelLightEngine lightEngine, @Nullable BitSet skyChangedLightSectionFilter, @Nullable BitSet blockChangedLightSectionFilter) -
Method Summary
Modifier and TypeMethodDescriptionfinal 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. -
lightData
The field for thelightDatarecord component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundLightUpdatePacket
-
ClientboundLightUpdatePacket
Creates an instance of aClientboundLightUpdatePacketrecord class.- Parameters:
x- the value for thexrecord componentz- the value for thezrecord 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
-
lightData
Returns the value of thelightDatarecord component.- Returns:
- the value of the
lightDatarecord component
-