T
- the Type to deserializepublic abstract class GlobalLootModifierSerializer<T extends IGlobalLootModifier> extends java.lang.Object implements IForgeRegistryEntry<GlobalLootModifierSerializer<?>>
read
method to deserialize from json.Modifier and Type | Field and Description |
---|---|
private ResourceLocation |
registryName |
Constructor and Description |
---|
GlobalLootModifierSerializer() |
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<GlobalLootModifierSerializer<?>> |
getRegistryType()
Used by Forge's registry system.
|
abstract T |
read(ResourceLocation location,
com.google.gson.JsonObject object,
ILootCondition[] ailootcondition)
Most mods will likely not need more than
return new MyModifier(conditionsIn) but any additional properties that are needed will need to be deserialized here. |
GlobalLootModifierSerializer<T> |
setRegistryName(ResourceLocation name)
Sets a unique name for this Item.
|
GlobalLootModifierSerializer<T> |
setRegistryName(java.lang.String name) |
GlobalLootModifierSerializer<T> |
setRegistryName(java.lang.String modID,
java.lang.String name) |
private ResourceLocation registryName
public final GlobalLootModifierSerializer<T> setRegistryName(java.lang.String name)
public final GlobalLootModifierSerializer<T> setRegistryName(ResourceLocation name)
IForgeRegistryEntry
setRegistryName
in interface IForgeRegistryEntry<GlobalLootModifierSerializer<?>>
name
- Unique registry namepublic final GlobalLootModifierSerializer<T> setRegistryName(java.lang.String modID, java.lang.String name)
public final ResourceLocation getRegistryName()
IForgeRegistryEntry
getRegistryName
in interface IForgeRegistryEntry<GlobalLootModifierSerializer<?>>
public abstract T read(ResourceLocation location, com.google.gson.JsonObject object, ILootCondition[] ailootcondition)
return new MyModifier(conditionsIn)
name
- The resource location (if needed)json
- The full json object (including ILootConditions)conditionsIn
- An already deserialized list of ILootConditionspublic final java.lang.Class<GlobalLootModifierSerializer<?>> getRegistryType()
getRegistryType
in interface IForgeRegistryEntry<GlobalLootModifierSerializer<?>>
private static <G> java.lang.Class<G> castClass(java.lang.Class<?> cls)