diff --git a/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java b/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java index 6c2af1c9..62f8f6f5 100644 --- a/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java +++ b/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java @@ -31,17 +31,13 @@ public interface IChiselItem { * * @param world * {@link World} object - * @param inv - * The inventory this chisel is currently in - * @param slot - * The slot index of the chisel in the inventory * @param chisel * The {@link ItemStack} representing the chisel * @param target * The {@link ItemStack} representing the target item * @return True if the chisel should be damaged. False otherwise. */ - boolean onChisel(World world, IInventory inv, int slot, ItemStack chisel, ICarvingVariation target); + boolean onChisel(World world, ItemStack chisel, ICarvingVariation target); /** * Called to check if this {@link ItemStack} can be chiseled in this chisel. If not, there will be no possible variants displayed in the GUI. diff --git a/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java b/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java index bc2c662e..94269c48 100644 --- a/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java +++ b/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java @@ -210,7 +210,7 @@ public class TileEntityAutoChisel extends TileEntity implements ISidedInventory private void chiselItem(int chiseled) { if (!worldObj.isRemote) { boolean breakChisel = false; - if (((IChiselItem) inventory[CHISEL].getItem()).onChisel(worldObj, this, CHISEL, inventory[CHISEL], General.getVariation(inventory[TARGET]))) { + if (((IChiselItem) inventory[CHISEL].getItem()).onChisel(worldObj, inventory[CHISEL], General.getVariation(inventory[TARGET]))) { inventory[CHISEL].setItemDamage(inventory[CHISEL].getItemDamage() + 1); if (inventory[CHISEL].getItemDamage() >= inventory[CHISEL].getMaxDamage()) { setInventorySlotContents(CHISEL, null); diff --git a/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java b/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java index f40f4c0f..3b2b6f35 100644 --- a/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java +++ b/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java @@ -60,7 +60,7 @@ public class SlotChiselSelection extends Slot { selInventory.updateItems(); - if (((IChiselItem) container.chisel.getItem()).onChisel(player.worldObj, player.inventory, player.inventory.currentItem, container.chisel, General.getVariation(crafted))) { + if (((IChiselItem) container.chisel.getItem()).onChisel(player.worldObj, container.chisel, General.getVariation(crafted))) { container.chisel.damageItem(1, player); if (container.chisel.stackSize <= 0) { player.inventory.mainInventory[player.inventory.currentItem] = null; diff --git a/src/main/java/com/cricketcraft/chisel/item/chisel/ChiselMode.java b/src/main/java/com/cricketcraft/chisel/item/chisel/ChiselMode.java index 6efcab48..b58129b2 100644 --- a/src/main/java/com/cricketcraft/chisel/item/chisel/ChiselMode.java +++ b/src/main/java/com/cricketcraft/chisel/item/chisel/ChiselMode.java @@ -105,7 +105,7 @@ public enum ChiselMode { if (held != null && held.getItem() instanceof IChiselItem) { world.setBlock(x, y, z, v.getBlock(), v.getBlockMeta(), 3); boolean breakChisel = false; - if (((IChiselItem) player.getCurrentEquippedItem().getItem()).onChisel(world, player.inventory, player.inventory.currentItem, player.getCurrentEquippedItem(), v)) { + if (((IChiselItem) player.getCurrentEquippedItem().getItem()).onChisel(world, player.getCurrentEquippedItem(), v)) { player.getCurrentEquippedItem().damageItem(1, player); if (player.getCurrentEquippedItem().stackSize <= 0) { player.inventory.mainInventory[player.inventory.currentItem] = null; diff --git a/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java b/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java index 496543a6..91d8f569 100644 --- a/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java +++ b/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java @@ -111,7 +111,7 @@ public class ItemChisel extends Item implements IChiselItem { } @Override - public boolean onChisel(World world, IInventory inv, int slot, ItemStack chisel, ICarvingVariation target) { + public boolean onChisel(World world, ItemStack chisel, ICarvingVariation target) { return Configurations.allowChiselDamage; }