public class IngredientComponentTerminalStorageHandlerItemStack extends java.lang.Object implements IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>
| Constructor and Description |
|---|
IngredientComponentTerminalStorageHandlerItemStack(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<net.minecraft.item.ItemStack,java.lang.Integer> ingredientComponent) |
| Modifier and Type | Method and Description |
|---|---|
void |
drainActivePlayerStackQuantity(net.minecraft.entity.player.InventoryPlayer playerInventory,
long quantity)
Drain the given quantity from the active player stack.
|
void |
drawInstance(net.minecraft.item.ItemStack instance,
long maxQuantity,
java.lang.String label,
net.minecraft.client.gui.inventory.GuiContainer gui,
GuiTerminalStorage.DrawLayer layer,
float partialTick,
int x,
int y,
int mouseX,
int mouseY,
java.util.List<java.lang.String> additionalTooltipLines)
Draw the given instance in the given gui.
|
void |
extractActiveStackFromPlayerInventory(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<net.minecraft.item.ItemStack,java.lang.Integer> storage,
net.minecraft.entity.player.InventoryPlayer playerInventory,
long moveQuantityPlayerSlot)
Move the ingredient in the active player stack to the storage.
|
void |
extractMaxFromContainerSlot(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<net.minecraft.item.ItemStack,java.lang.Integer> storage,
net.minecraft.inventory.Container container,
int containerSlot)
Move as much as possible from the given container slot into the storage.
|
java.lang.String |
formatQuantity(net.minecraft.item.ItemStack instance)
Get a display string for the quantity of the given instance.
|
long |
getActivePlayerStackQuantity(net.minecraft.entity.player.InventoryPlayer playerInventory)
Get the quantity in the active player stack.
|
org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<net.minecraft.item.ItemStack,java.lang.Integer> |
getComponent() |
net.minecraft.item.ItemStack |
getIcon() |
int |
getIncrementalInstanceMovementQuantity() |
int |
getInitialInstanceMovementQuantity() |
net.minecraft.item.ItemStack |
getInstance(net.minecraft.item.ItemStack itemStack)
Get the ingredient instance from the given item.
|
java.util.function.Predicate<net.minecraft.item.ItemStack> |
getInstanceFilterPredicate(SearchMode searchMode,
java.lang.String query)
Get a predicate for matching instances that apply to the given query string.
|
java.util.Collection<IIngredientInstanceSorter<net.minecraft.item.ItemStack>> |
getInstanceSorters() |
long |
getMaxQuantity(net.minecraft.item.ItemStack itemStack)
Get the max instance quantity in the given item.
|
net.minecraft.item.ItemStack |
insertIntoContainer(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<net.minecraft.item.ItemStack,java.lang.Integer> storage,
net.minecraft.inventory.Container container,
int containerSlotIndex,
net.minecraft.item.ItemStack maxInstance,
net.minecraft.entity.player.EntityPlayer player,
boolean transferFullSelection)
Insert the given instance into the container.
|
boolean |
isInstance(net.minecraft.item.ItemStack itemStack)
Get the ingredient instance from the given item.
|
int |
throwIntoWorld(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<net.minecraft.item.ItemStack,java.lang.Integer> storage,
net.minecraft.item.ItemStack maxInstance,
net.minecraft.entity.player.EntityPlayer player)
Throw the given instance into the world.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddQuantityTooltip, insertMaxIntoContainerpublic IngredientComponentTerminalStorageHandlerItemStack(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<net.minecraft.item.ItemStack,java.lang.Integer> ingredientComponent)
public org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<net.minecraft.item.ItemStack,java.lang.Integer> getComponent()
getComponent in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>public net.minecraft.item.ItemStack getIcon()
getIcon in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>public void drawInstance(net.minecraft.item.ItemStack instance,
long maxQuantity,
@Nullable
java.lang.String label,
net.minecraft.client.gui.inventory.GuiContainer gui,
GuiTerminalStorage.DrawLayer layer,
float partialTick,
int x,
int y,
int mouseX,
int mouseY,
@Nullable
java.util.List<java.lang.String> additionalTooltipLines)
IIngredientComponentTerminalStorageHandlerdrawInstance in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>instance - An instance.maxQuantity - The maximum allowed quantity of the given instance.label - An optional label that should be rendered instead of the quantity.gui - A gui to render in.layer - The layer to render in.partialTick - The partial tick.x - The slot X position.y - The slot Y position.mouseX - The mouse X position.mouseY - The mouse Y position.additionalTooltipLines - The additional tooltip lines to add.public java.lang.String formatQuantity(net.minecraft.item.ItemStack instance)
IIngredientComponentTerminalStorageHandlerformatQuantity in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>instance - An instance.public boolean isInstance(net.minecraft.item.ItemStack itemStack)
IIngredientComponentTerminalStorageHandlerisInstance in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>itemStack - An item.public net.minecraft.item.ItemStack getInstance(net.minecraft.item.ItemStack itemStack)
IIngredientComponentTerminalStorageHandlergetInstance in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>itemStack - An item.public long getMaxQuantity(net.minecraft.item.ItemStack itemStack)
IIngredientComponentTerminalStorageHandlergetMaxQuantity in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>itemStack - An item.public int getInitialInstanceMovementQuantity()
getInitialInstanceMovementQuantity in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>public int getIncrementalInstanceMovementQuantity()
getIncrementalInstanceMovementQuantity in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>public int throwIntoWorld(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<net.minecraft.item.ItemStack,java.lang.Integer> storage,
net.minecraft.item.ItemStack maxInstance,
net.minecraft.entity.player.EntityPlayer player)
IIngredientComponentTerminalStorageHandlerthrowIntoWorld in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>storage - The storage to extract from.maxInstance - The instance to throw.player - The throwing player.public net.minecraft.item.ItemStack insertIntoContainer(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<net.minecraft.item.ItemStack,java.lang.Integer> storage,
net.minecraft.inventory.Container container,
int containerSlotIndex,
net.minecraft.item.ItemStack maxInstance,
@Nullable
net.minecraft.entity.player.EntityPlayer player,
boolean transferFullSelection)
IIngredientComponentTerminalStorageHandlerinsertIntoContainer in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>storage - The storage to extract from.container - The container to insert to.containerSlotIndex - The container slot to insert to.maxInstance - The instance to move.player - The player. If null, the container slot will not be picked up by the player if not empty.public void extractActiveStackFromPlayerInventory(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<net.minecraft.item.ItemStack,java.lang.Integer> storage,
net.minecraft.entity.player.InventoryPlayer playerInventory,
long moveQuantityPlayerSlot)
IIngredientComponentTerminalStorageHandlerextractActiveStackFromPlayerInventory in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>storage - The storage to insert to.playerInventory - The player inventory to extract from.moveQuantityPlayerSlot - The player stack quantity that should be extracted.public void extractMaxFromContainerSlot(org.cyclops.commoncapabilities.api.ingredient.storage.IIngredientComponentStorage<net.minecraft.item.ItemStack,java.lang.Integer> storage,
net.minecraft.inventory.Container container,
int containerSlot)
IIngredientComponentTerminalStorageHandlerextractMaxFromContainerSlot in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>storage - The storage to insert to.container - The container to insert to.containerSlot - The container slot to insert to.public long getActivePlayerStackQuantity(net.minecraft.entity.player.InventoryPlayer playerInventory)
IIngredientComponentTerminalStorageHandlergetActivePlayerStackQuantity in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>playerInventory - The player inventory.public void drainActivePlayerStackQuantity(net.minecraft.entity.player.InventoryPlayer playerInventory,
long quantity)
IIngredientComponentTerminalStorageHandlerdrainActivePlayerStackQuantity in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>playerInventory - The player inventory.quantity - The quantity to drain.public java.util.function.Predicate<net.minecraft.item.ItemStack> getInstanceFilterPredicate(SearchMode searchMode, java.lang.String query)
IIngredientComponentTerminalStorageHandlergetInstanceFilterPredicate in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>searchMode - The mode to search underquery - A query string.public java.util.Collection<IIngredientInstanceSorter<net.minecraft.item.ItemStack>> getInstanceSorters()
getInstanceSorters in interface IIngredientComponentTerminalStorageHandler<net.minecraft.item.ItemStack,java.lang.Integer>