Record Class LeafSettingsEntry
java.lang.Object
java.lang.Record
de.cheaterpaul.fallingleaves.config.LeafSettingsEntry
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLeafSettingsEntry(double spawnRateFactor) LeafSettingsEntry(double spawnRateFactor, boolean considerAsConifer) LeafSettingsEntry(double spawnRateFactor, boolean considerAsConifer, @Nullable net.minecraft.resources.ResourceLocation leafType) LeafSettingsEntry(double spawnRateFactor, Optional<net.minecraft.resources.ResourceLocation> leafType, boolean considerAsConifer) Creates an instance of aLeafSettingsEntryrecord class.LeafSettingsEntry(double spawnRateFactor, Optional<net.minecraft.resources.ResourceLocation> leaf_type, Optional<Boolean> consider_as_conifer) LeafSettingsEntry(double spawnRateFactor, net.minecraft.resources.ResourceLocation leafType) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theconsiderAsConiferrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Optional<net.minecraft.resources.ResourceLocation> leafType()Returns the value of theleafTyperecord component.doubleReturns the value of thespawnRateFactorrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
LeafSettingsEntry
-
LeafSettingsEntry
public LeafSettingsEntry(double spawnRateFactor, boolean considerAsConifer) -
LeafSettingsEntry
public LeafSettingsEntry(double spawnRateFactor) -
LeafSettingsEntry
public LeafSettingsEntry(double spawnRateFactor, net.minecraft.resources.ResourceLocation leafType) -
LeafSettingsEntry
public LeafSettingsEntry(double spawnRateFactor, boolean considerAsConifer, @Nullable @Nullable net.minecraft.resources.ResourceLocation leafType) -
LeafSettingsEntry
public LeafSettingsEntry(double spawnRateFactor, Optional<net.minecraft.resources.ResourceLocation> leafType, boolean considerAsConifer) Creates an instance of aLeafSettingsEntryrecord class.- Parameters:
spawnRateFactor- the value for thespawnRateFactorrecord componentleafType- the value for theleafTyperecord componentconsiderAsConifer- the value for theconsiderAsConiferrecord component
-
-
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 '=='. -
spawnRateFactor
public double spawnRateFactor()Returns the value of thespawnRateFactorrecord component.- Returns:
- the value of the
spawnRateFactorrecord component
-
leafType
Returns the value of theleafTyperecord component.- Returns:
- the value of the
leafTyperecord component
-
considerAsConifer
public boolean considerAsConifer()Returns the value of theconsiderAsConiferrecord component.- Returns:
- the value of the
considerAsConiferrecord component
-