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.
|
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
public 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 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)