Class SpawnReplacementRegistry
java.lang.Object
com.pixelmonmod.pixelmon.api.replacement.SpawnReplacementRegistry
Where all the custom replacements are registered/stored (from JSON)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
handleEvent
(net.minecraftforge.event.entity.EntityJoinLevelEvent event) Handles the spawn eventstatic void
register
(com.google.gson.Gson gson, net.minecraft.resources.ResourceLocation rl, com.google.gson.JsonElement json) Register a custom spawn handler from a JSON objectstatic void
register
(SpawnReplacement replacement) Registers a spawn replacementstatic void
reset()
Resets the replacement registry
-
Constructor Details
-
SpawnReplacementRegistry
public SpawnReplacementRegistry()
-
-
Method Details
-
register
public static void register(com.google.gson.Gson gson, net.minecraft.resources.ResourceLocation rl, com.google.gson.JsonElement json) Register a custom spawn handler from a JSON object- Parameters:
gson
- The GSON parserrl
- The location of the JSON filejson
- The JSON from the file
-
register
Registers a spawn replacement- Parameters:
replacement
- The created replacement
-
reset
public static void reset()Resets the replacement registry -
handleEvent
public static void handleEvent(net.minecraftforge.event.entity.EntityJoinLevelEvent event) Handles the spawn event- Parameters:
event
- The event
-