Class SpriteItemHelper

java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.SpriteItemHelper

public class SpriteItemHelper extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.item.ItemStack
    getPhoto(Pokemon pokemon)
    Gets a photo of a certain Pokémon.
    static net.minecraft.world.item.ItemStack
    Gets a photo of a certain Pokémon.
    getPokemon(net.minecraft.world.item.ItemStack stack)
    Gets an instance of a Pokémon depicted by a photo.
    static @Nullable net.minecraft.resources.ResourceLocation
    getPokemonSprite(net.minecraft.world.item.ItemStack stack)
    Gets a ResourceLocation for the relevant sprite for the stack provided

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpriteItemHelper

      public SpriteItemHelper()
  • Method Details

    • getPhoto

      public static net.minecraft.world.item.ItemStack getPhoto(PixelmonEntity pixelmon)
      Gets a photo of a certain Pokémon.
      Parameters:
      pixelmon - The Pokémon to get a photo of.
      Returns:
      A stack with one photo of the given Pokémon.
    • getPhoto

      public static net.minecraft.world.item.ItemStack getPhoto(Pokemon pokemon)
      Gets a photo of a certain Pokémon.
      Parameters:
      pokemon - The Pokémon to get a photo of.
      Returns:
      A stack with one photo of the given Pokémon.
    • getPokemon

      public static Optional<Pokemon> getPokemon(net.minecraft.world.item.ItemStack stack)
      Gets an instance of a Pokémon depicted by a photo.
      Parameters:
      stack - The Pokémon photo.
      Returns:
      An optional containing an appropriate Pokémon, if possible.
    • getPokemonSprite

      @Nullable public static @Nullable net.minecraft.resources.ResourceLocation getPokemonSprite(net.minecraft.world.item.ItemStack stack)
      Gets a ResourceLocation for the relevant sprite for the stack provided
      Parameters:
      stack - The Pokémon photo.
      Returns:
      The ResourceLocation for this stack's image, or null if parsing failed.