From 93465884ab7fd474aa3593984a8305be7649bc1b Mon Sep 17 00:00:00 2001 From: Tonius Date: Wed, 14 Jan 2015 11:10:29 +0100 Subject: [PATCH] Un-hardcoded smooth stone chiseling and made it configurable --- src/main/java/com/cricketcraft/chisel/Features.java | 2 ++ src/main/java/com/cricketcraft/chisel/carving/Carving.java | 3 --- .../java/com/cricketcraft/chisel/config/Configurations.java | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/cricketcraft/chisel/Features.java b/src/main/java/com/cricketcraft/chisel/Features.java index 946b1f50..8eca5f10 100644 --- a/src/main/java/com/cricketcraft/chisel/Features.java +++ b/src/main/java/com/cricketcraft/chisel/Features.java @@ -2021,6 +2021,8 @@ public enum Features { void addBlocks() { BlockCarvable stonebricksmooth = (BlockCarvable) new BlockCarvable(Material.rock).setCreativeTab(ChiselTabs.tabStoneChiselBlocks).setHardness(1.5F).setResistance(10.0F) .setStepSound(Block.soundTypeStone); + if (Configurations.allowSmoothStone) + Carving.chisel.addVariation("stonebricksmooth", Blocks.stone, 0, -1); for (int i = 0; i < 4; i++) { if (i == 1) { if (Configurations.allowMossy) diff --git a/src/main/java/com/cricketcraft/chisel/carving/Carving.java b/src/main/java/com/cricketcraft/chisel/carving/Carving.java index 1d6d7e17..1d39af2e 100644 --- a/src/main/java/com/cricketcraft/chisel/carving/Carving.java +++ b/src/main/java/com/cricketcraft/chisel/carving/Carving.java @@ -100,9 +100,6 @@ public class Carving { } public CarvingGroup getGroup(Block block, int metadata) { - if (block.equals(Blocks.stone)) - block = Blocks.stonebrick; - // Check name first CarvingGroup res; int i = OreDictionary.getOreID(block.getUnlocalizedName()); diff --git a/src/main/java/com/cricketcraft/chisel/config/Configurations.java b/src/main/java/com/cricketcraft/chisel/config/Configurations.java index 06b9d95a..dfb63382 100644 --- a/src/main/java/com/cricketcraft/chisel/config/Configurations.java +++ b/src/main/java/com/cricketcraft/chisel/config/Configurations.java @@ -18,6 +18,7 @@ public class Configurations { public static boolean ghostCloud; public static int factoryBlockAmount; public static boolean allowMossy; + public static boolean allowSmoothStone; public static boolean chiselRecipe; public static boolean enableFMP; public static boolean chiselStoneToCobbleBricks; @@ -54,6 +55,7 @@ public class Configurations { ghostCloud = config.get(category, "doesCloudRenderLikeGhost", true).getBoolean(true); factoryBlockAmount = config.get(category, "amountYouGetFromFactoryBlockCrafting", 32).getInt(32); allowMossy = config.get(category, "allowCobbleToMossyInChisel", true).getBoolean(true); + allowSmoothStone = config.get(category, "allowSmoothStoneToStoneBricksAndBack", true).getBoolean(true); chiselRecipe = config.get(category, "chiselAlternateRecipe", false, "Use alternative crafting recipe for the chisel").getBoolean(false); enableFMP = config.get(category, "enableFMP", true, "Do you want to enable FMP").getBoolean(true); chiselStoneToCobbleBricks = config.get(category, "chiselStoneToCobbleBricks", true, "Chisel stone to cobblestone and bricks by left clicking.").getBoolean(false);