fix tools not checking harvest type on block breaking

This commit is contained in:
Progwml6 committed 2014-02-14 22:50:51 -05:00
1 parent e707916612
commit a8d8a568fa
3 files changed
+10 -7

No files matched your search

-3
View File
@@ -87,9 +87,6 @@ public class TConstruct
public TConstruct()
{
LoggerConfig fml = new LoggerConfig(FMLCommonHandler.instance().getFMLLogger().getName(), Level.ALL, true);
LoggerConfig modConf = new LoggerConfig(logger.getName(), Level.ALL, true);
modConf.setParent(fml);
//logger.setParent(FMLCommonHandler.instance().getFMLLogger());
if (Loader.isModLoaded("Natura"))
@@ -29,8 +29,12 @@ public abstract class DualHarvestTool extends HarvestTool
Block block = player.worldObj.getBlock(x, y, z);
if (block == null || block == Blocks.air)
return false;
int hlvl = block.getHarvestLevel(meta);
int shlvl = block.getHarvestLevel(meta);
int hlvl = -1;
int shlvl = -1;
if (block.getHarvestTool(meta).equals(getHarvestType()))
hlvl = block.getHarvestLevel(meta);
if (block.getHarvestTool(meta).equals(getSecondHarvestType()))
shlvl = block.getHarvestLevel(meta);
if (hlvl <= tags.getInteger("HarvestLevel") && shlvl <= tags.getInteger("HarvestLevel2"))
{
@@ -33,8 +33,10 @@ public abstract class HarvestTool extends ToolCore
//Block block = Block.blocksList[bID];
if (block == null || block == Blocks.air)
return false;
int hlvl = block.getHarvestLevel(meta);
int hlvl = -1;
if (block.getHarvestTool(meta).equals(getHarvestType()))
hlvl = block.getHarvestLevel(meta);
// int hlvl = MinecraftForge.getBlockHarvestLevel(block, meta, getHarvestType());
if (hlvl <= tags.getInteger("HarvestLevel"))
{
boolean cancelHarvest = false;