public class CraftingTransaction extends InventoryTransaction
| Modifier and Type | Field and Description |
|---|---|
protected int |
gridSize |
protected Item[][] |
inputs |
protected Item |
primaryOutput |
protected CraftingRecipe |
recipe |
protected Item[][] |
secondaryOutputs |
actions, hasExecuted, inventories, source| Constructor and Description |
|---|
CraftingTransaction(Player source,
List<InventoryAction> actions) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
callExecuteEvent() |
boolean |
canExecute() |
boolean |
execute() |
Item[][] |
getInputMap() |
Item |
getPrimaryOutput() |
CraftingRecipe |
getRecipe() |
protected void |
sendInventories() |
void |
setExtraOutput(int index,
Item item) |
void |
setInput(int index,
Item item) |
void |
setPrimaryOutput(Item item) |
addAction, addInventory, getActions, getCreationTime, getInventories, getSource, hasExecuted, init, matchItems, squashDuplicateSlotChangesprotected int gridSize
protected Item[][] inputs
protected Item[][] secondaryOutputs
protected Item primaryOutput
protected CraftingRecipe recipe
public CraftingTransaction(Player source, List<InventoryAction> actions)
public void setInput(int index,
Item item)
public Item[][] getInputMap()
public void setExtraOutput(int index,
Item item)
public Item getPrimaryOutput()
public void setPrimaryOutput(Item item)
public CraftingRecipe getRecipe()
public boolean canExecute()
canExecute in class InventoryTransactionprotected boolean callExecuteEvent()
callExecuteEvent in class InventoryTransactionprotected void sendInventories()
sendInventories in class InventoryTransactionpublic boolean execute()
execute in class InventoryTransactionCopyright © 2020. All rights reserved.