Record Class WateringSettings
java.lang.Object
java.lang.Record
io.github.pylonmc.pylon.content.tools.WateringSettings
public record WateringSettings(int horizontalRange, int verticalRange, double cropChance, double sugarCaneChance, double cactusChance, double saplingChance, int cropTicks, int sugarCaneTicks, int cactusTicks, int saplingTicks, double particleChance, @NotNull io.github.pylonmc.rebar.util.RandomizedSound sound)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionWateringSettings(int horizontalRange, int verticalRange, double cropChance, double sugarCaneChance, double cactusChance, double saplingChance, int cropTicks, int sugarCaneTicks, int cactusTicks, int saplingTicks, double particleChance, @NotNull io.github.pylonmc.rebar.util.RandomizedSound sound) Creates an instance of aWateringSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecactusChancerecord component.intReturns the value of thecactusTicksrecord component.doubleReturns the value of thecropChancerecord component.intReturns the value of thecropTicksrecord component.final booleanIndicates whether some other object is "equal to" this one.static WateringSettingsfromConfig(io.github.pylonmc.rebar.config.ConfigSection config) final inthashCode()Returns a hash code value for this object.intReturns the value of thehorizontalRangerecord component.doubleReturns the value of theparticleChancerecord component.doubleReturns the value of thesaplingChancerecord component.intReturns the value of thesaplingTicksrecord component.@NotNull io.github.pylonmc.rebar.util.RandomizedSoundsound()Returns the value of thesoundrecord component.doubleReturns the value of thesugarCaneChancerecord component.intReturns the value of thesugarCaneTicksrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theverticalRangerecord component.
-
Constructor Details
-
WateringSettings
public WateringSettings(int horizontalRange, int verticalRange, double cropChance, double sugarCaneChance, double cactusChance, double saplingChance, int cropTicks, int sugarCaneTicks, int cactusTicks, int saplingTicks, double particleChance, @NotNull @NotNull io.github.pylonmc.rebar.util.RandomizedSound sound) Creates an instance of aWateringSettingsrecord class.- Parameters:
horizontalRange- the value for thehorizontalRangerecord componentverticalRange- the value for theverticalRangerecord componentcropChance- the value for thecropChancerecord componentsugarCaneChance- the value for thesugarCaneChancerecord componentcactusChance- the value for thecactusChancerecord componentsaplingChance- the value for thesaplingChancerecord componentcropTicks- the value for thecropTicksrecord componentsugarCaneTicks- the value for thesugarCaneTicksrecord componentcactusTicks- the value for thecactusTicksrecord componentsaplingTicks- the value for thesaplingTicksrecord componentparticleChance- the value for theparticleChancerecord componentsound- the value for thesoundrecord component
-
-
Method Details
-
fromConfig
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
horizontalRange
public int horizontalRange()Returns the value of thehorizontalRangerecord component.- Returns:
- the value of the
horizontalRangerecord component
-
verticalRange
public int verticalRange()Returns the value of theverticalRangerecord component.- Returns:
- the value of the
verticalRangerecord component
-
cropChance
public double cropChance()Returns the value of thecropChancerecord component.- Returns:
- the value of the
cropChancerecord component
-
sugarCaneChance
public double sugarCaneChance()Returns the value of thesugarCaneChancerecord component.- Returns:
- the value of the
sugarCaneChancerecord component
-
cactusChance
public double cactusChance()Returns the value of thecactusChancerecord component.- Returns:
- the value of the
cactusChancerecord component
-
saplingChance
public double saplingChance()Returns the value of thesaplingChancerecord component.- Returns:
- the value of the
saplingChancerecord component
-
cropTicks
public int cropTicks()Returns the value of thecropTicksrecord component.- Returns:
- the value of the
cropTicksrecord component
-
sugarCaneTicks
public int sugarCaneTicks()Returns the value of thesugarCaneTicksrecord component.- Returns:
- the value of the
sugarCaneTicksrecord component
-
cactusTicks
public int cactusTicks()Returns the value of thecactusTicksrecord component.- Returns:
- the value of the
cactusTicksrecord component
-
saplingTicks
public int saplingTicks()Returns the value of thesaplingTicksrecord component.- Returns:
- the value of the
saplingTicksrecord component
-
particleChance
public double particleChance()Returns the value of theparticleChancerecord component.- Returns:
- the value of the
particleChancerecord component
-
sound
@NotNull public @NotNull io.github.pylonmc.rebar.util.RandomizedSound sound()Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord component
-