Merge branch 'master' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into rv1
This commit is contained in:
+29
-9
@@ -236,20 +236,40 @@ public class AEConfig extends Configuration implements IConfigureableObject, ICo
|
||||
super.save();
|
||||
}
|
||||
|
||||
public int getFreeMaterial()
|
||||
public int getFreeIDSLot(int varID, String Category)
|
||||
{
|
||||
boolean alreadyUsed = false;
|
||||
int min = 0;
|
||||
for (Property p : getCategory( "materials" ).getValues().values())
|
||||
min = Math.max( min, p.getInt() + 1 );
|
||||
return min;
|
||||
|
||||
for (Property p : getCategory( Category ).getValues().values())
|
||||
{
|
||||
int thisInt = p.getInt();
|
||||
|
||||
if ( varID == thisInt )
|
||||
alreadyUsed = true;
|
||||
|
||||
min = Math.max( min, thisInt + 1 );
|
||||
}
|
||||
|
||||
if ( alreadyUsed )
|
||||
{
|
||||
if ( min < 1000 )
|
||||
min = 1000;
|
||||
|
||||
return min;
|
||||
}
|
||||
|
||||
return varID;
|
||||
}
|
||||
|
||||
public int getFreePart()
|
||||
public int getFreeMaterial(int varID)
|
||||
{
|
||||
int min = 0;
|
||||
for (Property p : getCategory( "parts" ).getValues().values())
|
||||
min = Math.max( min, p.getInt() + 1 );
|
||||
return min;
|
||||
return getFreeIDSLot( varID, "materials" );
|
||||
}
|
||||
|
||||
public int getFreePart(int varID)
|
||||
{
|
||||
return getFreeIDSLot( varID, "parts" );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-34
@@ -10,7 +10,6 @@ import appeng.core.sync.GuiBridge;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.hooks.TickHandler;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationSide;
|
||||
import appeng.server.AECommand;
|
||||
import appeng.services.Profiler;
|
||||
import appeng.services.VersionChecker;
|
||||
@@ -65,43 +64,14 @@ public class AppEng
|
||||
FMLCommonHandler.instance().registerCrashCallable( new CrashEnhancement( ci ) );
|
||||
}
|
||||
|
||||
private IntegrationRegistry integrationModules = new IntegrationRegistry( new Object[] {
|
||||
|
||||
/**
|
||||
* Side, Display Name, ModID ClassPostFix
|
||||
*/
|
||||
IntegrationSide.BOTH, "Industrial Craft 2", "IC2", "IC2", // IC2
|
||||
// IntegrationSide.BOTH, "Railcraft", "Railcraft", "RC", // RC
|
||||
// IntegrationSide.BOTH, "Thermal Expansion", "ThermalExpansion", "TE", // TE
|
||||
// IntegrationSide.BOTH, "Mystcraft", "Mystcraft", "Mystcraft", // MC
|
||||
IntegrationSide.BOTH, "BuildCraft", "BuildCraft|Silicon", "BC", // BC
|
||||
IntegrationSide.BOTH, "BuildCraft Power", null, "MJ", // BC
|
||||
// IntegrationSide.BOTH, "Greg Tech", "gregtech_addon", "GT", // GT
|
||||
// IntegrationSide.BOTH, "Universal Electricity", null, "UE", // UE
|
||||
// IntegrationSide.BOTH, "Logistics Pipes", "LogisticsPipes|Main", "LP", // LP
|
||||
// IntegrationSide.CLIENT, "Inventory Tweaks", "", "InvTweaks", // InvTweaks
|
||||
// IntegrationSide.BOTH, "Mine Factory Reloaded", "MineFactoryReloaded", "MFR", // MFR
|
||||
IntegrationSide.BOTH, "Deep Storage Unit", null, "DSU", // DSU
|
||||
// IntegrationSide.BOTH, "Better Storage", "betterstorage", "BS", // BS
|
||||
IntegrationSide.BOTH, "Factorization", "factorization", "FZ", // FZ
|
||||
// IntegrationSide.BOTH, "Forestry", "Forestry", "Forestry", // Forestry
|
||||
// IntegrationSide.BOTH, "Mekanism", "Mekanism", "Mekanism", // MeK
|
||||
IntegrationSide.CLIENT, "Waila", "Waila", "Waila", // Waila
|
||||
IntegrationSide.BOTH, "Rotatable Blocks", "RotatableBlocks", "RB", // RB
|
||||
IntegrationSide.CLIENT, "Inventory Tweaks", "inventorytweaks", "InvTweaks", // INV
|
||||
IntegrationSide.CLIENT, "Not Enough Items", "NotEnoughItems", "NEI", // NEI
|
||||
IntegrationSide.CLIENT, "Craft Guide", "craftguide", "CraftGuide", // CraftGuide
|
||||
IntegrationSide.BOTH, "Forge MultiPart", "McMultipart", "FMP" // FMP
|
||||
} );
|
||||
|
||||
public boolean isIntegrationEnabled(String Name)
|
||||
{
|
||||
return integrationModules.isEnabled( Name );
|
||||
return IntegrationRegistry.instance.isEnabled( Name );
|
||||
}
|
||||
|
||||
public Object getIntegration(String Name)
|
||||
{
|
||||
return integrationModules.getInstance( Name );
|
||||
return IntegrationRegistry.instance.getInstance( Name );
|
||||
}
|
||||
|
||||
private void startService(String serviceName, Thread thread)
|
||||
@@ -154,7 +124,7 @@ public class AppEng
|
||||
AELog.info( "Init" );
|
||||
|
||||
Registration.instance.Init( event );
|
||||
integrationModules.init();
|
||||
IntegrationRegistry.instance.init();
|
||||
|
||||
AELog.info( "Init ( end " + star.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
|
||||
}
|
||||
@@ -166,7 +136,7 @@ public class AppEng
|
||||
AELog.info( "PostInit" );
|
||||
|
||||
Registration.instance.PostInit( event );
|
||||
integrationModules.postinit();
|
||||
IntegrationRegistry.instance.postinit();
|
||||
|
||||
AEConfig.instance.save();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user