Skip to content

Commit

Permalink
Some more mappings (#4008)
Browse files Browse the repository at this point in the history
  • Loading branch information
apple502j authored Oct 3, 2024
1 parent a897ce1 commit 61408df
Show file tree
Hide file tree
Showing 9 changed files with 124 additions and 97 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CLASS net/minecraft/class_10333 net/minecraft/client/recipebook/ClientStonecutterRecipes
CLASS net/minecraft/class_10333 net/minecraft/client/recipebook/ClientRecipeManager
FIELD field_54853 propertySets Ljava/util/Map;
FIELD field_54854 recipes Lnet/minecraft/class_10291$class_10293;
METHOD <init> (Ljava/util/Map;Lnet/minecraft/class_10291$class_10293;)V
Expand Down
95 changes: 3 additions & 92 deletions mappings/net/minecraft/recipe/RecipeManager.mapping
Original file line number Diff line number Diff line change
@@ -1,93 +1,4 @@
CLASS net/minecraft/class_1863 net/minecraft/recipe/RecipeManager
COMMENT A recipe manager allows easier use of recipes, such as finding matches and
COMMENT remainders. It is also integrated with a recipe loader, which loads recipes
COMMENT from data packs' JSON files.
FIELD field_54637 registries Lnet/minecraft/class_7225$class_7874;
FIELD field_54638 preparedRecipes Lnet/minecraft/class_10289;
FIELD field_54639 propertySets Ljava/util/Map;
FIELD field_54640 stonecutterRecipes Lnet/minecraft/class_10291$class_10293;
FIELD field_9027 LOGGER Lorg/slf4j/Logger;
METHOD <init> (Lnet/minecraft/class_7225$class_7874;)V
ARG 1 registries
METHOD method_17720 deserialize (Lnet/minecraft/class_5321;Lcom/google/gson/JsonObject;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_8786;
COMMENT Reads a recipe from a JSON object.
COMMENT
COMMENT @implNote Even though a recipe's {@linkplain Recipe#getSerializer() serializer}
COMMENT is stored in a {@code type} field in the JSON format and referred so in this
COMMENT method, its registry has key {@code minecraft:root/minecraft:recipe_serializer}
COMMENT and is thus named.
COMMENT
COMMENT @throws com.google.gson.JsonParseException if the recipe JSON is invalid
COMMENT @return the read recipe
ARG 0 key
ARG 1 json
ARG 2 registries
METHOD method_42299 getFirstMatch (Lnet/minecraft/class_3956;Lnet/minecraft/class_9695;Lnet/minecraft/class_1937;Lnet/minecraft/class_5321;)Ljava/util/Optional;
ARG 1 type
ARG 2 input
ARG 3 world
ARG 4 recipe
METHOD method_42302 createCachedMatchGetter (Lnet/minecraft/class_3956;)Lnet/minecraft/class_1863$class_7266;
COMMENT Creates a cached match getter. This is optimized for getting matches of the same
COMMENT recipe repeatedly, such as furnaces.
ARG 0 type
METHOD method_59821 get (Lnet/minecraft/class_3956;Lnet/minecraft/class_5321;)Lnet/minecraft/class_8786;
COMMENT {@return a recipe with the given {@code id} and {@code type}, or empty if there is no such recipe}
ARG 1 type
COMMENT the type of the desired recipe
ARG 2 key
METHOD method_59993 getFirstMatch (Lnet/minecraft/class_3956;Lnet/minecraft/class_9695;Lnet/minecraft/class_1937;Lnet/minecraft/class_8786;)Ljava/util/Optional;
ARG 1 type
ARG 2 input
ARG 3 world
ARG 4 recipe
METHOD method_64679 (Lnet/minecraft/class_5321;Ljava/util/function/Consumer;)V
CLASS net/minecraft/class_10286 net/minecraft/recipe/RecipeManager
METHOD method_64677 getStonecutterRecipes ()Lnet/minecraft/class_10291$class_10293;
METHOD method_64678 getPropertySet (Lnet/minecraft/class_5321;)Lnet/minecraft/class_10290;
ARG 1 key
METHOD method_64681 intitialize (Lnet/minecraft/class_7699;)V
ARG 1 features
METHOD method_64682 isEnabled (Lnet/minecraft/class_7699;Lnet/minecraft/class_1856;)Z
ARG 0 features
ARG 1 ingredient
METHOD method_64683 filterIngredients (Lnet/minecraft/class_7699;Ljava/util/List;)Ljava/util/List;
ARG 0 features
ARG 1 ingredients
METHOD method_64684 (Lnet/minecraft/class_7699;Lnet/minecraft/class_6880;)Z
ARG 1 entry
METHOD method_64688 (Ljava/lang/Iterable;Lnet/minecraft/class_7699;)Ljava/util/List;
ARG 0 recipes
ARG 1 features
METHOD method_64689 (Ljava/util/List;Lnet/minecraft/class_2960;Lnet/minecraft/class_1860;)V
ARG 1 id
ARG 2 recipe
METHOD method_64690 (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lnet/minecraft/class_7699;Ljava/util/List;Lnet/minecraft/class_8786;)V
ARG 9 entry
METHOD method_64692 getPropertySets ()Ljava/util/Map;
METHOD method_64693 (Lnet/minecraft/class_7699;Lnet/minecraft/class_1856;)Z
ARG 1 ingredient
METHOD method_64694 getStonecutterRecipeForSync ()Lnet/minecraft/class_10291$class_10293;
METHOD method_8126 values ()Ljava/util/Collection;
COMMENT {@return all recipes in this manager}
COMMENT
COMMENT <p>The returned set does not update with the manager. Modifications to the
COMMENT returned set does not affect this manager.
METHOD method_8130 get (Lnet/minecraft/class_5321;)Ljava/util/Optional;
COMMENT {@return a recipe with the given {@code id}, or empty if there is no such recipe}
ARG 1 key
METHOD method_8132 getFirstMatch (Lnet/minecraft/class_3956;Lnet/minecraft/class_9695;Lnet/minecraft/class_1937;)Ljava/util/Optional;
COMMENT {@return a recipe of the given {@code type} that match the given
COMMENT {@code inventory} and {@code world}}
COMMENT
COMMENT <p>If there are multiple matching recipes, the result is arbitrary,
COMMENT but this method will return the same result unless the recipes in this
COMMENT manager are updated.
ARG 1 type
COMMENT the desired recipe type
ARG 2 input
ARG 3 world
COMMENT the input world
CLASS 1
FIELD field_38221 id Lnet/minecraft/class_5321;
CLASS class_7266 MatchGetter
METHOD method_42303 getFirstMatch (Lnet/minecraft/class_9695;Lnet/minecraft/class_3218;)Ljava/util/Optional;
ARG 1 input
ARG 2 world
93 changes: 93 additions & 0 deletions mappings/net/minecraft/recipe/ServerRecipeManager.mapping
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
CLASS net/minecraft/class_1863 net/minecraft/recipe/ServerRecipeManager
COMMENT A recipe manager allows easier use of recipes, such as finding matches and
COMMENT remainders. It is also integrated with a recipe loader, which loads recipes
COMMENT from data packs' JSON files.
FIELD field_54637 registries Lnet/minecraft/class_7225$class_7874;
FIELD field_54638 preparedRecipes Lnet/minecraft/class_10289;
FIELD field_54639 propertySets Ljava/util/Map;
FIELD field_54640 stonecutterRecipes Lnet/minecraft/class_10291$class_10293;
FIELD field_9027 LOGGER Lorg/slf4j/Logger;
METHOD <init> (Lnet/minecraft/class_7225$class_7874;)V
ARG 1 registries
METHOD method_17720 deserialize (Lnet/minecraft/class_5321;Lcom/google/gson/JsonObject;Lnet/minecraft/class_7225$class_7874;)Lnet/minecraft/class_8786;
COMMENT Reads a recipe from a JSON object.
COMMENT
COMMENT @implNote Even though a recipe's {@linkplain Recipe#getSerializer() serializer}
COMMENT is stored in a {@code type} field in the JSON format and referred so in this
COMMENT method, its registry has key {@code minecraft:root/minecraft:recipe_serializer}
COMMENT and is thus named.
COMMENT
COMMENT @throws com.google.gson.JsonParseException if the recipe JSON is invalid
COMMENT @return the read recipe
ARG 0 key
ARG 1 json
ARG 2 registries
METHOD method_42299 getFirstMatch (Lnet/minecraft/class_3956;Lnet/minecraft/class_9695;Lnet/minecraft/class_1937;Lnet/minecraft/class_5321;)Ljava/util/Optional;
ARG 1 type
ARG 2 input
ARG 3 world
ARG 4 recipe
METHOD method_42302 createCachedMatchGetter (Lnet/minecraft/class_3956;)Lnet/minecraft/class_1863$class_7266;
COMMENT Creates a cached match getter. This is optimized for getting matches of the same
COMMENT recipe repeatedly, such as furnaces.
ARG 0 type
METHOD method_59821 get (Lnet/minecraft/class_3956;Lnet/minecraft/class_5321;)Lnet/minecraft/class_8786;
COMMENT {@return a recipe with the given {@code id} and {@code type}, or empty if there is no such recipe}
ARG 1 type
COMMENT the type of the desired recipe
ARG 2 key
METHOD method_59993 getFirstMatch (Lnet/minecraft/class_3956;Lnet/minecraft/class_9695;Lnet/minecraft/class_1937;Lnet/minecraft/class_8786;)Ljava/util/Optional;
ARG 1 type
ARG 2 input
ARG 3 world
ARG 4 recipe
METHOD method_64679 (Lnet/minecraft/class_5321;Ljava/util/function/Consumer;)V
ARG 1 key
METHOD method_64681 intitialize (Lnet/minecraft/class_7699;)V
ARG 1 features
METHOD method_64682 isEnabled (Lnet/minecraft/class_7699;Lnet/minecraft/class_1856;)Z
ARG 0 features
ARG 1 ingredient
METHOD method_64683 filterIngredients (Lnet/minecraft/class_7699;Ljava/util/List;)Ljava/util/List;
ARG 0 features
ARG 1 ingredients
METHOD method_64684 (Lnet/minecraft/class_7699;Lnet/minecraft/class_6880;)Z
ARG 1 entry
METHOD method_64688 (Ljava/lang/Iterable;Lnet/minecraft/class_7699;)Ljava/util/List;
ARG 0 recipes
ARG 1 features
METHOD method_64689 (Ljava/util/List;Lnet/minecraft/class_2960;Lnet/minecraft/class_1860;)V
ARG 1 id
ARG 2 recipe
METHOD method_64690 (Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;Lnet/minecraft/class_7699;Ljava/util/List;Lnet/minecraft/class_8786;)V
ARG 9 entry
METHOD method_64692 getPropertySets ()Ljava/util/Map;
METHOD method_64693 (Lnet/minecraft/class_7699;Lnet/minecraft/class_1856;)Z
ARG 1 ingredient
METHOD method_64694 getStonecutterRecipeForSync ()Lnet/minecraft/class_10291$class_10293;
METHOD method_8126 values ()Ljava/util/Collection;
COMMENT {@return all recipes in this manager}
COMMENT
COMMENT <p>The returned set does not update with the manager. Modifications to the
COMMENT returned set does not affect this manager.
METHOD method_8130 get (Lnet/minecraft/class_5321;)Ljava/util/Optional;
COMMENT {@return a recipe with the given {@code id}, or empty if there is no such recipe}
ARG 1 key
METHOD method_8132 getFirstMatch (Lnet/minecraft/class_3956;Lnet/minecraft/class_9695;Lnet/minecraft/class_1937;)Ljava/util/Optional;
COMMENT {@return a recipe of the given {@code type} that match the given
COMMENT {@code inventory} and {@code world}}
COMMENT
COMMENT <p>If there are multiple matching recipes, the result is arbitrary,
COMMENT but this method will return the same result unless the recipes in this
COMMENT manager are updated.
ARG 1 type
COMMENT the desired recipe type
ARG 2 input
ARG 3 world
COMMENT the input world
CLASS 1
FIELD field_38221 id Lnet/minecraft/class_5321;
CLASS class_7266 MatchGetter
METHOD method_42303 getFirstMatch (Lnet/minecraft/class_9695;Lnet/minecraft/class_3218;)Ljava/util/Optional;
ARG 1 input
ARG 2 world
4 changes: 0 additions & 4 deletions mappings/net/minecraft/recipe/StonecutterRecipes.mapping

This file was deleted.

3 changes: 3 additions & 0 deletions mappings/net/minecraft/structure/StructureTemplate.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ CLASS net/minecraft/class_3499 net/minecraft/structure/StructureTemplate
ARG 1 flags
ARG 2 set
ARG 3 startPos
METHOD method_64822 getJigsawInfos (Lnet/minecraft/class_2338;Lnet/minecraft/class_2470;)Ljava/util/List;
ARG 1 pos
ARG 2 rotation
METHOD method_64823 readJoint (Lnet/minecraft/class_2487;Lnet/minecraft/class_2680;)Lnet/minecraft/class_3751$class_4991;
ARG 0 nbt
ARG 1 state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CLASS net/minecraft/class_3781 net/minecraft/structure/pool/SinglePoolElement
FIELD field_24951 LOCATION_CODEC Lcom/mojang/serialization/Codec;
FIELD field_24952 CODEC Lcom/mojang/serialization/MapCodec;
FIELD field_52234 overrideLiquidSettings Ljava/util/Optional;
FIELD field_54804 JIGSAW_BLOCK_INFO_COMPARATOR Ljava/util/Comparator;
METHOD <init> (Lcom/mojang/datafixers/util/Either;Lnet/minecraft/class_6880;Lnet/minecraft/class_3785$class_3786;Ljava/util/Optional;)V
ARG 1 location
ARG 2 processors
Expand Down
4 changes: 4 additions & 0 deletions mappings/net/minecraft/world/GameMode.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ CLASS net/minecraft/class_1934 net/minecraft/world/GameMode
METHOD method_32762 getOrNull (I)Lnet/minecraft/class_1934;
ARG 0 id
METHOD method_32763 getSimpleTranslatableName ()Lnet/minecraft/class_2561;
METHOD method_64759 (ILnet/minecraft/class_1934;)Z
ARG 1 gameMode
METHOD method_64760 isValid (I)Z
ARG 0 id
METHOD method_8378 byName (Ljava/lang/String;Lnet/minecraft/class_1934;)Lnet/minecraft/class_1934;
ARG 0 name
ARG 1 defaultMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ CLASS net/minecraft/class_8197 net/minecraft/world/biome/source/MultiNoiseBiomeS
ARG 1 preset
ARG 2 biomeLookup
METHOD method_49507 getEntries ()Lnet/minecraft/class_6544$class_6547;
METHOD method_49508 (Lnet/minecraft/class_5321;)Lnet/minecraft/class_5321;
ARG 0 biomeKey
METHOD method_49509 (Lnet/minecraft/class_8197$class_5305;)Lnet/minecraft/class_6544$class_6547;
ARG 0 preset
METHOD method_49511 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App;
ARG 0 instance
METHOD method_49512 getPresetToEntriesMap ()Ljava/util/Map;
METHOD method_49513 (Lnet/minecraft/class_8197$class_5305;)Lnet/minecraft/class_8197$class_5305;
ARG 0 preset
CLASS class_5305 Preset
FIELD comp_1309 id Lnet/minecraft/class_2960;
FIELD comp_1310 biomeSourceFunction Lnet/minecraft/class_8197$class_5305$class_8165;
Expand All @@ -27,7 +33,16 @@ CLASS net/minecraft/class_8197 net/minecraft/world/biome/source/MultiNoiseBiomeS
ARG 2 pair
METHOD method_49193 getOverworldEntries (Ljava/util/function/Function;Lnet/minecraft/class_6554$class_10317;)Lnet/minecraft/class_6544$class_6547;
ARG 0 biomeEntryGetter
ARG 1 enabledFeatures
METHOD method_49514 biomeStream ()Ljava/util/stream/Stream;
METHOD method_49515 (Lnet/minecraft/class_5321;)Lnet/minecraft/class_5321;
ARG 0 biomeKey
METHOD method_49516 (Lnet/minecraft/class_2960;)Lcom/mojang/serialization/DataResult;
ARG 0 id
METHOD method_49517 (Lnet/minecraft/class_8197$class_5305;)Lcom/mojang/serialization/DataResult;
ARG 0 preset
METHOD method_49519 (Lnet/minecraft/class_8197$class_5305;)Lnet/minecraft/class_8197$class_5305;
ARG 0 preset
CLASS class_8165 BiomeSourceFunction
METHOD apply (Ljava/util/function/Function;)Lnet/minecraft/class_6544$class_6547;
ARG 1 biomeEntryGetter
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ CLASS net/minecraft/class_6554 net/minecraft/world/biome/source/util/VanillaBiom
FIELD field_35048 MAX_SECOND_HIGH_WEIRDNESS F
FIELD field_36339 windsweptBiomes [[Lnet/minecraft/class_5321;
FIELD field_54707 specialNearMountainBiomesWinterDrop [[Lnet/minecraft/class_5321;
FIELD field_54708 enabledFeatures Lnet/minecraft/class_6554$class_10317;
METHOD <init> (Lnet/minecraft/class_6554$class_10317;)V
ARG 1 enabledFeatures
METHOD method_38179 getPeaksValleysDescription (D)Ljava/lang/String;
ARG 0 weirdness
METHOD method_38180 getNoiseRangeIndex (D[Lnet/minecraft/class_6544$class_6546;)Ljava/lang/String;
Expand Down Expand Up @@ -224,3 +227,4 @@ CLASS net/minecraft/class_6554 net/minecraft/world/biome/source/util/VanillaBiom
ARG 2 pos
METHOD method_46678 writeDebug (Ljava/util/function/Consumer;)V
ARG 1 parameters
CLASS class_10317 EnabledFeatures

0 comments on commit 61408df

Please sign in to comment.