Package net.minecraft.recipe
Record Class RecipeDisplayEntry
java.lang.Object
java.lang.Record
net.minecraft.recipe.RecipeDisplayEntry
- Record Components:
id-display-group-category-craftingRequirements-
public record RecipeDisplayEntry(NetworkRecipeId id, RecipeDisplay display, OptionalInt group, RecipeBookCategory category, Optional<List<Ingredient>> craftingRequirements)
extends Record
A recipe that is synced to the clients. Note that this does not include
the recipe's ID; the recipe is instead referred to using
NetworkRecipeId,
which is assigned at runtime.- Mappings:
Namespace Name named net/minecraft/recipe/RecipeDisplayEntryintermediary net/minecraft/class_10297official dclnamed idintermediary comp_3262official bnamed displayintermediary comp_3263official cnamed groupintermediary comp_3264official dnamed categoryintermediary comp_3265official enamed craftingRequirementsintermediary comp_3266official f
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RecipeBookCategoryThe field for thecategoryrecord component.private final Optional<List<Ingredient>> The field for thecraftingRequirementsrecord component.private final RecipeDisplayThe field for thedisplayrecord component.private final OptionalIntThe field for thegrouprecord component.private final NetworkRecipeIdThe field for theidrecord component.static final PacketCodec<RegistryByteBuf, RecipeDisplayEntry> -
Constructor Summary
ConstructorsConstructorDescriptionRecipeDisplayEntry(NetworkRecipeId networkRecipeId, RecipeDisplay recipeDisplay, OptionalInt optionalInt, RecipeBookCategory recipeBookCategory, Optional<List<Ingredient>> optional) -
Method Summary
Modifier and TypeMethodDescriptioncategory()Returns the value of thecategoryrecord component.Returns the value of thecraftingRequirementsrecord component.display()Returns the value of thedisplayrecord component.final booleanIndicates whether some other object is "equal to" this one.getStacks(ContextParameterMap context) group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanisCraftable(RecipeFinder finder) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
display
The field for thedisplayrecord component. -
group
The field for thegrouprecord component. -
category
The field for thecategoryrecord component. -
craftingRequirements
The field for thecraftingRequirementsrecord component. -
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/recipe/RecipeDisplayEntry;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_54663Lnet/minecraft/class_10297;field_54663:Lnet/minecraft/class_9139;official aLdcl;a:Lyn;
-
-
Constructor Details
-
RecipeDisplayEntry
public RecipeDisplayEntry(NetworkRecipeId networkRecipeId, RecipeDisplay recipeDisplay, OptionalInt optionalInt, RecipeBookCategory recipeBookCategory, Optional<List<Ingredient>> optional)
-
-
Method Details
-
getStacks
- Mappings:
Namespace Name Mixin selector named getStacksLnet/minecraft/recipe/RecipeDisplayEntry;getStacks(Lnet/minecraft/util/context/ContextParameterMap;)Ljava/util/List;intermediary method_64730Lnet/minecraft/class_10297;method_64730(Lnet/minecraft/class_10352;)Ljava/util/List;official aLdcl;a(Lbak;)Ljava/util/List;
-
isCraftable
- Mappings:
Namespace Name Mixin selector named isCraftableLnet/minecraft/recipe/RecipeDisplayEntry;isCraftable(Lnet/minecraft/recipe/RecipeFinder;)Zintermediary method_64729Lnet/minecraft/class_10297;method_64729(Lnet/minecraft/class_9875;)Zofficial aLdcl;a(Lcpd;)Z
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
display
Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
group
Returns the value of thegrouprecord component.- Returns:
- the value of the
grouprecord component
-
category
Returns the value of thecategoryrecord component.- Returns:
- the value of the
categoryrecord component
-
craftingRequirements
Returns the value of thecraftingRequirementsrecord component.- Returns:
- the value of the
craftingRequirementsrecord component
-