Class RecipeSerializerFactory
java.lang.Object
net.dillon.dillonlib.factory.recipe.RecipeSerializerFactory
Deprecated.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <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.
-
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 typeD- the recipe data type- Parameters:
mapCodec- the codec used to serialize the recipe to JSONstreamCodec- the codec used to serialize the recipe over the networkconstructor- creates a recipe from its datadataGetter- gets the data from a recipe- Returns:
- a recipe serializer
-