Record Class MultiblockData
java.lang.Object
java.lang.Record
com.portingdeadmods.portingdeadlibs.api.multiblocks.MultiblockData
public record MultiblockData(boolean valid, HorizontalDirection direction, MultiblockLayer[] layers)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultiblockData(boolean valid, HorizontalDirection direction, MultiblockLayer[] layers) Creates an instance of aMultiblockDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MultiblockDatadeserializeNBT(net.minecraft.nbt.CompoundTag nbt) Returns the value of thedirectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.layers()Returns the value of thelayersrecord component.net.minecraft.nbt.CompoundTagfinal StringtoString()Returns a string representation of this record class.booleanvalid()Returns the value of thevalidrecord component.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
MultiblockData
Creates an instance of aMultiblockDatarecord class.- Parameters:
valid- the value for thevalidrecord componentdirection- the value for thedirectionrecord componentlayers- the value for thelayersrecord component
-
-
Method Details
-
serializeNBT
public net.minecraft.nbt.CompoundTag serializeNBT() -
deserializeNBT
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
valid
public boolean valid()Returns the value of thevalidrecord component.- Returns:
- the value of the
validrecord component
-
direction
Returns the value of thedirectionrecord component.- Returns:
- the value of the
directionrecord component
-
layers
Returns the value of thelayersrecord component.- Returns:
- the value of the
layersrecord component
-