public static final class RecipeSerializers.SimpleSerializer<T extends IRecipe> extends java.lang.Object implements IRecipeSerializer<T>
Constructor and Description |
---|
SimpleSerializer(java.lang.String idIn,
java.util.function.Function<ResourceLocation,T> functionIn) |
Modifier and Type | Method and Description |
---|---|
ResourceLocation |
getName() |
T |
read(ResourceLocation recipeId,
com.google.gson.JsonObject json) |
T |
read(ResourceLocation recipeId,
PacketBuffer buffer) |
void |
write(PacketBuffer buffer,
T recipe) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getId
public SimpleSerializer(java.lang.String idIn, java.util.function.Function<ResourceLocation,T> functionIn)
public T read(ResourceLocation recipeId, com.google.gson.JsonObject json)
read
in interface IRecipeSerializer<T extends IRecipe>
public T read(ResourceLocation recipeId, PacketBuffer buffer)
read
in interface IRecipeSerializer<T extends IRecipe>
public void write(PacketBuffer buffer, T recipe)
write
in interface IRecipeSerializer<T extends IRecipe>
public ResourceLocation getName()
getName
in interface IRecipeSerializer<T extends IRecipe>