mirror of
https://github.com/GTNewHorizons/IguanaTweaksTConstruct.git
synced 2026-11-25 14:24:44 +00:00
Update all harvest-levels of materials before doing the custom changes so unlisted materials keep their intended harvest level (like Thermal Foundation materials)
This commit is contained in:
1 parent
c011d3b55b
commit
eec9ed5b7a
1 file changed
+13
+13
@@ -1,5 +1,8 @@
|
||||
package iguanaman.iguanatweakstconstruct.harvestlevels;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import iguanaman.iguanatweakstconstruct.reference.Config;
|
||||
@@ -42,6 +45,16 @@ public final class TinkerMaterialTweaks {
|
||||
durabilityMod = Config.durabilityPercentage / 100f;
|
||||
speedMod = Config.miningSpeedPercentage / 100f;
|
||||
|
||||
// at first we update each material to keep the harvest levels on non-listed materials appropriate
|
||||
Collection<ToolMaterial> copyOfMaterials = new HashSet<ToolMaterial>(TConstructRegistry.toolMaterials.values());
|
||||
for(ToolMaterial material : copyOfMaterials)
|
||||
{
|
||||
// new harvest level
|
||||
int newHlvl = HarvestLevelTweaks.getUpdatedHarvestLevel(material.harvestLevel());
|
||||
|
||||
updateMaterial(newHlvl, material.name(), material.durability(), material.toolSpeed(), material.attack(), material.handleDurability());
|
||||
}
|
||||
|
||||
// modify the base materials added by tinkers construct
|
||||
modifyTcon();
|
||||
if(ModSupportHelper.ExtraTiC)
|
||||
|
||||
Reference in new issue
Block a user