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, slotClickprivate 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 Containerpublic void updateRepairOutput()
public void onCraftGuiOpened(ICrafting listener)
onCraftGuiOpened 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)