public class ContainerRepair extends Container
Modifier and Type | Field and Description |
---|---|
private IInventory |
inputSlots
The 2slots where you put your items in that you want to merge and/or rename.
|
private static org.apache.logging.log4j.Logger |
logger |
private int |
materialCost
determined by damage of input item and stackSize of repair materials
|
int |
maximumCost
The maximum cost of repairing/renaming in the anvil.
|
private IInventory |
outputSlot
Here comes out item you merged and/or renamed.
|
private java.lang.String |
repairedItemName |
private BlockPos |
selfPosition |
private EntityPlayer |
thePlayer
The player that has this container open.
|
private World |
theWorld |
crafters, inventoryItemStacks, inventorySlots, windowId
Constructor and Description |
---|
ContainerRepair(InventoryPlayer playerInventory,
World worldIn,
BlockPos blockPosIn,
EntityPlayer player) |
ContainerRepair(InventoryPlayer playerInventory,
World worldIn,
EntityPlayer player) |
Modifier and Type | Method and Description |
---|---|
boolean |
canInteractWith(EntityPlayer playerIn) |
void |
onContainerClosed(EntityPlayer playerIn)
Called when the container is closed.
|
void |
onCraftGuiOpened(ICrafting listener) |
void |
onCraftMatrixChanged(IInventory inventoryIn)
Callback for when the crafting matrix is changed.
|
ItemStack |
transferStackInSlot(EntityPlayer playerIn,
int index)
Take a stack from the specified inventory slot.
|
void |
updateItemName(java.lang.String newName)
used by the Anvil GUI to update the Item Name being typed by the player
|
void |
updateProgressBar(int id,
int data) |
void |
updateRepairOutput()
called when the Anvil Input Slot changes, calculates the new result and puts it in the output slot
|
addSlotToContainer, calcRedstone, calcRedstoneFromInventory, canAddItemToSlot, canDragIntoSlot, canMergeSlot, computeStackSize, detectAndSendChanges, enchantItem, extractDragMode, func_94534_d, getCanCraft, getDragEvent, getInventory, getNextTransactionID, getSlot, getSlotFromInventory, isValidDragMode, mergeItemStack, putStackInSlot, putStacksInSlots, removeCraftingFromCrafters, resetDrag, retrySlotClick, setCanCraft, slotClick
private static final org.apache.logging.log4j.Logger logger
private IInventory outputSlot
private IInventory inputSlots
private World theWorld
private BlockPos selfPosition
public int maximumCost
private int materialCost
private java.lang.String repairedItemName
private final EntityPlayer thePlayer
public ContainerRepair(InventoryPlayer playerInventory, World worldIn, EntityPlayer player)
public ContainerRepair(InventoryPlayer playerInventory, World worldIn, BlockPos blockPosIn, EntityPlayer player)
public void onCraftMatrixChanged(IInventory inventoryIn)
onCraftMatrixChanged
in class Container
public void updateRepairOutput()
public void onCraftGuiOpened(ICrafting listener)
onCraftGuiOpened
in class Container
public void updateProgressBar(int id, int data)
updateProgressBar
in class Container
public void onContainerClosed(EntityPlayer playerIn)
onContainerClosed
in class Container
public boolean canInteractWith(EntityPlayer playerIn)
canInteractWith
in class Container
public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
transferStackInSlot
in class Container
public void updateItemName(java.lang.String newName)