Parts/Materials both now have better registration, and both use DamageValues.

This commit is contained in:
AlgorithmX2
2014-01-03 12:30:08 -06:00
parent 3220a2e07c
commit 35a21d472f
5 changed files with 168 additions and 41 deletions
+17
View File
@@ -3,6 +3,7 @@ package appeng.core;
import java.io.File;
import java.util.EnumSet;
import net.minecraftforge.common.Property;
import appeng.api.config.CondenserOuput;
import appeng.api.config.PowerUnits;
import appeng.api.config.Settings;
@@ -155,6 +156,22 @@ public class Configuration extends net.minecraftforge.common.Configuration imple
super.save();
}
public int getFreeMaterial()
{
int min = 0;
for (Property p : getCategory( "materials" ).getValues().values())
min = Math.max( min, p.getInt() + 1 );
return min;
}
public int getFreePart()
{
int min = 0;
for (Property p : getCategory( "parts" ).getValues().values())
min = Math.max( min, p.getInt() + 1 );
return min;
}
@Override
public IConfigManager getConfigManager()
{