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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceKey<Level>
The field for thedimension
record component.static final ResourceLocation
private final BoundingBox
The field for themainBB
record component.private final List<StructuresDebugPayload.PieceInfo>
The field for thepieces
record component. -
Constructor Summary
ConstructorDescriptionStructuresDebugPayload
(FriendlyByteBuf p_294983_) StructuresDebugPayload
(ResourceKey<Level> dimension, BoundingBox mainBB, List<StructuresDebugPayload.PieceInfo> pieces) Creates an instance of aStructuresDebugPayload
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedimension
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
mainBB()
Returns the value of themainBB
record component.pieces()
Returns the value of thepieces
record component.(package private) static BoundingBox
readBoundingBox
(FriendlyByteBuf p_294387_) final String
toString()
Returns a string representation of this record class.void
write
(FriendlyByteBuf p_295318_) (package private) static void
writeBoundingBox
(FriendlyByteBuf p_296195_, BoundingBox p_294095_)
-
Field Details
-
dimension
The field for thedimension
record component. -
mainBB
The field for themainBB
record component. -
pieces
The field for thepieces
record component. -
ID
-
-
Constructor Details
-
StructuresDebugPayload
-
StructuresDebugPayload
public StructuresDebugPayload(ResourceKey<Level> dimension, BoundingBox mainBB, List<StructuresDebugPayload.PieceInfo> pieces) Creates an instance of aStructuresDebugPayload
record class.- Parameters:
dimension
- the value for thedimension
record componentmainBB
- the value for themainBB
record componentpieces
- the value for thepieces
record component
-
-
Method Details
-
write
- Specified by:
write
in interfaceCustomPacketPayload
-
id
- Specified by:
id
in 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 thedimension
record component.- Returns:
- the value of the
dimension
record component
-
mainBB
Returns the value of themainBB
record component.- Returns:
- the value of the
mainBB
record component
-
pieces
Returns the value of thepieces
record component.- Returns:
- the value of the
pieces
record component
-