Package forestry.api.core.machines.fuels
Record Class RainmakerSubstrate
java.lang.Object
java.lang.Record
forestry.api.core.machines.fuels.RainmakerSubstrate
- Record Components:
duration- Duration of the rain shower triggered by this substrate in ticks. Must be 0 when reversespeed- Speed of the activation sequence triggeredreverse- Whether the substrate stops rain instead of creating rain
Data map value for items usable as a substrate by the Rainmaker.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRainmakerSubstrate(int duration, float speed, boolean reverse) Creates an instance of aRainmakerSubstraterecord class. -
Method Summary
Modifier and TypeMethodDescriptionintduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanreverse()Returns the value of thereverserecord component.floatspeed()Returns the value of thespeedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
RainmakerSubstrate
public RainmakerSubstrate(int duration, float speed, boolean reverse) Creates an instance of aRainmakerSubstraterecord class.
-
-
Method Details
-
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 '=='. -
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
speed
public float speed()Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
reverse
public boolean reverse()Returns the value of thereverserecord component.- Returns:
- the value of the
reverserecord component
-