Class IngredientCodecs

java.lang.Object
net.neoforged.neoforge.common.crafting.IngredientCodecs

@Internal public class IngredientCodecs extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ICustomIngredient>
     
    private static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)