Class DropItemRegistry

java.lang.Object
com.pixelmonmod.pixelmon.entities.npcs.registry.DropItemRegistry

public class DropItemRegistry extends Object
Register special drops from JSON files.
  • Field Details

    • tier1

      public static ArrayList<net.minecraft.world.item.ItemStack> tier1
      A list of tier 1 special drops.
    • tier2

      public static ArrayList<net.minecraft.world.item.ItemStack> tier2
      A list of tier 2 special drops.
    • tier3

      public static ArrayList<net.minecraft.world.item.ItemStack> tier3
      A list of tier 3 special drops.
    • ultraSpace

      public static ArrayList<net.minecraft.world.item.ItemStack> ultraSpace
      A list of ultra space special drops.
    • pokemonDrops

      public static Map<Species,Set<PokemonDropInformation>> pokemonDrops
    • raidDrops

      public static HashMap<Integer,HashMap<Element,WeightedItemStacks>> raidDrops
  • Constructor Details

    • DropItemRegistry

      public DropItemRegistry()
  • Method Details

    • clearDrops

      public static void clearDrops()
    • registerDropItems

      public static void registerDropItems(net.minecraft.resources.ResourceLocation rl, com.google.gson.JsonElement json)
      Registers special drop data from drops.json.
    • getTier1Drop

      public static net.minecraft.world.item.ItemStack getTier1Drop()
      Gets a random tier 1 special drop.
      Returns:
      A random tier 1 special drop.
    • getTier2Drop

      public static net.minecraft.world.item.ItemStack getTier2Drop()
      Gets a random tier 2 special drop.
      Returns:
      A random tier 2 special drop.
    • getTier3Drop

      public static net.minecraft.world.item.ItemStack getTier3Drop()
      Gets a random tier 3 special drop.
      Returns:
      A random tier 3 special drop.
    • getUltraSpaceDrop

      public static net.minecraft.world.item.ItemStack getUltraSpaceDrop()
      Gets a random ultra space special drop.
      Returns:
      A random ultra space special drop.
    • getDropsForPokemon

      public static List<net.minecraft.world.item.ItemStack> getDropsForPokemon(AbstractHoldsItemsEntity pixelmon)
      Gets a list of the items that a Pokémon will drop.
      Parameters:
      pixelmon - The Pokémon to get drops for.
      Returns:
      A list of the items that a Pokémon will drop.
    • parseItem

      public static net.minecraft.world.item.ItemStack parseItem(String name)
      Finds an item from its item ID.
      Parameters:
      name - The item ID of the item.
      Returns:
      An item stack (size 1) of the item, or null if the item ID doesn't exist.