Removed Inventory and Slot parameters

This commit is contained in:
Cricket committed 2015-01-20 18:13:59 -05:00
1 parent df7eb813c0
commit 9d91c64485
5 files changed
+5 -9

No files matched your search

@@ -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.
@@ -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);
@@ -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;
@@ -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;
@@ -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;
}