Record Class ColossalCogwheelBlock.Connection
java.lang.Object
java.lang.Record
com.petrolpark.petrolsparts.content.colossal_cogwheel.ColossalCogwheelBlock.Connection
- Enclosing class:
ColossalCogwheelBlock
public static record ColossalCogwheelBlock.Connection(boolean toLargeCog, float ratio)
extends Record
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConnection(boolean toLargeCog, float ratio) Creates an instance of aConnectionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static Set<net.createmod.catnip.data.Pair<net.minecraft.core.BlockPos, ColossalCogwheelBlock.Connection>> getAll(net.minecraft.core.BlockPos centerPos, net.minecraft.core.Direction.Axis axis) final inthashCode()Returns a hash code value for this object.floatratio()Returns the value of theratiorecord component.booleanReturns the value of thetoLargeCogrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Connection
public Connection(boolean toLargeCog, float ratio) Creates an instance of aConnectionrecord class.- Parameters:
toLargeCog- the value for thetoLargeCogrecord componentratio- the value for theratiorecord component
-
-
Method Details
-
getAll
public static Set<net.createmod.catnip.data.Pair<net.minecraft.core.BlockPos,ColossalCogwheelBlock.Connection>> getAll(net.minecraft.core.BlockPos centerPos, net.minecraft.core.Direction.Axis axis) -
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 '=='. -
toLargeCog
public boolean toLargeCog()Returns the value of thetoLargeCogrecord component.- Returns:
- the value of the
toLargeCogrecord component
-
ratio
public float ratio()Returns the value of theratiorecord component.- Returns:
- the value of the
ratiorecord component
-