Record Class PartConfigSnapshot.PartSettings
java.lang.Object
java.lang.Record
org.cyclops.integrateddynamics.core.part.PartConfigSnapshot.PartSettings
- Record Components:
updateInterval- The tick interval at which the part updates.priority- The priority of the part in its network.channel- The channel of the part in its network.targetSide- The overridden side of the target block, if any.targetOffset- The target position offset.maxOffset- The maximum offset that offset enhancements raised the part to.
- Enclosing class:
PartConfigSnapshot
public static record PartConfigSnapshot.PartSettings(Optional<Integer> updateInterval, Optional<Integer> priority, Optional<Integer> channel, Optional<net.minecraft.core.Direction> targetSide, Optional<net.minecraft.core.Vec3i> targetOffset, Optional<Integer> maxOffset)
extends Record
The general settings of a part.
-
Constructor Summary
ConstructorsConstructorDescriptionPartSettings(Optional<Integer> updateInterval, Optional<Integer> priority, Optional<Integer> channel, Optional<net.minecraft.core.Direction> targetSide, Optional<net.minecraft.core.Vec3i> targetOffset, Optional<Integer> maxOffset) Creates an instance of aPartSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisEmpty()Returns the value of themaxOffsetrecord component.priority()Returns the value of thepriorityrecord component.Optional<net.minecraft.core.Vec3i> Returns the value of thetargetOffsetrecord component.Optional<net.minecraft.core.Direction> Returns the value of thetargetSiderecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdateIntervalrecord component.
-
Constructor Details
-
PartSettings
public PartSettings(Optional<Integer> updateInterval, Optional<Integer> priority, Optional<Integer> channel, Optional<net.minecraft.core.Direction> targetSide, Optional<net.minecraft.core.Vec3i> targetOffset, Optional<Integer> maxOffset) Creates an instance of aPartSettingsrecord class.- Parameters:
updateInterval- the value for theupdateIntervalrecord componentpriority- the value for thepriorityrecord componentchannel- the value for thechannelrecord componenttargetSide- the value for thetargetSiderecord componenttargetOffset- the value for thetargetOffsetrecord componentmaxOffset- the value for themaxOffsetrecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty()- Returns:
- If no setting at all is stored.
-
toString
-
hashCode
-
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). -
updateInterval
Returns the value of theupdateIntervalrecord component.- Returns:
- the value of the
updateIntervalrecord component
-
priority
-
channel
-
targetSide
Returns the value of thetargetSiderecord component.- Returns:
- the value of the
targetSiderecord component
-
targetOffset
Returns the value of thetargetOffsetrecord component.- Returns:
- the value of the
targetOffsetrecord component
-
maxOffset
-