java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.ribbon.type.impl.SimpleRibbonType
All Implemented Interfaces:
RibbonType, ITranslatable
Direct Known Subclasses:
DeveloperRibbonType

public class SimpleRibbonType extends Object implements RibbonType
A very simple core implementation of a RibbonType that has all the attributes
Since:
20/12/2022
  • Field Details

    • id

      protected final String id
    • translationKey

      protected final String translationKey
    • icon

      protected final ResourceWithFallback icon
    • description

      protected final net.minecraft.network.chat.Component description
    • prefix

      protected final net.minecraft.network.chat.Component prefix
    • suffix

      protected final net.minecraft.network.chat.Component suffix
    • palette

      protected final PaletteProperties palette
  • Constructor Details

    • SimpleRibbonType

      protected SimpleRibbonType(String id, String translationKey, ResourceWithFallback icon, net.minecraft.network.chat.Component description, net.minecraft.network.chat.Component prefix, net.minecraft.network.chat.Component suffix, PaletteProperties palette)
  • Method Details

    • id

      public String id()
      Description copied from interface: RibbonType
      The unique identifier of the ribbon type
      Specified by:
      id in interface RibbonType
      Returns:
      The identifier
    • getIcon

      @Nonnull public ResourceWithFallback getIcon(Pokemon pokemon, Ribbon ribbon)
      Description copied from interface: RibbonType
      Gets the ResourceLocation, which should be a texture (.png), that will show up in the ribbons UI.
      Specified by:
      getIcon in interface RibbonType
      Parameters:
      pokemon - The pokemon being viewed
      ribbon - The ribbon getting the icon for
      Returns:
      The texture of the icon
    • getNamePrefix

      @Nullable public net.minecraft.network.chat.Component getNamePrefix(Pokemon pixelmon, Ribbon ribbon)
      Description copied from interface: RibbonType
      Gets the prefix that will be applied to the entity when they are in the world and this ribbon is applied. This can return null, and when it returns null no such prefix will be applied.
      Specified by:
      getNamePrefix in interface RibbonType
      Parameters:
      pixelmon - The pixelmon entity being given a prefix in the world
      ribbon - The ribbon applicable
      Returns:
      The prefix to be applied (default is null)
    • getNameSuffix

      @Nullable public net.minecraft.network.chat.Component getNameSuffix(Pokemon pixelmon, Ribbon ribbon)
      Description copied from interface: RibbonType
      Gets the suffix that will be applied to the entity when they are in the world and this ribbon is applied. This can return null, and when it returns null no such suffix will be applied.
      Specified by:
      getNameSuffix in interface RibbonType
      Parameters:
      pixelmon - The pixelmon entity being given a suffix in the world
      ribbon - The ribbon applicable
      Returns:
      The suffix to be applied (default is null)
    • getDescription

      public net.minecraft.network.chat.Component getDescription()
      Description copied from interface: RibbonType
      Gets the description of the ribbon that will show up in the GUI when selected
      Specified by:
      getDescription in interface RibbonType
      Returns:
      The description
    • getPaletteOverride

      @Nullable public PaletteProperties getPaletteOverride(Pokemon pixelmon, Ribbon ribbon)
      Description copied from interface: RibbonType
      Gets the override palette for the pixelmon entity when it is in the world. This means that when the Pokemon has the ribbon equippied it will look (or sound) different from it's normal form or palette. The only default implementation/usage of this will be creator forms/palettes This can return null, and when it returns null there will be no palette override applied.
      Specified by:
      getPaletteOverride in interface RibbonType
      Parameters:
      pixelmon - The pixelmon entity being checked against
      ribbon - The ribbon applicable
      Returns:
      The override palette
    • getTranslationKey

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

      public static SimpleRibbonType.Builder builder()