From ec4e6b010f07a1713bc9ee90baba5ecc21f5e278 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Sat, 2 Aug 2014 11:18:14 +0200 Subject: [PATCH] Remove toolmaterial workaround since the tconstruct bug is fixed in the newer version. :) --- .../harvestlevels/TinkerToolTweaks.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/java/iguanaman/iguanatweakstconstruct/harvestlevels/TinkerToolTweaks.java b/src/main/java/iguanaman/iguanatweakstconstruct/harvestlevels/TinkerToolTweaks.java index 304a0d5..6147bc7 100644 --- a/src/main/java/iguanaman/iguanatweakstconstruct/harvestlevels/TinkerToolTweaks.java +++ b/src/main/java/iguanaman/iguanatweakstconstruct/harvestlevels/TinkerToolTweaks.java @@ -88,15 +88,7 @@ public abstract class TinkerToolTweaks { if(id > -1) { TConstructRegistry.toolMaterials.remove(id); TConstructRegistry.toolMaterialStrings.remove(old.materialName); - // todo: uncomment once the bug that it always adds null is fixed - //TConstructRegistry.addtoolMaterial(id, newMaterial); - if(TConstructRegistry.toolMaterials.containsKey(id)) - throw new IllegalArgumentException("[TCon API] Material ID " + id + " is already occupied"); - TConstructRegistry.toolMaterials.put(id, newMaterial); - TConstructRegistry.toolMaterialStrings.put(newMaterial.name(), newMaterial); - - if(Config.logToolMaterialChanges) - Log.debug(String.format("Modified tool material %d: %s (level: %d, durability: %d, speed: %d)", id, old.name(), harvestLevel, durability, speed)); + TConstructRegistry.addtoolMaterial(id, newMaterial); } else Log.error("Couldn't find ToolMaterial ID for " + old.name());