diff --git a/src/main/java/com/cricketcraft/chisel/Features.java b/src/main/java/com/cricketcraft/chisel/Features.java index 20e294af..3807628e 100644 --- a/src/main/java/com/cricketcraft/chisel/Features.java +++ b/src/main/java/com/cricketcraft/chisel/Features.java @@ -143,7 +143,7 @@ public enum Features { @Override void addRecipes() { - // TODO Add a recipe + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.antiBlock, 8, 0), "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustGlowstone")); } @Override @@ -705,6 +705,11 @@ public enum Features { futura.carverHelper.registerAll(futura, "futura"); Carving.chisel.registerOre("futura", "futura"); } + + @Override + void addRecipes(){ + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.futura, 8, 0), "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustRedstone")); + } }, GLASS { diff --git a/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java b/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java index 62f8f6f5..9dbc433f 100644 --- a/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java +++ b/src/main/java/com/cricketcraft/chisel/api/IChiselItem.java @@ -2,7 +2,6 @@ package com.cricketcraft.chisel.api; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -34,7 +33,7 @@ public interface IChiselItem { * @param chisel * The {@link ItemStack} representing the chisel * @param target - * The {@link ItemStack} representing the target item + * The {@link ICarvingVariation} representing the target item * @return True if the chisel should be damaged. False otherwise. */ boolean onChisel(World world, ItemStack chisel, ICarvingVariation target); @@ -46,17 +45,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 + * The {@link ICarvingVariation} representing the target item * @return True if the current target can be chiseled into anything. False otherwise. */ - boolean canChisel(World world, IInventory inv, int slot, ItemStack chisel, ItemStack target); + boolean canChisel(World world, ItemStack chisel, ICarvingVariation target); /** * Allows you to control if your item can chisel this block in the world. diff --git a/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java b/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java index c219b3b0..317c75b8 100644 --- a/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java +++ b/src/main/java/com/cricketcraft/chisel/api/carving/CarvingUtils.java @@ -1,7 +1,5 @@ package com.cricketcraft.chisel.api.carving; -import com.cricketcraft.chisel.carving.Carving; - import net.minecraft.item.ItemStack; public class CarvingUtils { 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 94269c48..a4baac9b 100644 --- a/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java +++ b/src/main/java/com/cricketcraft/chisel/block/tileentity/TileEntityAutoChisel.java @@ -15,7 +15,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.StatCollector; import com.cricketcraft.chisel.api.IChiselItem; -import com.cricketcraft.chisel.api.carving.CarvingUtils; import com.cricketcraft.chisel.carving.Carving; import com.cricketcraft.chisel.client.GeneralChiselClient; import com.cricketcraft.chisel.init.ChiselItems; diff --git a/src/main/java/com/cricketcraft/chisel/inventory/InventoryChiselSelection.java b/src/main/java/com/cricketcraft/chisel/inventory/InventoryChiselSelection.java index ffc34e94..4751c3e9 100644 --- a/src/main/java/com/cricketcraft/chisel/inventory/InventoryChiselSelection.java +++ b/src/main/java/com/cricketcraft/chisel/inventory/InventoryChiselSelection.java @@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack; import com.cricketcraft.chisel.api.IChiselItem; import com.cricketcraft.chisel.item.chisel.ItemChisel; +import com.cricketcraft.chisel.utils.General; public class InventoryChiselSelection implements IInventory { @@ -120,7 +121,7 @@ public class InventoryChiselSelection implements IInventory { if (Block.getBlockFromItem(item) == null) return; - if (!((IChiselItem) chisel.getItem()).canChisel(container.playerInventory.player.worldObj, this, container.playerInventory.currentItem, chisel, chiseledItem)) + if (!((IChiselItem) chisel.getItem()).canChisel(container.playerInventory.player.worldObj, chisel, General.getVariation(chiseledItem))) return; ArrayList list = container.carving.getItems(chiseledItem); diff --git a/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java b/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java index 3b2b6f35..2170a7f3 100644 --- a/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java +++ b/src/main/java/com/cricketcraft/chisel/inventory/SlotChiselSelection.java @@ -6,7 +6,6 @@ import net.minecraft.inventory.Slot; import net.minecraft.item.ItemStack; import net.minecraft.util.MathHelper; -import com.cricketcraft.chisel.Chisel; import com.cricketcraft.chisel.api.IChiselItem; import com.cricketcraft.chisel.carving.Carving; import com.cricketcraft.chisel.utils.General; 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 91d8f569..490aefc0 100644 --- a/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java +++ b/src/main/java/com/cricketcraft/chisel/item/chisel/ItemChisel.java @@ -8,7 +8,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; @@ -106,7 +105,7 @@ public class ItemChisel extends Item implements IChiselItem { } @Override - public boolean canChisel(World world, IInventory inv, int slot, ItemStack chisel, ItemStack target) { + public boolean canChisel(World world, ItemStack chisel, ICarvingVariation target) { return true; }