Record Class Flammable
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.datamaps.builtin.Flammable
- Record Components:
igniteOdds- The likelihood of a block to catch fire, typical values used by vanilla areFireBlock.IGNITE_INSTANT,FireBlock.IGNITE_EASY,FireBlock.IGNITE_MEDIUM,FireBlock.IGNITE_HARDburnOdds- The likelihood of a block to be destroyed by fire, typical values used by vanilla areFireBlock.BURN_INSTANT,FireBlock.BURN_EASY,FireBlock.BURN_MEDIUM,FireBlock.BURN_HARD
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theburnOddsrecord component.static final com.mojang.serialization.Codec<Flammable> private final intThe field for theigniteOddsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFlammable(int igniteOdds, int burnOdds) Creates an instance of aFlammablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionintburnOdds()Returns the value of theburnOddsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theigniteOddsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
igniteOdds
private final int igniteOddsThe field for theigniteOddsrecord component. -
burnOdds
private final int burnOddsThe field for theburnOddsrecord component. -
CODEC
-
-
Constructor Details
-
Flammable
public Flammable(int igniteOdds, int burnOdds) Creates an instance of aFlammablerecord class.- Parameters:
igniteOdds- the value for theigniteOddsrecord componentburnOdds- the value for theburnOddsrecord component
-
-
Method Details
-
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 with thecomparemethod from their corresponding wrapper classes. -
igniteOdds
public int igniteOdds()Returns the value of theigniteOddsrecord component.- Returns:
- the value of the
igniteOddsrecord component
-
burnOdds
-