Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Fix an edge case with emerald being recognized as incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Mar 18, 2015
1 parent f538eac commit 14ec899
Showing 1 changed file with 12 additions and 11 deletions.
Expand Up @@ -95,18 +95,19 @@ public static boolean toolNeedsUpdating(ItemStack itemStack)
}


// vanilla tcon allows harvestlevel change
if(PHConstruct.miningLevelIncrease)
{
// our own diamond modifier is disabled, but vanilla one is there
if(!Config.changeDiamondModifier || !IguanaTweaksTConstruct.pulsar.isPulseLoaded(Reference.PULSE_HARVESTTWEAKS))
// vanilla tcon allows harvestlevel change
if(PHConstruct.miningLevelIncrease)
{
// was the tool boosted with a diamond?
if(tags.getBoolean("Diamond")) // returns false if tag is not present
return hlvl < HarvestLevels._6_obsidian;
// ...with an emerald?
if(tags.getBoolean("Emerald"))
return hlvl < HarvestLevels._5_diamond;
}
if(!Config.changeDiamondModifier || !IguanaTweaksTConstruct.pulsar.isPulseLoaded(Reference.PULSE_HARVESTTWEAKS)) {
// was the tool boosted with a diamond?
if (tags.getBoolean("Diamond") && hlvl < 3) // returns false if tag is not present
return true;
// ...with an emerald?
if (tags.getBoolean("Emerald") && hlvl < 2)
return true;
}
}


return hlvl != realHlvl;
Expand Down

0 comments on commit 14ec899

Please sign in to comment.