Interface RibbonType

All Superinterfaces:
ITranslatable
All Known Implementing Classes:
DeveloperRibbonType, SimpleRibbonType

public interface RibbonType extends ITranslatable
A ribbon is a cosmetic that can be given, and selected by the owner, to a Pokemon. The ribbons that a given Pokemon has can be viewed in the summary UI of the Pokemon and then selected, or de-selected, by clicking the applied ribbon to turn it off, or selecting another. \ A ribbon type is a class used to dictate the logic used for a given ribbon. For example, when it will have a palette override, when it should be given, or when it may have a name prefix/suffix.
Since:
20/12/2022
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
    Gets the description of the ribbon that will show up in the GUI when selected
    getIcon(Pokemon pokemon, Ribbon ribbon)
    Gets the ResourceLocation, which should be a texture (.png), that will show up in the ribbons UI.
    net.minecraft.network.chat.Component
    getNamePrefix(Pokemon pixelmon, Ribbon ribbon)
    Gets the prefix that will be applied to the entity when they are in the world and this ribbon is applied.
    net.minecraft.network.chat.Component
    getNameSuffix(Pokemon pixelmon, Ribbon ribbon)
    Gets the suffix that will be applied to the entity when they are in the world and this ribbon is applied.
    getPaletteOverride(Pokemon pixelmon, Ribbon ribbon)
    Gets the override palette for the pixelmon entity when it is in the world.
    id()
    The unique identifier of the ribbon type
    default void
    onTick(PixelmonEntity pixelmon, Ribbon ribbon)
    An event called when the Pokemon, with this ribbon type, applied ticks in the world

    Methods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable

    getLocalizedName, getTranslatedName, getTranslationKey
  • Method Details

    • id

      String id()
      The unique identifier of the ribbon type
      Returns:
      The identifier
    • getIcon

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

      @Nullable net.minecraft.network.chat.Component getNamePrefix(Pokemon pixelmon, Ribbon ribbon)
      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.
      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 net.minecraft.network.chat.Component getNameSuffix(Pokemon pixelmon, Ribbon ribbon)
      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.
      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

      net.minecraft.network.chat.Component getDescription()
      Gets the description of the ribbon that will show up in the GUI when selected
      Returns:
      The description
    • getPaletteOverride

      @Nullable PaletteProperties getPaletteOverride(Pokemon pixelmon, Ribbon ribbon)
      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.
      Parameters:
      pixelmon - The pixelmon entity being checked against
      ribbon - The ribbon applicable
      Returns:
      The override palette
    • onTick

      default void onTick(PixelmonEntity pixelmon, Ribbon ribbon)
      An event called when the Pokemon, with this ribbon type, applied ticks in the world
      Parameters:
      pixelmon - The pixelmon ticking
      ribbon - The ribbon applicable