Record Class CableConnections
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.common.networking.CableConnections
public record CableConnections(boolean north, boolean east, boolean south, boolean west, boolean up, boolean down)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCableConnections(boolean north, boolean east, boolean south, boolean west, boolean up, boolean down) Creates an instance of aCableConnectionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleandown()Returns the value of thedownrecord component.booleaneast()Returns the value of theeastrecord component.final booleanIndicates whether some other object is "equal to" this one.static CableConnectionsfromTag(net.minecraft.nbt.CompoundTag tag) final inthashCode()Returns a hash code value for this object.booleannorth()Returns the value of thenorthrecord component.booleansouth()Returns the value of thesouthrecord component.static voidstripTag(net.minecraft.nbt.CompoundTag tag) final StringtoString()Returns a string representation of this record class.booleanup()Returns the value of theuprecord component.booleanwest()Returns the value of thewestrecord component.net.minecraft.nbt.CompoundTagwriteToTag(net.minecraft.nbt.CompoundTag tag)
-
Field Details
-
NONE
-
-
Constructor Details
-
CableConnections
public CableConnections(boolean north, boolean east, boolean south, boolean west, boolean up, boolean down) Creates an instance of aCableConnectionsrecord class.- Parameters:
north- the value for thenorthrecord componenteast- the value for theeastrecord componentsouth- the value for thesouthrecord componentwest- the value for thewestrecord componentup- the value for theuprecord componentdown- the value for thedownrecord component
-
-
Method Details
-
fromTag
-
writeToTag
public net.minecraft.nbt.CompoundTag writeToTag(net.minecraft.nbt.CompoundTag tag) -
stripTag
public static void stripTag(net.minecraft.nbt.CompoundTag tag) -
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 with '=='. -
north
public boolean north()Returns the value of thenorthrecord component.- Returns:
- the value of the
northrecord component
-
east
public boolean east()Returns the value of theeastrecord component.- Returns:
- the value of the
eastrecord component
-
south
public boolean south()Returns the value of thesouthrecord component.- Returns:
- the value of the
southrecord component
-
west
public boolean west()Returns the value of thewestrecord component.- Returns:
- the value of the
westrecord component
-
up
public boolean up()Returns the value of theuprecord component.- Returns:
- the value of the
uprecord component
-
down
public boolean down()Returns the value of thedownrecord component.- Returns:
- the value of the
downrecord component
-