Package forestry.api.fuels
Record Class RainSubstrate
java.lang.Object
java.lang.Record
forestry.api.fuels.RainSubstrate
- Record Components:
item- Rain substrate capable of activating the rainmaker.duration- Duration of the rain shower triggered by this substrate in Minecraft ticks.speed- Speed of activation sequence triggered.reverse- Whether the substrate stops rain instead of creating rain.
public record RainSubstrate(net.minecraft.world.item.ItemStack item, int duration, float speed, boolean reverse)
extends Record
todo data driven
-
Constructor Summary
ConstructorsConstructorDescriptionRainSubstrate(net.minecraft.world.item.ItemStack item, float speed) RainSubstrate(net.minecraft.world.item.ItemStack item, int duration, float speed) RainSubstrate(net.minecraft.world.item.ItemStack item, int duration, float speed, boolean reverse) Creates an instance of aRainSubstraterecord 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.net.minecraft.world.item.ItemStackitem()Returns the value of theitemrecord component.booleanreverse()Returns the value of thereverserecord component.floatspeed()Returns the value of thespeedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RainSubstrate
public RainSubstrate(net.minecraft.world.item.ItemStack item, float speed) -
RainSubstrate
public RainSubstrate(net.minecraft.world.item.ItemStack item, int duration, float speed) -
RainSubstrate
public RainSubstrate(net.minecraft.world.item.ItemStack item, int duration, float speed, boolean reverse) Creates an instance of aRainSubstraterecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
item
public net.minecraft.world.item.ItemStack item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
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
-