public static class ConditionalRecipe.Serializer<T extends IRecipe<?>> extends java.lang.Object implements IRecipeSerializer<T>
Modifier and Type | Field and Description |
---|---|
private ResourceLocation |
name |
BLASTING, CAMPFIRE_COOKING, CRAFTING_SHAPED, CRAFTING_SHAPELESS, CRAFTING_SPECIAL_ARMORDYE, CRAFTING_SPECIAL_BANNERDUPLICATE, CRAFTING_SPECIAL_BOOKCLONING, CRAFTING_SPECIAL_FIREWORK_ROCKET, CRAFTING_SPECIAL_FIREWORK_STAR, CRAFTING_SPECIAL_FIREWORK_STAR_FADE, CRAFTING_SPECIAL_MAPCLONING, CRAFTING_SPECIAL_MAPEXTENDING, CRAFTING_SPECIAL_REPAIRITEM, CRAFTING_SPECIAL_SHIELD, CRAFTING_SPECIAL_SHULKERBOXCOLORING, CRAFTING_SPECIAL_SUSPICIOUSSTEW, CRAFTING_SPECIAL_TIPPEDARROW, SMELTING, SMOKING, STONECUTTING
Constructor and Description |
---|
Serializer() |
Modifier and Type | Method and Description |
---|---|
private static <G> java.lang.Class<G> |
castClass(java.lang.Class<?> cls) |
ResourceLocation |
getRegistryName()
A unique identifier for this entry, if this entry is registered already it will return it's official registry name.
|
java.lang.Class<IRecipeSerializer<?>> |
getRegistryType()
Determines the type for this entry, used to look up the correct registry in the global registries list as there can only be one
registry per concrete class.
|
T |
read(ResourceLocation recipeId,
com.google.gson.JsonObject json) |
T |
read(ResourceLocation recipeId,
PacketBuffer buffer) |
IRecipeSerializer<?> |
setRegistryName(ResourceLocation name)
Sets a unique name for this Item.
|
void |
write(PacketBuffer buffer,
T recipe) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
register
private ResourceLocation name
public IRecipeSerializer<?> setRegistryName(ResourceLocation name)
IForgeRegistryEntry
setRegistryName
in interface IForgeRegistryEntry<IRecipeSerializer<?>>
name
- Unique registry namepublic ResourceLocation getRegistryName()
IForgeRegistryEntry
getRegistryName
in interface IForgeRegistryEntry<IRecipeSerializer<?>>
public java.lang.Class<IRecipeSerializer<?>> getRegistryType()
IForgeRegistryEntry
getRegistryType
in interface IForgeRegistryEntry<IRecipeSerializer<?>>
private static <G> java.lang.Class<G> castClass(java.lang.Class<?> cls)
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<?>>