java.lang.Object
java.lang.Record
com.github.minecraftschurlimods.arsmagicalegacy.api.etherium.ObeliskFuel
All Implemented Interfaces:
Predicate<net.minecraft.world.item.ItemStack>

public record ObeliskFuel(net.minecraft.world.item.crafting.Ingredient ingredient, int burnTime, int etheriumPerTick) extends Record implements Predicate<net.minecraft.world.item.ItemStack>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<ObeliskFuel>
     
    static final com.mojang.serialization.Codec<ObeliskFuel>
     
    static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<ObeliskFuel>>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ObeliskFuel(net.minecraft.world.item.crafting.Ingredient ingredient, int burnTime, int etheriumPerTick)
    Creates an instance of a ObeliskFuel record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the burnTime record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the etheriumPerTick record component.
    final int
    Returns a hash code value for this object.
    net.minecraft.world.item.crafting.Ingredient
    Returns the value of the ingredient record component.
    boolean
    test(net.minecraft.world.item.ItemStack itemStack)
     
    final String
    Returns a string representation of this record class.
    int
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.util.function.Predicate

    and, negate, or
  • Field Details

    • REGISTRY_KEY

      public static final net.minecraft.resources.ResourceKey<net.minecraft.core.Registry<ObeliskFuel>> REGISTRY_KEY
    • CODEC

      public static final com.mojang.serialization.Codec<ObeliskFuel> CODEC
    • NETWORK_CODEC

      public static final com.mojang.serialization.Codec<ObeliskFuel> NETWORK_CODEC
  • Constructor Details

    • ObeliskFuel

      public ObeliskFuel(net.minecraft.world.item.crafting.Ingredient ingredient, int burnTime, int etheriumPerTick)
      Creates an instance of a ObeliskFuel record class.
      Parameters:
      ingredient - the value for the ingredient record component
      burnTime - the value for the burnTime record component
      etheriumPerTick - the value for the etheriumPerTick record component
  • Method Details

    • totalEtherium

      public int totalEtherium()
    • test

      public boolean test(net.minecraft.world.item.ItemStack itemStack)
      Specified by:
      test in interface Predicate<net.minecraft.world.item.ItemStack>
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ingredient

      public net.minecraft.world.item.crafting.Ingredient ingredient()
      Returns the value of the ingredient record component.
      Returns:
      the value of the ingredient record component
    • burnTime

      public int burnTime()
      Returns the value of the burnTime record component.
      Returns:
      the value of the burnTime record component
    • etheriumPerTick

      public int etheriumPerTick()
      Returns the value of the etheriumPerTick record component.
      Returns:
      the value of the etheriumPerTick record component