From a21133dd24f52a91df52bd2f520e3e0bdf6d87bd Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Tue, 27 Dec 2016 18:44:16 +1000 Subject: + Added Fluorite to FLUORIDES.java. + Added Macerator recipe for Fluorite Ore to Fluorite Dust. $ Rewrote large portions of the multitool mining logic. % Made Fluorite ore drop 50% more often. % Changed ore textures back to being single layer, for now. % Changed logging for multi picks to debug mode. --- .../gtPlusPlus/core/util/player/UtilsMining.java | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/Java/gtPlusPlus/core/util') diff --git a/src/Java/gtPlusPlus/core/util/player/UtilsMining.java b/src/Java/gtPlusPlus/core/util/player/UtilsMining.java index 1b6b957b32..9147f4195c 100644 --- a/src/Java/gtPlusPlus/core/util/player/UtilsMining.java +++ b/src/Java/gtPlusPlus/core/util/player/UtilsMining.java @@ -140,13 +140,28 @@ public class UtilsMining { } - public static boolean getBlockType(Block block){ + public static boolean getBlockType(Block block, World world, int[] xyz, int miningLevel){ final String LIQUID = "liquid"; final String BLOCK = "block"; final String ORE = "ore"; final String AIR = "air"; String blockClass = ""; + if (world.isRemote){ + return false; + } + + if (block == Blocks.end_stone) return true; + if (block == Blocks.stone) return true; + if (block == Blocks.sandstone) return true; + if (block == Blocks.netherrack) return true; + if (block == Blocks.nether_brick) return true; + if (block == Blocks.nether_brick_stairs) return true; + if (block == Blocks.nether_brick_fence) return true; + if (block == Blocks.glowstone) return true; + + + try { blockClass = block.getClass().toString().toLowerCase(); Utils.LOG_WARNING(blockClass); @@ -158,6 +173,10 @@ public class UtilsMining { Utils.LOG_WARNING(block.toString()+" is an Ore."); return true; } + else if (block.getHarvestLevel(world.getBlockMetadata(xyz[0], xyz[1], xyz[2])) >= miningLevel){ + Utils.LOG_WARNING(block.toString()+" is minable."); + return true; + } else if (blockClass.toLowerCase().contains(AIR)){ Utils.LOG_WARNING(block.toString()+" is Air."); return false; -- cgit