Merge branch 'master' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into rv1
This commit is contained in:
commit
faad4a6ba2
6 changed files with 55 additions and 33 deletions
|
@ -217,6 +217,10 @@ public class Registration
|
|||
for (MaterialType mat : MaterialType.values())
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( mat == MaterialType.InvalidType )
|
||||
((ItemMultiMaterial) materialItem.item()).createMaterial( mat );
|
||||
else
|
||||
{
|
||||
Field f = materialClass.getField( "material" + mat.name() );
|
||||
ItemStackSrc is = ((ItemMultiMaterial) materialItem.item()).createMaterial( mat );
|
||||
|
@ -225,6 +229,7 @@ public class Registration
|
|||
else
|
||||
f.set( materials, new NullItemDefinition() );
|
||||
}
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
AELog.severe( "Error creating material: " + mat.name() );
|
||||
|
@ -238,6 +243,10 @@ public class Registration
|
|||
for (PartType type : PartType.values())
|
||||
{
|
||||
try
|
||||
{
|
||||
if ( type == PartType.InvalidType )
|
||||
((ItemMultiPart) partItem.item()).createPart( type, null );
|
||||
else
|
||||
{
|
||||
Field f = partClass.getField( "part" + type.name() );
|
||||
Enum varients[] = type.getVarients();
|
||||
|
@ -266,6 +275,7 @@ public class Registration
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
AELog.severe( "Error creating part: " + type.name() );
|
||||
|
|
|
@ -96,6 +96,8 @@ public class ApiPart implements IPartHelper
|
|||
}
|
||||
|
||||
public ClassNode getReader(String name) throws IOException
|
||||
{
|
||||
try
|
||||
{
|
||||
ClassReader cr;
|
||||
String path = "/" + name.replace( ".", "/" ) + ".class";
|
||||
|
@ -105,6 +107,11 @@ public class ApiPart implements IPartHelper
|
|||
cr.accept( cn, ClassReader.EXPAND_FRAMES );
|
||||
return cn;
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
throw new RuntimeException( "Error loading " + name, t );
|
||||
}
|
||||
}
|
||||
|
||||
public Class getCombinedInstance(String base)
|
||||
{
|
||||
|
@ -167,6 +174,7 @@ public class ApiPart implements IPartHelper
|
|||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
AELog.warning( "Error loading " + name );
|
||||
AELog.error( t );
|
||||
// throw new RuntimeException( t );
|
||||
}
|
||||
|
|
|
@ -205,7 +205,7 @@ public class BC extends BaseModule implements IBC
|
|||
@Override
|
||||
public void Init()
|
||||
{
|
||||
AEApi.instance().partHelper().registerNewLayer( "appeng.api.parts.layers.LayerIPipeConnection", "buildcraft.api.transport.IPipeConnection" );
|
||||
AEApi.instance().partHelper().registerNewLayer( "appeng.parts.layers.LayerIPipeConnection", "buildcraft.api.transport.IPipeConnection" );
|
||||
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new BCPipeHandler() );
|
||||
|
||||
Blocks b = AEApi.instance().blocks();
|
||||
|
|
|
@ -166,7 +166,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent,
|
|||
{
|
||||
if ( dmgToMaterial.containsKey( is.getItemDamage() ) )
|
||||
return dmgToMaterial.get( is.getItemDamage() );
|
||||
return null;
|
||||
return MaterialType.InvalidType;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,6 +17,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public enum MaterialType
|
||||
{
|
||||
InvalidType(-1, AEFeature.Core),
|
||||
|
||||
CertusQuartzCrystal(0, AEFeature.Core, "crystalCertusQuartz"), CertusQuartzCrystalCharged(1, AEFeature.Core, EntityChargedQuartz.class),
|
||||
|
||||
CertusQuartzDust(2, AEFeature.Core, "dustCertusQuartz"), NetherQuartzDust(3, AEFeature.Core, "dustNetherQuartz"), Flour(4, AEFeature.Flour, "dustWheat"), GoldDust(
|
||||
|
|
|
@ -43,6 +43,8 @@ import appeng.parts.reporting.PartTerminal;
|
|||
|
||||
public enum PartType
|
||||
{
|
||||
InvalidType(-1, AEFeature.Core, null),
|
||||
|
||||
CableGlass(0, AEFeature.Core, PartCableGlass.class),
|
||||
|
||||
CableCovered(20, AEFeature.Core, PartCableCovered.class),
|
||||
|
|
Loading…
Reference in a new issue