public class ContainerEnchantment extends Container
| Modifier and Type | Field and Description |
|---|---|
int[] |
enchantClue |
int[] |
enchantLevels
3-member array storing the enchantment levels of each slot
|
IInventory |
tableInventory
SlotEnchantmentTable object with ItemStack to be enchanted
|
int[] |
worldClue |
int |
xpSeed |
inventoryItemStacks, inventorySlots, listeners, windowId| Constructor and Description |
|---|
ContainerEnchantment(InventoryPlayer playerInv,
World worldIn) |
ContainerEnchantment(InventoryPlayer playerInv,
World worldIn,
BlockPos pos) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(IContainerListener listener) |
protected void |
broadcastData(IContainerListener crafting) |
boolean |
canInteractWith(EntityPlayer playerIn)
Determines whether supplied player can use this container
|
void |
detectAndSendChanges()
Looks for changes made in the container, sends them to every listener.
|
boolean |
enchantItem(EntityPlayer playerIn,
int id)
Handles the given Button-click on the server, currently only used by enchanting.
|
int |
getLapisAmount() |
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 |
updateProgressBar(int id,
int data) |
addSlotToContainer, calcRedstone, calcRedstoneFromInventory, canAddItemToSlot, canDragIntoSlot, canMergeSlot, computeStackSize, extractDragMode, getCanCraft, getDragEvent, getInventory, getNextTransactionID, getQuickcraftMask, getSlot, getSlotFromInventory, isValidDragMode, mergeItemStack, putStackInSlot, removeListener, resetDrag, retrySlotClick, setAll, setCanCraft, slotClickpublic IInventory tableInventory
public int xpSeed
public int[] enchantLevels
public int[] enchantClue
public int[] worldClue
public ContainerEnchantment(InventoryPlayer playerInv, World worldIn)
public ContainerEnchantment(InventoryPlayer playerInv, World worldIn, BlockPos pos)
protected void broadcastData(IContainerListener crafting)
public void addListener(IContainerListener listener)
addListener in class Containerpublic void detectAndSendChanges()
detectAndSendChanges in class Containerpublic void updateProgressBar(int id,
int data)
updateProgressBar in class Containerpublic void onCraftMatrixChanged(IInventory inventoryIn)
onCraftMatrixChanged in class Containerpublic boolean enchantItem(EntityPlayer playerIn, int id)
enchantItem in class Containerpublic int getLapisAmount()
public 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 Container