Skip to content

Commit

Permalink
Recipe stuff (#3645)
Browse files Browse the repository at this point in the history
  • Loading branch information
YanisBft authored Aug 31, 2023
1 parent 8139d4f commit 9a4cb6c
Show file tree
Hide file tree
Showing 18 changed files with 110 additions and 15 deletions.
14 changes: 10 additions & 4 deletions mappings/net/minecraft/recipe/AbstractCookingRecipe.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ CLASS net/minecraft/class_1874 net/minecraft/recipe/AbstractCookingRecipe
FIELD field_17544 type Lnet/minecraft/class_3956;
FIELD field_40241 category Lnet/minecraft/class_7709;
FIELD field_9057 experience F
FIELD field_9058 cookTime I
FIELD field_9059 output Lnet/minecraft/class_1799;
FIELD field_9061 input Lnet/minecraft/class_1856;
FIELD field_9058 cookingTime I
FIELD field_9059 result Lnet/minecraft/class_1799;
FIELD field_9061 ingredient Lnet/minecraft/class_1856;
FIELD field_9062 group Ljava/lang/String;
METHOD <init> (Lnet/minecraft/class_3956;Ljava/lang/String;Lnet/minecraft/class_7709;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;FI)V
ARG 1 type
ARG 2 group
ARG 3 category
ARG 4 ingredient
ARG 5 result
ARG 6 experience
ARG 7 cookingTime
METHOD method_45438 getCategory ()Lnet/minecraft/class_7709;
METHOD method_8167 getCookTime ()I
METHOD method_8167 getCookingTime ()I
METHOD method_8171 getExperience ()F
7 changes: 7 additions & 0 deletions mappings/net/minecraft/recipe/BlastingRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
CLASS net/minecraft/class_3859 net/minecraft/recipe/BlastingRecipe
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_7709;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;FI)V
ARG 1 group
ARG 2 category
ARG 3 ingredient
ARG 4 result
ARG 5 experience
ARG 6 cookingTime
7 changes: 7 additions & 0 deletions mappings/net/minecraft/recipe/CampfireCookingRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
CLASS net/minecraft/class_3920 net/minecraft/recipe/CampfireCookingRecipe
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_7709;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;FI)V
ARG 1 group
ARG 2 category
ARG 3 ingredient
ARG 4 result
ARG 5 experience
ARG 6 cookingTime
8 changes: 8 additions & 0 deletions mappings/net/minecraft/recipe/CookingRecipeSerializer.mapping
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
CLASS net/minecraft/class_3957 net/minecraft/recipe/CookingRecipeSerializer
FIELD field_17552 recipeFactory Lnet/minecraft/class_3957$class_3958;
FIELD field_46105 codec Lcom/mojang/serialization/Codec;
METHOD <init> (Lnet/minecraft/class_3957$class_3958;I)V
ARG 1 recipeFactory
ARG 2 cookingTime
CLASS class_3958 RecipeFactory
METHOD create (Ljava/lang/String;Lnet/minecraft/class_7709;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;FI)Lnet/minecraft/class_1874;
ARG 1 group
ARG 2 category
ARG 3 ingredient
ARG 4 result
ARG 5 experience
ARG 6 cookingTime
13 changes: 11 additions & 2 deletions mappings/net/minecraft/recipe/CuttingRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
CLASS net/minecraft/class_3972 net/minecraft/recipe/CuttingRecipe
COMMENT A recipe that has only one input ingredient. It can be used by any type
COMMENT of recipe as long as its subclass implements the proper interface.
FIELD field_17642 input Lnet/minecraft/class_1856;
FIELD field_17643 output Lnet/minecraft/class_1799;
FIELD field_17642 ingredient Lnet/minecraft/class_1856;
FIELD field_17643 result Lnet/minecraft/class_1799;
FIELD field_17645 group Ljava/lang/String;
FIELD field_17646 type Lnet/minecraft/class_3956;
FIELD field_17647 serializer Lnet/minecraft/class_1865;
METHOD <init> (Lnet/minecraft/class_3956;Lnet/minecraft/class_1865;Ljava/lang/String;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;)V
ARG 1 type
ARG 2 serializer
ARG 3 group
ARG 4 ingredient
ARG 5 result
CLASS class_3973 Serializer
FIELD field_17648 recipeFactory Lnet/minecraft/class_3972$class_3973$class_3974;
FIELD field_46107 codec Lcom/mojang/serialization/Codec;
METHOD <init> (Lnet/minecraft/class_3972$class_3973$class_3974;)V
ARG 1 recipeFactory
CLASS class_3974 RecipeFactory
METHOD create (Ljava/lang/String;Lnet/minecraft/class_1856;Lnet/minecraft/class_1792;I)Lnet/minecraft/class_3972;
ARG 1 group
ARG 2 ingredient
ARG 3 result
ARG 4 count
2 changes: 2 additions & 0 deletions mappings/net/minecraft/recipe/Ingredient.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ CLASS net/minecraft/class_1856 net/minecraft/recipe/Ingredient
FIELD field_9019 entries [Lnet/minecraft/class_1856$class_1859;
METHOD <init> (Ljava/util/stream/Stream;)V
ARG 1 entries
METHOD <init> ([Lnet/minecraft/class_1856$class_1859;)V
ARG 1 entries
METHOD method_26964 ofStacks (Ljava/util/stream/Stream;)Lnet/minecraft/class_1856;
ARG 0 stacks
METHOD method_26965 (Lnet/minecraft/class_1799;)Z
Expand Down
2 changes: 2 additions & 0 deletions mappings/net/minecraft/recipe/MapExtendingRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CLASS net/minecraft/class_1861 net/minecraft/recipe/MapExtendingRecipe
METHOD <init> (Lnet/minecraft/class_7710;)V
ARG 1 category
METHOD method_51165 findFilledMap (Lnet/minecraft/class_8566;)Lnet/minecraft/class_1799;
ARG 0 inventory
2 changes: 1 addition & 1 deletion mappings/net/minecraft/recipe/Recipe.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CLASS net/minecraft/class_1860 net/minecraft/recipe/Recipe
COMMENT {@return whether this recipe has no ingredient or has any empty ingredient}
COMMENT The recipe book uses this to ignore recipes for display.
METHOD method_49188 showNotification ()Z
METHOD method_8110 getOutput (Lnet/minecraft/class_5455;)Lnet/minecraft/class_1799;
METHOD method_8110 getResult (Lnet/minecraft/class_5455;)Lnet/minecraft/class_1799;
COMMENT {@return a preview of the recipe's output}
COMMENT
COMMENT <p>The returned stack should not be modified. To obtain the actual output,
Expand Down
2 changes: 2 additions & 0 deletions mappings/net/minecraft/recipe/RecipeSerializer.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ CLASS net/minecraft/class_1865 net/minecraft/recipe/RecipeSerializer
METHOD method_17724 register (Ljava/lang/String;Lnet/minecraft/class_1865;)Lnet/minecraft/class_1865;
ARG 0 id
ARG 1 serializer
METHOD method_53736 codec ()Lcom/mojang/serialization/Codec;
METHOD method_8122 read (Lnet/minecraft/class_2540;)Lnet/minecraft/class_1860;
COMMENT Reads a recipe from a packet byte buf, usually on the client.
COMMENT
COMMENT <p>This can throw whatever exception the packet byte buf throws. This may be
COMMENT called in the netty event loop than the client game engine thread.
COMMENT
COMMENT @return the read recipe
ARG 1 buf
METHOD method_8124 write (Lnet/minecraft/class_2540;Lnet/minecraft/class_1860;)V
COMMENT Writes a recipe to a packet byte buf, usually on the server.
COMMENT
Expand Down
21 changes: 19 additions & 2 deletions mappings/net/minecraft/recipe/ShapedRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
CLASS net/minecraft/class_1869 net/minecraft/recipe/ShapedRecipe
FIELD field_40256 category Lnet/minecraft/class_7710;
FIELD field_42719 showNotification Z
FIELD field_9052 input Lnet/minecraft/class_2371;
FIELD field_9053 output Lnet/minecraft/class_1799;
FIELD field_9052 ingredients Lnet/minecraft/class_2371;
FIELD field_9053 result Lnet/minecraft/class_1799;
FIELD field_9054 height I
FIELD field_9055 width I
FIELD field_9056 group Ljava/lang/String;
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_7710;IILnet/minecraft/class_2371;Lnet/minecraft/class_1799;)V
ARG 1 group
ARG 2 category
ARG 3 width
ARG 4 height
ARG 5 ingredients
ARG 6 result
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_7710;IILnet/minecraft/class_2371;Lnet/minecraft/class_1799;Z)V
ARG 1 group
ARG 2 category
ARG 3 width
ARG 4 height
ARG 5 ingredients
ARG 6 result
ARG 7 showNotification
METHOD method_31585 (Lnet/minecraft/class_1856;)Z
ARG 0 ingredient
METHOD method_31586 (Lnet/minecraft/class_1856;)Z
Expand All @@ -30,6 +45,7 @@ CLASS net/minecraft/class_1869 net/minecraft/recipe/ShapedRecipe
COMMENT </pre>
COMMENT
COMMENT @return a new recipe pattern with all leading and trailing empty rows/columns removed
ARG 0 pattern
METHOD method_8150 getWidth ()I
METHOD method_8151 findFirstSymbol (Ljava/lang/String;)I
ARG 0 line
Expand All @@ -42,3 +58,4 @@ CLASS net/minecraft/class_1869 net/minecraft/recipe/ShapedRecipe
ARG 3 offsetY
ARG 4 flipped
CLASS class_1870 Serializer
FIELD field_46102 CODEC Lcom/mojang/serialization/Codec;
10 changes: 8 additions & 2 deletions mappings/net/minecraft/recipe/ShapelessRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CLASS net/minecraft/class_1867 net/minecraft/recipe/ShapelessRecipe
FIELD field_40257 category Lnet/minecraft/class_7710;
FIELD field_9047 input Lnet/minecraft/class_2371;
FIELD field_9047 ingredients Lnet/minecraft/class_2371;
FIELD field_9049 group Ljava/lang/String;
FIELD field_9050 output Lnet/minecraft/class_1799;
FIELD field_9050 result Lnet/minecraft/class_1799;
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_7710;Lnet/minecraft/class_1799;Lnet/minecraft/class_2371;)V
ARG 1 group
ARG 2 category
ARG 3 result
ARG 4 ingredients
CLASS class_1868 Serializer
FIELD field_46104 CODEC Lcom/mojang/serialization/Codec;
7 changes: 7 additions & 0 deletions mappings/net/minecraft/recipe/SmeltingRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
CLASS net/minecraft/class_3861 net/minecraft/recipe/SmeltingRecipe
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_7709;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;FI)V
ARG 1 group
ARG 2 category
ARG 3 ingredient
ARG 4 result
ARG 5 experience
ARG 6 cookingTime
7 changes: 5 additions & 2 deletions mappings/net/minecraft/recipe/SmithingTransformRecipe.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ CLASS net/minecraft/class_8060 net/minecraft/recipe/SmithingTransformRecipe
FIELD field_42032 addition Lnet/minecraft/class_1856;
FIELD field_42033 result Lnet/minecraft/class_1799;
METHOD <init> (Lnet/minecraft/class_1856;Lnet/minecraft/class_1856;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;)V
ARG 2 template
ARG 3 base
ARG 1 template
ARG 2 base
ARG 3 addition
ARG 4 result
CLASS class_8061 Serializer
FIELD field_46108 CODEC Lcom/mojang/serialization/Codec;
6 changes: 4 additions & 2 deletions mappings/net/minecraft/recipe/SmithingTrimRecipe.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ CLASS net/minecraft/class_8062 net/minecraft/recipe/SmithingTrimRecipe
FIELD field_42036 base Lnet/minecraft/class_1856;
FIELD field_42037 addition Lnet/minecraft/class_1856;
METHOD <init> (Lnet/minecraft/class_1856;Lnet/minecraft/class_1856;Lnet/minecraft/class_1856;)V
ARG 2 template
ARG 3 base
ARG 1 template
ARG 2 base
ARG 3 addition
CLASS class_8063 Serializer
FIELD field_46109 CODEC Lcom/mojang/serialization/Codec;
7 changes: 7 additions & 0 deletions mappings/net/minecraft/recipe/SmokingRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
CLASS net/minecraft/class_3862 net/minecraft/recipe/SmokingRecipe
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_7709;Lnet/minecraft/class_1856;Lnet/minecraft/class_1799;FI)V
ARG 1 group
ARG 2 category
ARG 3 ingredient
ARG 4 result
ARG 5 experience
ARG 6 cookingTime
2 changes: 2 additions & 0 deletions mappings/net/minecraft/recipe/SpecialCraftingRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
CLASS net/minecraft/class_1852 net/minecraft/recipe/SpecialCraftingRecipe
FIELD field_40255 category Lnet/minecraft/class_7710;
METHOD <init> (Lnet/minecraft/class_7710;)V
ARG 1 category
3 changes: 3 additions & 0 deletions mappings/net/minecraft/recipe/SpecialRecipeSerializer.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ CLASS net/minecraft/class_1866 net/minecraft/recipe/SpecialRecipeSerializer
COMMENT <p>The name "special" comes from the fact that in vanilla, recipes using this
COMMENT serializer have IDs starting with {@code crafting_special_}. All of their logic and ingredients
COMMENT are also defined in code, which distinguishes them from "non-special" recipes.
FIELD field_46106 codec Lcom/mojang/serialization/Codec;
FIELD field_9046 factory Lnet/minecraft/class_1866$class_7711;
METHOD <init> (Lnet/minecraft/class_1866$class_7711;)V
ARG 1 factory
CLASS class_7711 Factory
METHOD create (Lnet/minecraft/class_7710;)Lnet/minecraft/class_3955;
ARG 1 category
5 changes: 5 additions & 0 deletions mappings/net/minecraft/recipe/StonecuttingRecipe.mapping
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
CLASS net/minecraft/class_3975 net/minecraft/recipe/StonecuttingRecipe
METHOD <init> (Ljava/lang/String;Lnet/minecraft/class_1856;Lnet/minecraft/class_1792;I)V
ARG 1 group
ARG 2 ingredient
ARG 3 result
ARG 4 count

0 comments on commit 9a4cb6c

Please sign in to comment.