Class SpawnReplacementRegistry

java.lang.Object
com.pixelmonmod.pixelmon.api.replacement.SpawnReplacementRegistry

public class SpawnReplacementRegistry extends Object
Where all the custom replacements are registered/stored (from JSON)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    handleEvent(net.minecraftforge.event.entity.EntityJoinLevelEvent event)
    Handles the spawn event
    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
    static void
    Registers a spawn replacement
    static void
    Resets the replacement registry

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 parser
      rl - The location of the JSON file
      json - The JSON from the file
    • register

      public static void register(SpawnReplacement replacement)
      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