Class PaletteProperties

java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.species.palette.PaletteProperties
All Implemented Interfaces:
ITranslatable, Cloneable

public class PaletteProperties extends Object implements Cloneable, ITranslatable
Stores the transformation information for the Palette of a given Species
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<PaletteProperties> CODEC
    • name

      protected final String name
    • translationKey

      protected final String translationKey
    • modelLocators

      protected final ModelLocator[] modelLocators
    • sprite

      protected final ResourceWithFallback sprite
    • sounds

      protected final List<net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent>> sounds
    • particle

      protected final net.minecraft.world.level.biome.AmbientParticleSettings particle
  • Constructor Details

    • PaletteProperties

      public PaletteProperties(String name, String translationKey, List<ModelLocator> modelLocators, ResourceWithFallback sprite, List<net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent>> sounds, Optional<net.minecraft.world.level.biome.AmbientParticleSettings> particleSettings)
  • Method Details

    • clone

      protected PaletteProperties clone()
      Overrides:
      clone in class Object
    • getName

      public String getName()
      The name of the Palette
      Returns:
      The name
    • getTranslationKey

      public String getTranslationKey()
      Specified by:
      getTranslationKey in interface ITranslatable
    • preloadModels

      public void preloadModels()
      Preloads models for use on send out
    • getModelLocators

      public ModelLocator[] getModelLocators()
      Gets the model locators of the palette
      Returns:
      The PQC representations of the model
    • getModel

      public ModelData[] getModel(AbstractClientEntity entity)
      Gets the model of the palette
      Returns:
      The model
    • getSprite

      public net.minecraft.resources.ResourceLocation getSprite()
      Gets the ResourceLocation of the sprite texture
      Returns:
      The sprite location
    • getSpriteWithFallback

      public ResourceWithFallback getSpriteWithFallback()
      Gets the ResourceWithFallback of the sprite texture
      Returns:
      The sprite location
    • getParticle

      public net.minecraft.world.level.biome.AmbientParticleSettings getParticle()
      Gets the particle to be played on the pokemon with this given Palette
      Returns:
      The particles played
    • getSound

      public net.minecraft.sounds.SoundEvent getSound()
    • is

      public boolean is(String palette)
    • usingFallback

      public boolean usingFallback()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object