Package mcp.mobius.waila.api.data
Class EnergyData
java.lang.Object
mcp.mobius.waila.api.data.EnergyData
- All Implemented Interfaces:
IData
Adds an energy information to an object.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface mcp.mobius.waila.api.IData
IData.Type<D extends IData> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default energy bar color.static final ComponentThe default energy name translation key.static final StringThe default unit of energy that will be shown, depending on the platform.static final ResourceLocationstatic final EnergyDataAn infinite energy data.static final IData.Type<EnergyData> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EnergyData.DescriptionSets the default values that will be applied for objects from the specified namespace.static <T> IDataProvider<T> Creates a data provider that always returns infinite energy data.static EnergyDataof(double stored, double capacity) Creates a energy data.
-
Field Details
-
ID
-
TYPE
-
DEFAULT_NAME
The default energy name translation key. -
DEFAULT_COLOR
public static final int DEFAULT_COLORThe default energy bar color.- See Also:
-
DEFAULT_UNIT
The default unit of energy that will be shown, depending on the platform.E will be used on Fabric/Quilt and FE on Forge.
-
INFINITE
An infinite energy data.- See Also:
-
-
Constructor Details
-
EnergyData
public EnergyData()
-
-
Method Details
-
newInfiniteProvider
Creates a data provider that always returns infinite energy data.Should probably be used with a higher (lower number) priority than the default.
Along with this method, Waila also provides
waila:extra/infinite_energytag that can be used for marking blocks, block entity types, or entity types to contain infinite energy.- See Also:
-
describe
Sets the default values that will be applied for objects from the specified namespace. -
of
Creates a energy data.
-