Class GlobalLootModifiersTest.DungeonLootEnhancerModifier.Serializer
- java.lang.Object
-
- net.minecraftforge.common.loot.GlobalLootModifierSerializer<GlobalLootModifiersTest.DungeonLootEnhancerModifier>
-
- net.minecraftforge.debug.gameplay.loot.GlobalLootModifiersTest.DungeonLootEnhancerModifier.Serializer
-
- All Implemented Interfaces:
IForgeRegistryEntry<GlobalLootModifierSerializer<?>>
- Enclosing class:
- GlobalLootModifiersTest.DungeonLootEnhancerModifier
private static class GlobalLootModifiersTest.DungeonLootEnhancerModifier.Serializer extends GlobalLootModifierSerializer<GlobalLootModifiersTest.DungeonLootEnhancerModifier>
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Serializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GlobalLootModifiersTest.DungeonLootEnhancerModifier
read(ResourceLocation location, com.google.gson.JsonObject object, ILootCondition[] conditions)
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.com.google.gson.JsonObject
write(GlobalLootModifiersTest.DungeonLootEnhancerModifier instance)
Write the serializer to json.-
Methods inherited from class net.minecraftforge.common.loot.GlobalLootModifierSerializer
getRegistryName, getRegistryType, makeConditions, setRegistryName, setRegistryName, setRegistryName
-
-
-
-
Method Detail
-
read
public GlobalLootModifiersTest.DungeonLootEnhancerModifier read(ResourceLocation location, com.google.gson.JsonObject object, ILootCondition[] conditions)
Description copied from class:GlobalLootModifierSerializer
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.- Specified by:
read
in classGlobalLootModifierSerializer<GlobalLootModifiersTest.DungeonLootEnhancerModifier>
-
write
public com.google.gson.JsonObject write(GlobalLootModifiersTest.DungeonLootEnhancerModifier instance)
Description copied from class:GlobalLootModifierSerializer
Write the serializer to json. Most serializers won't have to do anything else thanGlobalLootModifierSerializer.makeConditions(net.minecraft.loot.conditions.ILootCondition[])
Which simply creates the JsonObject from an array of ILootConditions.- Specified by:
write
in classGlobalLootModifierSerializer<GlobalLootModifiersTest.DungeonLootEnhancerModifier>
-
-