Package net.minecraft.recipe
Record Class Ingredient.StackEntry
java.lang.Object
java.lang.Record
net.minecraft.recipe.Ingredient.StackEntry
- Record Components:
stack
-
- All Implemented Interfaces:
Ingredient.Entry
- Enclosing class:
Ingredient
private static record Ingredient.StackEntry(ItemStack stack)
extends Record
implements Ingredient.Entry
- Mappings:
Namespace Name official cmg$a
intermediary net/minecraft/class_1856$class_1857
named net/minecraft/recipe/Ingredient$StackEntry
official b
intermediary comp_1930
named stack
-
Field Summary
Modifier and TypeFieldDescription(package private) static final com.mojang.serialization.Codec<Ingredient.StackEntry>
private final ItemStack
The field for thestack
record component. -
Constructor Summary
ModifierConstructorDescriptionprivate
StackEntry
(ItemStack stack) Creates an instance of aStackEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.stack()
Returns the value of thestack
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
stack
The field for thestack
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official c
Lcmg$a;c:Lcom/mojang/serialization/Codec;
intermediary field_46097
Lnet/minecraft/class_1856$class_1857;field_46097:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/recipe/Ingredient$StackEntry;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
StackEntry
Creates an instance of aStackEntry
record class.- Parameters:
stack
- the value for thestack
record component
-
-
Method Details
-
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)
. -
getStacks
- Specified by:
getStacks
in interfaceIngredient.Entry
- Mappings:
Namespace Name Mixin selector official a
Lcmg$c;a()Ljava/util/Collection;
intermediary method_8108
Lnet/minecraft/class_1856$class_1859;method_8108()Ljava/util/Collection;
named getStacks
Lnet/minecraft/recipe/Ingredient$Entry;getStacks()Ljava/util/Collection;
-
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. -
stack
Returns the value of thestack
record component.- Returns:
- the value of the
stack
record component
-