Interface RibbonType
- All Superinterfaces:
ITranslatable
- All Known Implementing Classes:
DeveloperRibbonType
,SimpleRibbonType
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 TypeMethodDescriptionnet.minecraft.network.chat.Component
Gets the description of the ribbon that will show up in the GUI when selectedGets theResourceLocation
, 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 typedefault void
onTick
(PixelmonEntity pixelmon, Ribbon ribbon) An event called when the Pokemon, with this ribbon type, applied ticks in the worldMethods 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
Gets theResourceLocation
, which should be a texture (.png), that will show up in the ribbons UI.- Parameters:
pokemon
- The pokemon being viewedribbon
- The ribbon getting the icon for- Returns:
- The texture of the icon
-
getNamePrefix
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 worldribbon
- The ribbon applicable- Returns:
- The prefix to be applied (default is null)
-
getNameSuffix
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 worldribbon
- 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
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 againstribbon
- The ribbon applicable- Returns:
- The override palette
-
onTick
An event called when the Pokemon, with this ribbon type, applied ticks in the world- Parameters:
pixelmon
- The pixelmon tickingribbon
- The ribbon applicable
-