Record Class ObeliskFuel
java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.etherium.ObeliskFuel
- All Implemented Interfaces:
Predicate<net.minecraft.world.item.ItemStack>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ObeliskFuel>static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<ObeliskFuel>> -
Constructor Summary
ConstructorsConstructorDescriptionObeliskFuel(net.minecraft.world.item.crafting.Ingredient ingredient, int burnTime, int etheriumPerTick) Creates an instance of aObeliskFuelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintburnTime()Returns the value of theburnTimerecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theetheriumPerTickrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.crafting.IngredientReturns the value of theingredientrecord component.booleantest(net.minecraft.world.item.ItemStack itemStack) final StringtoString()Returns a string representation of this record class.int
-
Field Details
-
REGISTRY_KEY
public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<ObeliskFuel>> REGISTRY_KEY -
CODEC
-
-
Constructor Details
-
ObeliskFuel
public ObeliskFuel(net.minecraft.world.item.crafting.Ingredient ingredient, int burnTime, int etheriumPerTick) Creates an instance of aObeliskFuelrecord class.- Parameters:
ingredient- the value for theingredientrecord componentburnTime- the value for theburnTimerecord componentetheriumPerTick- the value for theetheriumPerTickrecord component
-
-
Method Details
-
totalEtherium
public int totalEtherium() -
test
public boolean test(net.minecraft.world.item.ItemStack itemStack) -
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 '=='. -
ingredient
public net.minecraft.world.item.crafting.Ingredient ingredient()Returns the value of theingredientrecord component.- Returns:
- the value of the
ingredientrecord component
-
burnTime
public int burnTime()Returns the value of theburnTimerecord component.- Returns:
- the value of the
burnTimerecord component
-
etheriumPerTick
public int etheriumPerTick()Returns the value of theetheriumPerTickrecord component.- Returns:
- the value of the
etheriumPerTickrecord component
-