public class ContainerRepair extends Container
| Modifier and Type | Field and Description |
|---|---|
int |
materialCost
determined by damage of input item and stackSize of repair materials
|
int |
maximumCost
The maximum cost of repairing/renaming in the anvil.
|
inventoryItemStacks, inventorySlots, listeners, 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 |
|---|---|
void |
addListener(IContainerListener listener) |
boolean |
canInteractWith(EntityPlayer playerIn)
Determines whether supplied player can use this container
|
void |
onContainerClosed(EntityPlayer playerIn)
Called when the container is closed.
|
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, getCanCraft, getDragEvent, getInventory, getNextTransactionID, getQuickcraftMask, getSlot, getSlotFromInventory, isValidDragMode, mergeItemStack, putStackInSlot, removeListener, resetDrag, retrySlotClick, setAll, setCanCraft, slotClickpublic int maximumCost
public int materialCost
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 Containerpublic void updateRepairOutput()
public void addListener(IContainerListener listener)
addListener in class Containerpublic void updateProgressBar(int id,
int data)
updateProgressBar in class Containerpublic void onContainerClosed(EntityPlayer playerIn)
onContainerClosed in class Containerpublic boolean canInteractWith(EntityPlayer playerIn)
canInteractWith in class Containerpublic ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
transferStackInSlot in class Containerpublic void updateItemName(java.lang.String newName)