From 76a378d12cb4d79aac6e57bfd822c181391f85be Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Tue, 20 Jan 2015 18:26:14 -0500 Subject: [PATCH 1/4] More IChiselItem cleanup and organize imports --- .../java/com/cricketcraft/chisel/api/IChiselItem.java | 11 +++-------- .../cricketcraft/chisel/api/carving/CarvingUtils.java | 2 -- .../chisel/block/tileentity/TileEntityAutoChisel.java | 1 - .../chisel/inventory/InventoryChiselSelection.java | 3 ++- .../chisel/inventory/SlotChiselSelection.java | 1 - .../cricketcraft/chisel/item/chisel/ItemChisel.java | 3 +-- 6 files changed, 6 insertions(+), 15 deletions(-) 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; } From 378453692b503bd673510531f6c22ea231ec7711 Mon Sep 17 00:00:00 2001 From: Cricket Date: Tue, 20 Jan 2015 18:43:51 -0500 Subject: [PATCH 2/4] Recipes added --- src/main/java/com/cricketcraft/chisel/Features.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cricketcraft/chisel/Features.java b/src/main/java/com/cricketcraft/chisel/Features.java index a5fbe32c..8473fa8f 100644 --- a/src/main/java/com/cricketcraft/chisel/Features.java +++ b/src/main/java/com/cricketcraft/chisel/Features.java @@ -142,7 +142,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 @@ -704,6 +704,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 { From 952e98402bf942c724d8f8c220ddc83594e15a95 Mon Sep 17 00:00:00 2001 From: Cricket Date: Tue, 20 Jan 2015 18:44:37 -0500 Subject: [PATCH 3/4] Update changelog --- changelog | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/changelog b/changelog index 89961bbe..fd51d42a 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,14 @@ +2.3: +Fixed issues with stairs +NEI Handler for seeing how to obtain all the blocks +Fixed sand having the wrong sound +Fixed some assorted rendering and lighting issues +Brand new Auto Chisel +Recipes for the upgrades are now available +Brand new Chisel GUI +Added antiblocks +Chisel Modes and left click! + 2.2.2: Diamond Chisel implemented while still retaining the iron chisel if diamond is disabled Added OCD Blocks From 61fc228dd3fe4ec5636b21b616ebe5292708aadb Mon Sep 17 00:00:00 2001 From: Cricket Date: Tue, 20 Jan 2015 19:20:07 -0500 Subject: [PATCH 4/4] oopsy --- src/main/java/com/cricketcraft/chisel/Features.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cricketcraft/chisel/Features.java b/src/main/java/com/cricketcraft/chisel/Features.java index 8473fa8f..b1a06691 100644 --- a/src/main/java/com/cricketcraft/chisel/Features.java +++ b/src/main/java/com/cricketcraft/chisel/Features.java @@ -142,7 +142,7 @@ public enum Features { @Override void addRecipes() { - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.antiBlock), 8, 0, "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustGlowstone")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.antiBlock, 8, 0), "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustGlowstone")); } @Override @@ -707,7 +707,7 @@ public enum Features { @Override void addRecipes(){ - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.futura), 8, 0, "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustRedstone")); + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ChiselBlocks.futura, 8, 0), "SSS", "SGS", "SSS", 'S', "stone", 'G', "dustRedstone")); } },