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/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
CustomPacketPayload.FallbackProvider<B extends FriendlyByteBuf>, CustomPacketPayload.Type<T extends CustomPacketPayload>, CustomPacketPayload.TypeAndCodec<B extends FriendlyByteBuf,
T extends CustomPacketPayload> -
Field Summary
Modifier and TypeFieldDescriptionprivate final ResourceKey
<Level> The field for thedimension
record component.private final BoundingBox
The field for themainBB
record component.private final List
<StructuresDebugPayload.PieceInfo> The field for thepieces
record component.static final StreamCodec
<FriendlyByteBuf, StructuresDebugPayload> static final CustomPacketPayload.Type
<StructuresDebugPayload> -
Constructor Summary
ModifierConstructorDescriptionprivate
StructuresDebugPayload
(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.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.type()
private 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. -
STREAM_CODEC
-
TYPE
-
-
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
-
type
- Specified by:
type
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
-