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 classes/interfaces inherited from interface mcp.mobius.waila.api.IData
IData.Type<D extends IData>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The default energy bar color.static final Component
The default energy name translation key.static final String
The default unit of energy that will be shown, depending on the platform.static final ResourceLocation
static final EnergyData
An infinite energy data.static final IData.Type
<EnergyData> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic EnergyData.Description
Sets 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 EnergyData
of
(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_energy
tag 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.
-