Class PokemonDropInformation
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.drops.PokemonDropInformation
Represents the potential drops from a given
PokemonSpecification
-
Constructor Summary
ConstructorDescriptionPokemonDropInformation
(com.google.gson.JsonObject jsonObject) Json constructorPokemonDropInformation
(PokemonSpecification pokemonSpec, ItemWithChance... items) Basic constructor taking default values -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDrop
(ItemWithChance item) Adds a drop for the specgetDrops()
Gets the drops for said specList<net.minecraft.world.item.ItemStack>
getDrops
(AbstractHoldsItemsEntity pixelmon) Gets the drops for a given entity using randomnessGets the specification being matched
-
Constructor Details
-
PokemonDropInformation
public PokemonDropInformation(com.google.gson.JsonObject jsonObject) Json constructor- Parameters:
jsonObject
- The json being parsed
-
PokemonDropInformation
Basic constructor taking default values- Parameters:
pokemonSpec
- The spec matching the pokemonitems
- The items to drop
-
-
Method Details
-
getPokemonSpec
Gets the specification being matched- Returns:
- The spec
-
getDrops
Gets the drops for said spec- Returns:
- The drops
-
addDrop
Adds a drop for the spec- Parameters:
item
- The new drop
-
getDrops
Gets the drops for a given entity using randomness- Parameters:
pixelmon
- The entity- Returns:
- A list of the drops if the pixelmon matches the spec
-