Class IngredientCodecs
java.lang.Object
net.neoforged.neoforge.common.crafting.IngredientCodecs
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final net.minecraft.network.codec.StreamCodec
<net.minecraft.network.RegistryFriendlyByteBuf, ICustomIngredient> private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.serialization.Codec
<net.minecraft.world.item.crafting.Ingredient> codec
(com.mojang.serialization.Codec<net.minecraft.world.item.crafting.Ingredient> vanillaCodec) static net.minecraft.network.codec.StreamCodec
<net.minecraft.network.RegistryFriendlyByteBuf, Optional<net.minecraft.world.item.crafting.Ingredient>> optionalStreamCodec
(net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, Optional<net.minecraft.world.item.crafting.Ingredient>> vanillaCodec) static net.minecraft.network.codec.StreamCodec
<net.minecraft.network.RegistryFriendlyByteBuf, net.minecraft.world.item.crafting.Ingredient> streamCodec
(net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, net.minecraft.world.item.crafting.Ingredient> vanillaCodec)
-
Field Details
-
CUSTOM_INGREDIENT_MARKER
private static final int CUSTOM_INGREDIENT_MARKER- See Also:
-
CUSTOM_INGREDIENT_CODEC
private static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ICustomIngredient> CUSTOM_INGREDIENT_CODEC
-
-
Constructor Details
-
IngredientCodecs
public IngredientCodecs()
-
-
Method Details
-
codec
public static com.mojang.serialization.Codec<net.minecraft.world.item.crafting.Ingredient> codec(com.mojang.serialization.Codec<net.minecraft.world.item.crafting.Ingredient> vanillaCodec) -
streamCodec
public static net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,net.minecraft.world.item.crafting.Ingredient> streamCodec(net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, net.minecraft.world.item.crafting.Ingredient> vanillaCodec) -
optionalStreamCodec
public static net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Optional<net.minecraft.world.item.crafting.Ingredient>> optionalStreamCodec(net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, Optional<net.minecraft.world.item.crafting.Ingredient>> vanillaCodec)
-