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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.network.chat.Componentprotected final ResourceWithFallbackprotected final Stringprotected final PalettePropertiesprotected final net.minecraft.network.chat.Componentprotected final net.minecraft.network.chat.Componentprotected final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSimpleRibbonType(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.Builderbuilder()net.minecraft.network.chat.ComponentGets 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.ComponentgetNamePrefix(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.ComponentgetNameSuffix(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, waitMethods inherited from interface com.pixelmonmod.pixelmon.api.util.ITranslatable
getLocalizedName, getTranslatedNameMethods 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:RibbonTypeThe unique identifier of the ribbon type- Specified by:
idin interfaceRibbonType- Returns:
- The identifier
-
getIcon
Description copied from interface:RibbonTypeGets theResourceLocation, which should be a texture (.png), that will show up in the ribbons UI.- Specified by:
getIconin 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:RibbonTypeGets 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:
getNamePrefixin 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:RibbonTypeGets 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:
getNameSuffixin 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:RibbonTypeGets the description of the ribbon that will show up in the GUI when selected- Specified by:
getDescriptionin interfaceRibbonType- Returns:
- The description
-
getPaletteOverride
Description copied from interface:RibbonTypeGets 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:
getPaletteOverridein interfaceRibbonType- Parameters:
pixelmon- The pixelmon entity being checked againstribbon- The ribbon applicable- Returns:
- The override palette
-
getTranslationKey
- Specified by:
getTranslationKeyin interfaceITranslatable
-
builder
-