Record Class ObeliskFuel
java.lang.Object
java.lang.Record
at.minecraftschurli.mods.arsmagicalegacy.api.etherium.ObeliskFuel
- Record Components:
burnTime- The burn time of the obelisk fuel, in ticks.etheriumPerTick- The etherium generated by the obelisk fuel each tick.
Represents an obelisk fuel.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ObeliskFuel> static final net.neoforged.neoforge.registries.datamaps.DataMapType<net.minecraft.world.item.Item, ObeliskFuel> -
Constructor Summary
ConstructorsConstructorDescriptionObeliskFuel(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.static @Nullable ObeliskFuelgetFuel(net.minecraft.world.item.ItemStack stack) final inthashCode()Returns a hash code value for this object.static booleanisFuel(net.minecraft.world.item.ItemStack stack) final StringtoString()Returns a string representation of this record class.int
-
Field Details
-
CODEC
-
DATA_MAP
public static final net.neoforged.neoforge.registries.datamaps.DataMapType<net.minecraft.world.item.Item, ObeliskFuel> DATA_MAP
-
-
Constructor Details
-
ObeliskFuel
public ObeliskFuel(int burnTime, int etheriumPerTick) Creates an instance of aObeliskFuelrecord class.- Parameters:
burnTime- the value for theburnTimerecord componentetheriumPerTick- the value for theetheriumPerTickrecord component
-
-
Method Details
-
totalEtherium
public int totalEtherium()- Returns:
- The total etherium that burning the obelisk fuel will generate.
-
getFuel
- Parameters:
stack- TheItemStackto get theObeliskFuelfor.- Returns:
- The
ObeliskFuelfor the givenItemStack, or null if no suchObeliskFuelexists.
-
isFuel
public static boolean isFuel(net.minecraft.world.item.ItemStack stack) - Parameters:
stack- TheItemStackto check.- Returns:
- Whether the given
ItemStackis anObeliskFuelor not.
-
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. -
burnTime
-
etheriumPerTick
public int etheriumPerTick()Returns the value of theetheriumPerTickrecord component.- Returns:
- the value of the
etheriumPerTickrecord component
-