Interface IUnit
- All Known Implementing Classes:
Units
public interface IUnit
-
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.network.chat.MutableComponentGets the abbreviated name of the unit.default net.minecraft.network.chat.MutableComponentformat(int amount) Formats an amount of the unit as a text component.default net.minecraft.network.chat.MutableComponentformat(int amount, PropertyFormat format) Formats an amount of the unit as a text component.default net.minecraft.network.chat.MutableComponentplural()Gets the plural name of the unit.net.minecraft.resources.ResourceLocationunitKey()A namespaced identifier that is used to derive localization keys for the unit.default net.minecraft.network.chat.MutableComponentunitName()Gets the name of the unit.
-
Method Details
-
unitKey
net.minecraft.resources.ResourceLocation unitKey()A namespaced identifier that is used to derive localization keys for the unit.- Returns:
- The namespace ID for the unit.
-
unitName
default net.minecraft.network.chat.MutableComponent unitName()Gets the name of the unit.- Returns:
- The name of the unit.
-
plural
default net.minecraft.network.chat.MutableComponent plural()Gets the plural name of the unit.- Returns:
- The plural name of the unit.
-
abbreviated
default net.minecraft.network.chat.MutableComponent abbreviated()Gets the abbreviated name of the unit.- Returns:
- The abbreviated name of the unit.
-
format
default net.minecraft.network.chat.MutableComponent format(int amount) Formats an amount of the unit as a text component.- Parameters:
amount- The amount of the unit.- Returns:
- The formatted text. If the amount is plural the plural name will be used.
-
format
Formats an amount of the unit as a text component.- Parameters:
amount- The amount of the unit.format- The property format to use when displaying the unit and value.- Returns:
- The formatted text. If the amount is plural the plural name will be used instead.
-