Merge pull request #134 from Mitchellbrine/patch-1

Added the tool required to break road lines (Fixes #78)
This commit is contained in:
Cricket committed 2015-01-11 12:51:10 -08:00
commit 73648bae93
2 files changed
+14

No files matched your search

@@ -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,6 +20,9 @@ public class BlockRoadLine extends Block {
public BlockRoadLine() {
super(Material.circuits);
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);
}
@@ -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();
}