Package com.wdiscute.artisan.compat.jei
Record Class ArtisanJeiHopperFuelRecipe.Recipe
java.lang.Object
java.lang.Record
com.wdiscute.artisan.compat.jei.ArtisanJeiHopperFuelRecipe.Recipe
- Enclosing class:
ArtisanJeiHopperFuelRecipe
public static record ArtisanJeiHopperFuelRecipe.Recipe(net.minecraft.world.item.Item item, int charges)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionRecipe(net.minecraft.world.item.Item item, int charges) Creates an instance of aReciperecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcharges()Returns the value of thechargesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.world.item.Itemitem()Returns the value of theitemrecord component.of(net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> key, int charges) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Recipe
public Recipe(net.minecraft.world.item.Item item, int charges) Creates an instance of aReciperecord class.- Parameters:
item- the value for theitemrecord componentcharges- the value for thechargesrecord component
-
-
Method Details
-
of
public static ArtisanJeiHopperFuelRecipe.Recipe of(net.minecraft.resources.ResourceKey<net.minecraft.world.item.Item> key, int charges) -
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 '=='. -
item
public net.minecraft.world.item.Item item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
charges
public int charges()Returns the value of thechargesrecord component.- Returns:
- the value of the
chargesrecord component
-