Record Class ClientboundLevelChunkPacketData.BlockEntityInfo
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData.BlockEntityInfo
- Enclosing class:
ClientboundLevelChunkPacketData
private static record ClientboundLevelChunkPacketData.BlockEntityInfo(byte packedXZ, short y, BlockEntityType<?> type, Optional<CompoundTag> tag)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byteThe field for thepackedXZrecord component.private final Optional<CompoundTag> The field for thetagrecord component.private final BlockEntityType<?> The field for thetyperecord component.private final shortThe field for theyrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBlockEntityInfo(byte packedXZ, short y, BlockEntityType<?> type, Optional<CompoundTag> tag) Creates an instance of aBlockEntityInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionprivate static ClientboundLevelChunkPacketData.BlockEntityInfocreate(BlockEntity blockEntity) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.bytepackedXZ()Returns the value of thepackedXZrecord component.tag()Returns the value of thetagrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.shorty()Returns the value of theyrecord component.
-
Field Details
-
packedXZ
private final byte packedXZThe field for thepackedXZrecord component. -
y
private final short yThe field for theyrecord component. -
type
The field for thetyperecord component. -
tag
The field for thetagrecord component. -
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, ClientboundLevelChunkPacketData.BlockEntityInfo> STREAM_CODEC
-
-
Constructor Details
-
BlockEntityInfo
Creates an instance of aBlockEntityInforecord class.- Parameters:
packedXZ- the value for thepackedXZrecord componenty- the value for theyrecord componenttype- the value for thetyperecord componenttag- the value for thetagrecord component
-
-
Method Details
-
create
-
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. -
packedXZ
public byte packedXZ()Returns the value of thepackedXZrecord component.- Returns:
- the value of the
packedXZrecord component
-
y
public short y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-