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/RecipeDisplayEntry
intermediary net/minecraft/class_10297
official ddj
named id
intermediary comp_3262
official b
named display
intermediary comp_3263
official c
named group
intermediary comp_3264
official d
named category
intermediary comp_3265
official e
named craftingRequirements
intermediary comp_3266
official f
  • Field Details

    • id

      private final NetworkRecipeId id
      The field for the id record component.
    • display

      private final RecipeDisplay display
      The field for the display record component.
    • group

      private final OptionalInt group
      The field for the group record component.
    • category

      private final RecipeBookCategory category
      The field for the category record component.
    • craftingRequirements

      private final Optional<List<Ingredient>> craftingRequirements
      The field for the craftingRequirements record component.
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,RecipeDisplayEntry> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/recipe/RecipeDisplayEntry;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_54663 Lnet/minecraft/class_10297;field_54663:Lnet/minecraft/class_9139;
      official a Lddj;a:Lzt;
  • Constructor Details

  • Method Details

    • getStacks

      public List<ItemStack> getStacks(ContextParameterMap context)
      Mappings:
      Namespace Name Mixin selector
      named getStacks Lnet/minecraft/recipe/RecipeDisplayEntry;getStacks(Lnet/minecraft/util/context/ContextParameterMap;)Ljava/util/List;
      intermediary method_64730 Lnet/minecraft/class_10297;method_64730(Lnet/minecraft/class_10352;)Ljava/util/List;
      official a Lddj;a(Lbbp;)Ljava/util/List;
    • isCraftable

      public boolean isCraftable(RecipeFinder finder)
      Mappings:
      Namespace Name Mixin selector
      named isCraftable Lnet/minecraft/recipe/RecipeDisplayEntry;isCraftable(Lnet/minecraft/recipe/RecipeFinder;)Z
      intermediary method_64729 Lnet/minecraft/class_10297;method_64729(Lnet/minecraft/class_9875;)Z
      official a Lddj;a(Lcqb;)Z
    • 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 object)
      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 Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • id

      public NetworkRecipeId id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • display

      public RecipeDisplay display()
      Returns the value of the display record component.
      Returns:
      the value of the display record component
    • group

      public OptionalInt group()
      Returns the value of the group record component.
      Returns:
      the value of the group record component
    • category

      public RecipeBookCategory category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • craftingRequirements

      public Optional<List<Ingredient>> craftingRequirements()
      Returns the value of the craftingRequirements record component.
      Returns:
      the value of the craftingRequirements record component