Record Class FurnaceFuel
java.lang.Object
java.lang.Record
net.neoforged.neoforge.registries.datamaps.builtin.FurnaceFuel
- Record Components:
burnTime
- how long (in ticks) the item will burn for
Data map value for furnace fuels.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FurnaceFuel>
private final int
The field for theburnTime
record component.static final com.mojang.serialization.Codec<FurnaceFuel>
-
Constructor Summary
ConstructorDescriptionFurnaceFuel
(int burnTime) Creates an instance of aFurnaceFuel
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
burnTime()
Returns the value of theburnTime
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
burnTime
private final int burnTimeThe field for theburnTime
record component. -
BURN_TIME_CODEC
-
CODEC
-
-
Constructor Details
-
FurnaceFuel
public FurnaceFuel(int burnTime) Creates an instance of aFurnaceFuel
record class.- Parameters:
burnTime
- the value for theburnTime
record 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. All components in this record class are compared with '=='. -
burnTime
public int burnTime()Returns the value of theburnTime
record component.- Returns:
- the value of the
burnTime
record component
-