From 9650955252ddd047fcee640a17178e37f9ef23ae Mon Sep 17 00:00:00 2001
From: apple502j <33279053+apple502j@users.noreply.github.com>
Date: Sun, 1 Oct 2023 20:36:57 +0900
Subject: [PATCH] Document the getCodec method (#3343)

* Document the getCodec method

* Update fabric-recipe-api-v1/src/main/java/net/fabricmc/fabric/api/recipe/v1/ingredient/CustomIngredientSerializer.java
---
 .../recipe/v1/ingredient/CustomIngredientSerializer.java | 9 +++++++++
 1 file changed, 9 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 e41680b6f..0cf05d289 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 com.mojang.serialization.Codec;
 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,14 @@ public interface CustomIngredientSerializer<T extends CustomIngredient> {
 	 */
 	Identifier getIdentifier();
 
+	/**
+	 * {@return the codec}.
+	 *
+	 * <p>Codecs are used to read the ingredient from the recipe JSON files.
+	 *
+	 * @see Ingredient#ALLOW_EMPTY_CODEC
+	 * @see Ingredient#DISALLOW_EMPTY_CODEC
+	 */
 	Codec<T> getCodec(boolean allowEmpty);
 
 	/**