mirror of
https://github.com/GTNewHorizons/IguanaTweaksTConstruct.git
synced 2026-11-26 14:53:02 +00:00
Remove Emerald/Diamond modifier changes
This commit is contained in:
1 parent
cc24456ede
commit
dffcdd6305
1 file changed
-19
-19
@@ -43,25 +43,6 @@ public class IguanaHarvestLevelTweaks {
|
||||
{
|
||||
// the only thing this does is replacing GUIs with our own GUIs to display the correct harvest levels
|
||||
proxy.initialize();
|
||||
|
||||
// Remove Mininglevel-boost from diamond and emerald modifier.
|
||||
// We use reflection for that. Although that's quite.. meh it means any changes to tconstruct are registered and we don't have to do localization separately
|
||||
|
||||
try {
|
||||
Log.info("Removing Mininglevel from Diamond/Emerald Modifier");
|
||||
Field maxLevel = ModDurability.class.getDeclaredField("miningLevel");
|
||||
for (ItemModifier mod : ModifyBuilder.instance.itemModifiers) {
|
||||
if (!(mod instanceof ModDurability))
|
||||
continue;
|
||||
|
||||
maxLevel.setAccessible(true);
|
||||
maxLevel.set((ModDurability)mod, 0);
|
||||
}
|
||||
} catch (NoSuchFieldException e) {
|
||||
Log.error(e.getMessage());
|
||||
} catch (IllegalAccessException e) {
|
||||
Log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Handler
|
||||
|
||||
Reference in new issue
Block a user