Skip to content

Commit

Permalink
Document the getCodec method
Browse files Browse the repository at this point in the history
  • Loading branch information
apple502j committed Sep 27, 2023
1 parent 3ccb77f commit 0190598
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -54,6 +55,15 @@ static CustomIngredientSerializer<?> get(Identifier identifier) {
*/
Identifier getIdentifier();

/**
* {@return the codec}.
*
* <p>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<T> getCodec(boolean allowEmpty);

/**
Expand Down

0 comments on commit 0190598

Please sign in to comment.