Package mcp.mobius.waila.api.data
Class ProgressData
java.lang.Object
mcp.mobius.waila.api.data.ProgressData
- All Implemented Interfaces:
IData
Adds a crafting progress 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 ResourceLocation
static final IData.Type
<ProgressData> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionensureInputSpace
(int length) Ensure the internal list has empty space for the specified amount.ensureOutputSpace
(int length) Ensure the internal list has empty space for the specified amount.input
(int slot) Adds an item stack from the specified slot to the input list.input
(int... slots) Adds an item stack from the specified slots to the input list.input
(Collection<ItemStack> stacks) Adds item stacks to the input list.Adds an item stack to the input list.Adds item stacks to the input list.itemGetter
(IntFunction<ItemStack> inventory) Specify a slot to item stack getter to be used withinput(int)
andoutput(int)
.output
(int slot) Adds an item stack from the specified slot to the output list.output
(int... slots) Adds an item stack from the specified slots to the output list.output
(Collection<ItemStack> stacks) Adds item stacks to the output list.Adds an item stack to the output list.Adds item stacks to the output list.static ProgressData
ratio
(float ratio) Creates a progress data.
-
Field Details
-
ID
-
TYPE
-
-
Constructor Details
-
ProgressData
public ProgressData()
-
-
Method Details
-
ratio
Creates a progress data.Do NOT add a data if the current progress is zero.
- Parameters:
ratio
- the ratio of the progress ranging from0.0f
to1.0f
-
input
Adds an item stack to the input list. -
input
Adds item stacks to the input list. -
input
Adds item stacks to the input list. -
input
Adds an item stack from the specified slot to the input list.A stack getter needs to be specified with
itemGetter(IntFunction)
. -
input
Adds an item stack from the specified slots to the input list.A stack getter needs to be specified with
itemGetter(IntFunction)
. -
output
Adds an item stack to the output list. -
output
Adds item stacks to the output list. -
output
Adds item stacks to the output list. -
output
Adds an item stack from the specified slot to the output list.A stack getter needs to be specified with
itemGetter(IntFunction)
. -
output
Adds an item stack from the specified slots to the output list.A stack getter needs to be specified with
itemGetter(IntFunction)
. -
itemGetter
Specify a slot to item stack getter to be used withinput(int)
andoutput(int)
. -
ensureInputSpace
Ensure the internal list has empty space for the specified amount. -
ensureOutputSpace
Ensure the internal list has empty space for the specified amount.
-