Record Class MultiblockLayer
java.lang.Object
java.lang.Record
com.portingdeadmods.portingdeadlibs.api.multiblocks.MultiblockLayer
-
Constructor Summary
ConstructorsConstructorDescriptionMultiblockLayer(boolean dynamic, IntRange range, int[] layer) MultiblockLayer(boolean dynamic, IntRange range, int[] layer, it.unimi.dsi.fastutil.ints.IntIntPair widths) Creates an instance of aMultiblockLayerrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandynamic()Returns the value of thedynamicrecord component.final booleanIndicates whether some other object is "equal to" this one.it.unimi.dsi.fastutil.ints.IntIntPairfinal inthashCode()Returns a hash code value for this object.int[]layer()Returns the value of thelayerrecord component.static MultiblockLayerload(net.minecraft.nbt.CompoundTag tag) range()Returns the value of therangerecord component.net.minecraft.nbt.CompoundTagsave()setDynamic(IntRange size) setWidths(int xWidth, int zWidth) final StringtoString()Returns a string representation of this record class.it.unimi.dsi.fastutil.ints.IntIntPairwidths()Returns the value of thewidthsrecord component.
-
Constructor Details
-
MultiblockLayer
-
MultiblockLayer
public MultiblockLayer(boolean dynamic, IntRange range, int[] layer, it.unimi.dsi.fastutil.ints.IntIntPair widths) Creates an instance of aMultiblockLayerrecord class.- Parameters:
dynamic- the value for thedynamicrecord componentrange- the value for therangerecord componentlayer- the value for thelayerrecord componentwidths- the value for thewidthsrecord component
-
-
Method Details
-
setDynamic
-
setWidths
-
load
-
save
public net.minecraft.nbt.CompoundTag save() -
getWidths
public it.unimi.dsi.fastutil.ints.IntIntPair getWidths() -
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 '=='. -
dynamic
public boolean dynamic()Returns the value of thedynamicrecord component.- Returns:
- the value of the
dynamicrecord component
-
range
Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
layer
public int[] layer()Returns the value of thelayerrecord component.- Returns:
- the value of the
layerrecord component
-
widths
public it.unimi.dsi.fastutil.ints.IntIntPair widths()Returns the value of thewidthsrecord component.- Returns:
- the value of the
widthsrecord component
-