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
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FurnaceFuel> private final intThe field for theburnTimerecord component.static final com.mojang.serialization.Codec<FurnaceFuel> -
Constructor Summary
ConstructorsConstructorDescriptionFurnaceFuel(int burnTime) Creates an instance of aFurnaceFuelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintburnTime()Returns the value of theburnTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
burnTime
private final int burnTimeThe field for theburnTimerecord component. -
BURN_TIME_CODEC
-
CODEC
-
-
Constructor Details
-
FurnaceFuel
public FurnaceFuel(int burnTime) Creates an instance of aFurnaceFuelrecord class.- Parameters:
burnTime- the value for theburnTimerecord 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 theburnTimerecord component.- Returns:
- the value of the
burnTimerecord component
-