diff --git a/mappings/net/minecraft/recipe/Ingredient.mapping b/mappings/net/minecraft/recipe/Ingredient.mapping index a67e4f9118..04c2714f0e 100644 --- a/mappings/net/minecraft/recipe/Ingredient.mapping +++ b/mappings/net/minecraft/recipe/Ingredient.mapping @@ -3,7 +3,7 @@ CLASS net/minecraft/class_1856 net/minecraft/recipe/Ingredient FIELD field_48355 PACKET_CODEC Lnet/minecraft/class_9139; FIELD field_52595 OPTIONAL_PACKET_CODEC Lnet/minecraft/class_9139; FIELD field_52596 ENTRIES_CODEC Lcom/mojang/serialization/Codec; - FIELD field_9018 matchingStacks Ljava/util/List; + FIELD field_9018 matchingItems Ljava/util/List; FIELD field_9019 entries Lnet/minecraft/class_6885; METHOD (Lnet/minecraft/class_6885;)V ARG 1 entries @@ -31,7 +31,7 @@ CLASS net/minecraft/class_1856 net/minecraft/recipe/Ingredient METHOD method_61680 (Lnet/minecraft/class_1856;)Lnet/minecraft/class_6885; ARG 0 ingredient METHOD method_64672 (Ljava/util/List;)Ljava/lang/Record; - ARG 0 displays + ARG 0 items METHOD method_64673 toDisplay ()Lnet/minecraft/class_10302; METHOD method_64980 toDisplay (Ljava/util/Optional;)Lnet/minecraft/class_10302; ARG 0 ingredient @@ -41,7 +41,7 @@ CLASS net/minecraft/class_1856 net/minecraft/recipe/Ingredient ARG 0 items METHOD method_8101 ofItem (Lnet/minecraft/class_1935;)Lnet/minecraft/class_1856; ARG 0 item - METHOD method_8105 getMatchingStacks ()Ljava/util/List; + METHOD method_8105 getMatchingItems ()Ljava/util/List; METHOD method_8106 fromTag (Lnet/minecraft/class_6885;)Lnet/minecraft/class_1856; ARG 0 tag METHOD test (Ljava/lang/Object;)Z diff --git a/mappings/net/minecraft/recipe/Recipe.mapping b/mappings/net/minecraft/recipe/Recipe.mapping index 8af1ac3e5b..b70e6919b1 100644 --- a/mappings/net/minecraft/recipe/Recipe.mapping +++ b/mappings/net/minecraft/recipe/Recipe.mapping @@ -1,11 +1,17 @@ CLASS net/minecraft/class_1860 net/minecraft/recipe/Recipe - COMMENT A recipe is an arrangement of item stacks in an inventory that can - COMMENT yield a product item stack. + COMMENT A recipe is an arrangement of items in an inventory that can + COMMENT yield a product item stack. Recipes are not used on the client side; + COMMENT the server syncs to the client a {@link RecipeDisplayEntry}, + COMMENT which is used instead. COMMENT - COMMENT

Recipes are loaded by and stored in the {@link RecipeManager}. They - COMMENT are part of the server's data packs and are sent to the client, governed - COMMENT by their {@linkplain #getSerializer() serializers}. Hence, recipes - COMMENT should not be stored, as they may become obsolete after reloads. + COMMENT

Recipes are loaded by and stored in the {@link ServerRecipeManager}. They + COMMENT are part of the server's data packs. Hence, recipes should not be stored, + COMMENT as they may become obsolete after reloads. + COMMENT + COMMENT

{@link RecipeEntry} is a pair of the recipe and its ID ({@linkplain + COMMENT net.minecraft.registry.RegistryKey a registry key}). The ID can be used to + COMMENT refer to recipes in saved data. However, the client does not receive the ID of + COMMENT recipes. COMMENT COMMENT

A few of the methods in this class are dedicated to crafting recipes COMMENT or recipe books. Users can have stub implementations if they do not use @@ -20,6 +26,10 @@ CLASS net/minecraft/class_1860 net/minecraft/recipe/Recipe METHOD method_49188 showNotification ()Z METHOD method_61671 getIngredientPlacement ()Lnet/minecraft/class_9887; METHOD method_64664 getDisplays ()Ljava/util/List; + COMMENT {@link the list of recipe displays corresponding to the recipe} + COMMENT + COMMENT

Recipe displays are sent to the client and displayed in the recipe book. + COMMENT One recipe can have multiple displays. METHOD method_64668 getRecipeBookTab ()Lnet/minecraft/class_10355; METHOD method_8112 getGroup ()Ljava/lang/String; COMMENT {@return a group this recipe belongs in, or an empty string} This is diff --git a/mappings/net/minecraft/recipe/RecipeDisplayEntry.mapping b/mappings/net/minecraft/recipe/RecipeDisplayEntry.mapping index c3c17b3438..c01d5f13e7 100644 --- a/mappings/net/minecraft/recipe/RecipeDisplayEntry.mapping +++ b/mappings/net/minecraft/recipe/RecipeDisplayEntry.mapping @@ -1,6 +1,7 @@ CLASS net/minecraft/class_10297 net/minecraft/recipe/RecipeDisplayEntry COMMENT A recipe that is synced to the clients. Note that this does not include - COMMENT the recipe's registry key. + COMMENT the recipe's ID; the recipe is instead referred to using {@link NetworkRecipeId}, + COMMENT which is assigned at runtime. FIELD field_54663 PACKET_CODEC Lnet/minecraft/class_9139; METHOD method_64729 isCraftable (Lnet/minecraft/class_9875;)Z ARG 1 finder diff --git a/mappings/net/minecraft/recipe/RecipeSerializer.mapping b/mappings/net/minecraft/recipe/RecipeSerializer.mapping index 04b637ffe0..922392849e 100644 --- a/mappings/net/minecraft/recipe/RecipeSerializer.mapping +++ b/mappings/net/minecraft/recipe/RecipeSerializer.mapping @@ -1,15 +1,10 @@ CLASS net/minecraft/class_1865 net/minecraft/recipe/RecipeSerializer - COMMENT The recipe serializer controls the serialization and deserialization of - COMMENT recipe content. The caller should handle the serialization of recipes' IDs. + COMMENT The recipe serializer controls the deserialization of recipe content during + COMMENT data pack loading. COMMENT COMMENT

Even though they are referred to by the {@code type} field in recipe COMMENT JSON format, they are stored in a registry with key COMMENT {@code minecraft:root/minecraft:recipe_serializer}, and is hence named. - COMMENT - COMMENT

If a recipe's serializer exists only on the server but not on the - COMMENT client, the client will disconnect upon receiving the recipe; if a - COMMENT recipe JSON intended for an absent recipe serializer is read, it is - COMMENT skipped. FIELD field_17084 BLASTING Lnet/minecraft/class_1865; FIELD field_17085 SMOKING Lnet/minecraft/class_1865; FIELD field_17347 CAMPFIRE_COOKING Lnet/minecraft/class_1865; @@ -32,3 +27,9 @@ CLASS net/minecraft/class_1865 net/minecraft/recipe/RecipeSerializer ARG 1 serializer METHOD method_53736 codec ()Lcom/mojang/serialization/MapCodec; METHOD method_56104 packetCodec ()Lnet/minecraft/class_9139; + COMMENT {@return the packet codec for serializing recipes over the network} + COMMENT + COMMENT @deprecated {@link Recipe} is no longer synced to the clients, making this + COMMENT obsolete. + COMMENT + COMMENT @see RecipeDisplayEntry