Class SpriteItemHelper
java.lang.Object
com.pixelmonmod.pixelmon.api.util.helpers.SpriteItemHelper
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.world.item.ItemStack
Gets a photo of a certain Pokémon.static net.minecraft.world.item.ItemStack
getPhoto
(PixelmonEntity pixelmon) 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 void
requestUpdate
(net.minecraft.world.item.ItemStack stack) Requests the server for an update of a Pokémon photo ItemStackstatic net.minecraft.world.item.ItemStack
updateSprite
(net.minecraft.world.item.ItemStack stack) Updates a SpriteItem ItemStack to have a default form/palette if they are missing on serverside
-
Field Details
-
NDEX
- See Also:
-
FORM
- See Also:
-
GENDER
- See Also:
-
PALETTE
- See Also:
-
-
Constructor Details
-
SpriteItemHelper
public SpriteItemHelper()
-
-
Method Details
-
getPhoto
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
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.
-
updateSprite
public static net.minecraft.world.item.ItemStack updateSprite(net.minecraft.world.item.ItemStack stack) Updates a SpriteItem ItemStack to have a default form/palette if they are missing on serverside- Parameters:
stack
- The Pokémon photo.- Returns:
- The same photo, with added values in case they are missing.
-
requestUpdate
public static void requestUpdate(net.minecraft.world.item.ItemStack stack) Requests the server for an update of a Pokémon photo ItemStack- Parameters:
stack
- The Pokémon photo.
-
getPokemon
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.
-