Record Class CookingFuel
java.lang.Object
java.lang.Record
net.minecraft.world.item.component.CookingFuel
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResolvableIntThe field for theburnTimerecord component.static final com.mojang.serialization.Codec<CookingFuel> private final ResolvableFloatThe field for thespeedMultiplierrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, CookingFuel> -
Constructor Summary
ConstructorsConstructorDescriptionCookingFuel(ResourceKey<ContextIntProvider> burnTime, ResourceKey<ContextFloatProvider> speedMultiplier) CookingFuel(ResolvableInt burnTime, ResolvableFloat speedMultiplier) Creates an instance of aCookingFuelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionburnTime()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.Returns the value of thespeedMultiplierrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
burnTime
The field for theburnTimerecord component. -
speedMultiplier
The field for thespeedMultiplierrecord component. -
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
CookingFuel
public CookingFuel(ResourceKey<ContextIntProvider> burnTime, ResourceKey<ContextFloatProvider> speedMultiplier) -
CookingFuel
Creates an instance of aCookingFuelrecord class.- Parameters:
burnTime- the value for theburnTimerecord componentspeedMultiplier- the value for thespeedMultiplierrecord 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 withObjects::equals(Object,Object). -
burnTime
Returns the value of theburnTimerecord component.- Returns:
- the value of the
burnTimerecord component
-
speedMultiplier
Returns the value of thespeedMultiplierrecord component.- Returns:
- the value of the
speedMultiplierrecord component
-