From 4f427aa0cab0e1a65767b1accbcf046c98682da4 Mon Sep 17 00:00:00 2001 From: Mitchellbrine Date: Sun, 11 Jan 2015 11:28:24 -0800 Subject: [PATCH 1/3] Added the tool required to break road lines Set it as a wood pickaxe. Still breaks instantly, but it cannot be broken in Adventure Mode. Can be configured to any tool you desire (except shears, in which case, just make it implement IShearable). --- src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java b/src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java index 40f0e497..a348c54c 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java @@ -19,6 +19,7 @@ public class BlockRoadLine extends Block { public BlockRoadLine() { super(Material.circuits); + this.setHarvestLevel("pickaxe",0); this.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 0.00390625f, 1.0f); // this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F); } From 4fafbc7371c81817226cbba6a540a566e0f05fba Mon Sep 17 00:00:00 2001 From: Mitchellbrine Date: Sun, 11 Jan 2015 11:42:50 -0800 Subject: [PATCH 2/3] Added the config options for the road lines in Configurations --- .../com/cricketcraft/chisel/config/Configurations.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/cricketcraft/chisel/config/Configurations.java b/src/main/java/com/cricketcraft/chisel/config/Configurations.java index c73698c2..aabaf61f 100644 --- a/src/main/java/com/cricketcraft/chisel/config/Configurations.java +++ b/src/main/java/com/cricketcraft/chisel/config/Configurations.java @@ -39,6 +39,10 @@ public class Configurations { public static int diamondChiselMaxDamage; public static boolean ironChiselCanLeftClick; + public static boolean useRoadLineTool; + public static String getRoadLineTool; + public static int roadLineToolLevel; + public static boolean refreshConfig() { String category; @@ -79,6 +83,12 @@ public class Configurations { diamondChiselMaxDamage = config.get(category, "diamondChiselMaxDamage", 5000, "The max damage of the diamond chisel. Default: 5000").getInt(); ironChiselCanLeftClick = config.get(category, "ironChiselCanLeftClick", true, "If this is true, the iron chisel can left click chisel blocks. If false, it cannot.").getBoolean(); + /* block */ + category = "block"; + useRoadLineTool = config.get(category, "useRoadLineTool", false, "Should the road line require a tool to break (If false, road lines can be broken in Adventure)").getBoolean(); + getRoadLineTool = config.get(category, "getRoadLineTool","pickaxe","The tool that is able to break roadLines (requires useRoadLineTool to be true to take effect)").getString(); + roadLineToolLevel = config.get(category, "roadLineToolLevel",0,"The lowest harvest level of the tool able to break the road lines (requires useRoadLineTool to be true to take effect) (0 = Wood/Gold, 1 = Stone, 2 = Iron, 3 = Diamond) Default: 0").getInt(); + if (config.hasChanged()) { config.save(); } From c099172e6f1d215e7f6085bc3888e076f53ab201 Mon Sep 17 00:00:00 2001 From: Mitchellbrine Date: Sun, 11 Jan 2015 11:45:00 -0800 Subject: [PATCH 3/3] Implemented the config options into the RoadLines Using a tool is disabled by default and the tool and tool harvest level can be changed in the config --- .../java/com/cricketcraft/chisel/block/BlockRoadLine.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java b/src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java index a348c54c..6bb2dcc1 100644 --- a/src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java +++ b/src/main/java/com/cricketcraft/chisel/block/BlockRoadLine.java @@ -9,6 +9,7 @@ import net.minecraft.util.IIcon; import net.minecraft.world.World; import com.cricketcraft.chisel.client.render.BlockRoadLineRenderer; +import com.cricketcraft.chisel.config.Configurations; public class BlockRoadLine extends Block { @@ -19,7 +20,9 @@ public class BlockRoadLine extends Block { public BlockRoadLine() { super(Material.circuits); - this.setHarvestLevel("pickaxe",0); + if (Configurations.useRoadLineTool) { + this.setHarvestLevel(Configurations.getRoadLineTool,roadLineToolLevel); + } this.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 0.00390625f, 1.0f); // this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.0625F, 1.0F); }