Class PokemonDropInformation

java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.drops.PokemonDropInformation

public class PokemonDropInformation extends Object
Represents the potential drops from a given PokemonSpecification
  • Constructor Details

    • PokemonDropInformation

      public PokemonDropInformation(com.google.gson.JsonObject jsonObject)
      Json constructor
      Parameters:
      jsonObject - The json being parsed
    • PokemonDropInformation

      public PokemonDropInformation(PokemonSpecification pokemonSpec, ItemWithChance... items)
      Basic constructor taking default values
      Parameters:
      pokemonSpec - The spec matching the pokemon
      items - The items to drop
  • Method Details

    • getPokemonSpec

      public PokemonSpecification getPokemonSpec()
      Gets the specification being matched
      Returns:
      The spec
    • getDrops

      public List<ItemWithChance> getDrops()
      Gets the drops for said spec
      Returns:
      The drops
    • addDrop

      public void addDrop(ItemWithChance item)
      Adds a drop for the spec
      Parameters:
      item - The new drop
    • getDrops

      public List<net.minecraft.world.item.ItemStack> getDrops(AbstractHoldsItemsEntity pixelmon)
      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