From 0190598568eedc521c10665dde6234f16d0106b0 Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Thu, 28 Sep 2023 00:07:57 +0900 Subject: [PATCH] Document the getCodec method --- .../v1/ingredient/CustomIngredientSerializer.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/api/recipe/v1/ingredient/CustomIngredientSerializer.java b/fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/api/recipe/v1/ingredient/CustomIngredientSerializer.java index e41680b6fb..6f0b5ae333 100644 --- a/fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/api/recipe/v1/ingredient/CustomIngredientSerializer.java +++ b/fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/api/recipe/v1/ingredient/CustomIngredientSerializer.java @@ -20,6 +20,7 @@ import org.jetbrains.annotations.Nullable; import net.minecraft.network.PacketByteBuf; +import net.minecraft.recipe.Ingredient; import net.minecraft.util.Identifier; import net.fabricmc.fabric.impl.recipe.ingredient.CustomIngredientImpl; @@ -54,6 +55,15 @@ static CustomIngredientSerializer> get(Identifier identifier) { */ Identifier getIdentifier(); + /** + * {@return the codec}. + * + *
Codecs are used to read the ingredient from the recipe JSON files.
+ * If the custom ingredient
+ *
+ * @see Ingredient#ALLOW_EMPTY_CODEC
+ * @see Ingredient#DISALLOW_EMPTY_CODEC
+ */
Codec