Class DropItemRegistry
java.lang.Object
com.pixelmonmod.pixelmon.entities.npcs.registry.DropItemRegistry
Register special drops from JSON files.
-
Field Summary
Modifier and TypeFieldDescriptionstatic Map<Species,
Set<PokemonDropInformation>> static HashMap<Integer,
HashMap<Element, WeightedItemStacks>> static ArrayList<net.minecraft.world.item.ItemStack>
A list of tier 1 special drops.static ArrayList<net.minecraft.world.item.ItemStack>
A list of tier 2 special drops.static ArrayList<net.minecraft.world.item.ItemStack>
A list of tier 3 special drops.static ArrayList<net.minecraft.world.item.ItemStack>
A list of ultra space special drops. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static List<net.minecraft.world.item.ItemStack>
getDropsForPokemon
(AbstractHoldsItemsEntity pixelmon) Gets a list of the items that a Pokémon will drop.static net.minecraft.world.item.ItemStack
Gets a random tier 1 special drop.static net.minecraft.world.item.ItemStack
Gets a random tier 2 special drop.static net.minecraft.world.item.ItemStack
Gets a random tier 3 special drop.static net.minecraft.world.item.ItemStack
Gets a random ultra space special drop.static net.minecraft.world.item.ItemStack
Finds an item from its item ID.static void
registerDropItems
(net.minecraft.resources.ResourceLocation rl, com.google.gson.JsonElement json) Registers special drop data from drops.json.
-
Field Details
-
tier1
A list of tier 1 special drops. -
tier2
A list of tier 2 special drops. -
tier3
A list of tier 3 special drops. -
ultraSpace
A list of ultra space special drops. -
pokemonDrops
-
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
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.
-