Class RecipeSerializerFactory

java.lang.Object
net.dillon.dillonlib.factory.recipe.RecipeSerializerFactory

@Deprecated public class RecipeSerializerFactory extends Object
Deprecated.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <R extends net.minecraft.world.item.crafting.Recipe<?>, D>
    net.minecraft.world.item.crafting.RecipeSerializer<R>
    create(com.mojang.serialization.MapCodec<D> mapCodec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, D> streamCodec, Function<D,R> constructor, Function<R,D> dataGetter)
    Deprecated.
    Creates a recipe serializer from a recipe data codec.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RecipeSerializerFactory

      public RecipeSerializerFactory()
      Deprecated.
  • Method Details

    • create

      public static <R extends net.minecraft.world.item.crafting.Recipe<?>, D> net.minecraft.world.item.crafting.RecipeSerializer<R> create(com.mojang.serialization.MapCodec<D> mapCodec, net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, D> streamCodec, Function<D,R> constructor, Function<R,D> dataGetter)
      Deprecated.
      Creates a recipe serializer from a recipe data codec.
      Type Parameters:
      R - the recipe type
      D - the recipe data type
      Parameters:
      mapCodec - the codec used to serialize the recipe to JSON
      streamCodec - the codec used to serialize the recipe over the network
      constructor - creates a recipe from its data
      dataGetter - gets the data from a recipe
      Returns:
      a recipe serializer