Record Class StructuresDebugPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.StructuresDebugPayload
- All Implemented Interfaces:
CustomPacketPayload
public record StructuresDebugPayload(ResourceKey<Level> dimension, BoundingBox mainBB, List<StructuresDebugPayload.PieceInfo> pieces)
extends Record
implements CustomPacketPayload
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceKey<Level>The field for thedimensionrecord component.static final ResourceLocationprivate final BoundingBoxThe field for themainBBrecord component.private final List<StructuresDebugPayload.PieceInfo>The field for thepiecesrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionStructuresDebugPayload(FriendlyByteBuf p_301247_) StructuresDebugPayload(ResourceKey<Level> dimension, BoundingBox mainBB, List<StructuresDebugPayload.PieceInfo> pieces) Creates an instance of aStructuresDebugPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()mainBB()Returns the value of themainBBrecord component.pieces()Returns the value of thepiecesrecord component.(package private) static BoundingBoxreadBoundingBox(FriendlyByteBuf p_297781_) final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_300362_) (package private) static voidwriteBoundingBox(FriendlyByteBuf p_300963_, BoundingBox p_297295_)
-
Field Details
-
dimension
The field for thedimensionrecord component. -
mainBB
The field for themainBBrecord component. -
pieces
The field for thepiecesrecord component. -
ID
-
-
Constructor Details
-
StructuresDebugPayload
-
StructuresDebugPayload
public StructuresDebugPayload(ResourceKey<Level> dimension, BoundingBox mainBB, List<StructuresDebugPayload.PieceInfo> pieces) Creates an instance of aStructuresDebugPayloadrecord class.- Parameters:
dimension- the value for thedimensionrecord componentmainBB- the value for themainBBrecord componentpieces- the value for thepiecesrecord component
-
-
Method Details
-
write
- Specified by:
writein interfaceCustomPacketPayload
-
id
- Specified by:
idin interfaceCustomPacketPayload
-
readBoundingBox
-
writeBoundingBox
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
dimension
Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
mainBB
Returns the value of themainBBrecord component.- Returns:
- the value of the
mainBBrecord component
-
pieces
Returns the value of thepiecesrecord component.- Returns:
- the value of the
piecesrecord component
-