Class SimpleRibbonType
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.ribbon.type.impl.SimpleRibbonType
- All Implemented Interfaces:
RibbonType
,ITranslatable
- Direct Known Subclasses:
DeveloperRibbonType
A very simple core implementation of a
RibbonType
that has all the attributes- Since:
- 20/12/2022
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected final net.minecraft.network.chat.Component
protected final ResourceWithFallback
protected final String
protected final PaletteProperties
protected final net.minecraft.network.chat.Component
protected final net.minecraft.network.chat.Component
protected final String
-
Constructor Summary
ModifierConstructorDescriptionprotected
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 Summary
Modifier and TypeMethodDescriptionstatic SimpleRibbonType.Builder
builder()
net.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 typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getLocalizedName, getTranslatedName
Methods inherited from interface com.pixelmonmod.pixelmon.api.pokemon.ribbon.type.RibbonType
onTick
-
Field Details
-
id
-
translationKey
-
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
-
-
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
Description copied from interface:RibbonType
The unique identifier of the ribbon type- Specified by:
id
in interfaceRibbonType
- Returns:
- The identifier
-
getIcon
Description copied from interface:RibbonType
Gets theResourceLocation
, which should be a texture (.png), that will show up in the ribbons UI.- Specified by:
getIcon
in interfaceRibbonType
- Parameters:
pokemon
- The pokemon being viewedribbon
- 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 interfaceRibbonType
- 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
@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 interfaceRibbonType
- 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
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 interfaceRibbonType
- Returns:
- The description
-
getPaletteOverride
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 interfaceRibbonType
- Parameters:
pixelmon
- The pixelmon entity being checked againstribbon
- The ribbon applicable- Returns:
- The override palette
-
getTranslationKey
- Specified by:
getTranslationKey
in interfaceITranslatable
-
builder
-