mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-21 20:50:28 -04:00
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
This commit is contained in:
parent
e982ae85ea
commit
9650955252
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue