Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ContainerMagicalAnvilAdd(TileEntityMagicalAnvil tileEntityMagicalAnvil, EntityPlayer player) {
- this.inventory = player.inventory;
- this.tile = tileEntityMagicalAnvil;
- this.theWorld = player.worldObj;
- tile.markDirty();
- bindPlayerInventory();
- this.addSlotToContainer(new SingleItemSlot(inputSlots, 0, 69, 60));
- this.addSlotToContainer(new RuneItemSlot(inputSlots, 1, 25, 61));
- this.addSlotToContainer(new RuneItemSlot(inputSlots, 2, 109, 61));
- this.addSlotToContainer(new RuneItemSlot(inputSlots, 3, 68, 104));
- this.addSlotToContainer(new RuneItemSlot(inputSlots, 4, 69, 20));
- this.addSlotToContainer(new Slot(this.outputSlot, 5, 152, 60){
- public boolean isItemValid(ItemStack stack)
- {
- return false;
- }
- public boolean canTakeStack(EntityPlayer player)
- {
- return (player.capabilities.isCreativeMode || player.experienceLevel >= ContainerMagicalAnvilAdd.this.maximumCost) && ContainerMagicalAnvilAdd.this.maximumCost > 0 && this.getHasStack();
- }
- public void onPickupFromSlot(EntityPlayer player, ItemStack stack)
- {
- if (!player.capabilities.isCreativeMode)
- {
- player.addExperienceLevel(-ContainerMagicalAnvilAdd.this.maximumCost);
- }
- ContainerMagicalAnvilAdd.this.inputSlots.setInventorySlotContents(0, (ItemStack)null);
- ContainerMagicalAnvilAdd.this.inputSlots.setInventorySlotContents(1, (ItemStack)null);
- ContainerMagicalAnvilAdd.this.inputSlots.setInventorySlotContents(2, (ItemStack)null);
- ContainerMagicalAnvilAdd.this.inputSlots.setInventorySlotContents(3, (ItemStack)null);
- ContainerMagicalAnvilAdd.this.inputSlots.setInventorySlotContents(4, (ItemStack)null);
- }
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement