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())
|
for (MaterialType mat : MaterialType.values())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if ( mat == MaterialType.InvalidType )
|
||||||
|
((ItemMultiMaterial) materialItem.item()).createMaterial( mat );
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Field f = materialClass.getField( "material" + mat.name() );
|
Field f = materialClass.getField( "material" + mat.name() );
|
||||||
ItemStackSrc is = ((ItemMultiMaterial) materialItem.item()).createMaterial( mat );
|
ItemStackSrc is = ((ItemMultiMaterial) materialItem.item()).createMaterial( mat );
|
||||||
|
@ -225,6 +229,7 @@ public class Registration
|
||||||
else
|
else
|
||||||
f.set( materials, new NullItemDefinition() );
|
f.set( materials, new NullItemDefinition() );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Throwable err)
|
catch (Throwable err)
|
||||||
{
|
{
|
||||||
AELog.severe( "Error creating material: " + mat.name() );
|
AELog.severe( "Error creating material: " + mat.name() );
|
||||||
|
@ -238,6 +243,10 @@ public class Registration
|
||||||
for (PartType type : PartType.values())
|
for (PartType type : PartType.values())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if ( type == PartType.InvalidType )
|
||||||
|
((ItemMultiPart) partItem.item()).createPart( type, null );
|
||||||
|
else
|
||||||
{
|
{
|
||||||
Field f = partClass.getField( "part" + type.name() );
|
Field f = partClass.getField( "part" + type.name() );
|
||||||
Enum varients[] = type.getVarients();
|
Enum varients[] = type.getVarients();
|
||||||
|
@ -266,6 +275,7 @@ public class Registration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
catch (Throwable err)
|
catch (Throwable err)
|
||||||
{
|
{
|
||||||
AELog.severe( "Error creating part: " + type.name() );
|
AELog.severe( "Error creating part: " + type.name() );
|
||||||
|
|
|
@ -96,6 +96,8 @@ public class ApiPart implements IPartHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
public ClassNode getReader(String name) throws IOException
|
public ClassNode getReader(String name) throws IOException
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
ClassReader cr;
|
ClassReader cr;
|
||||||
String path = "/" + name.replace( ".", "/" ) + ".class";
|
String path = "/" + name.replace( ".", "/" ) + ".class";
|
||||||
|
@ -105,6 +107,11 @@ public class ApiPart implements IPartHelper
|
||||||
cr.accept( cn, ClassReader.EXPAND_FRAMES );
|
cr.accept( cn, ClassReader.EXPAND_FRAMES );
|
||||||
return cn;
|
return cn;
|
||||||
}
|
}
|
||||||
|
catch (Throwable t)
|
||||||
|
{
|
||||||
|
throw new RuntimeException( "Error loading " + name, t );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public Class getCombinedInstance(String base)
|
public Class getCombinedInstance(String base)
|
||||||
{
|
{
|
||||||
|
@ -167,6 +174,7 @@ public class ApiPart implements IPartHelper
|
||||||
}
|
}
|
||||||
catch (Throwable t)
|
catch (Throwable t)
|
||||||
{
|
{
|
||||||
|
AELog.warning( "Error loading " + name );
|
||||||
AELog.error( t );
|
AELog.error( t );
|
||||||
// throw new RuntimeException( t );
|
// throw new RuntimeException( t );
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,7 +205,7 @@ public class BC extends BaseModule implements IBC
|
||||||
@Override
|
@Override
|
||||||
public void Init()
|
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() );
|
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new BCPipeHandler() );
|
||||||
|
|
||||||
Blocks b = AEApi.instance().blocks();
|
Blocks b = AEApi.instance().blocks();
|
||||||
|
|
|
@ -166,7 +166,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent,
|
||||||
{
|
{
|
||||||
if ( dmgToMaterial.containsKey( is.getItemDamage() ) )
|
if ( dmgToMaterial.containsKey( is.getItemDamage() ) )
|
||||||
return dmgToMaterial.get( is.getItemDamage() );
|
return dmgToMaterial.get( is.getItemDamage() );
|
||||||
return null;
|
return MaterialType.InvalidType;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -17,6 +17,8 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public enum MaterialType
|
public enum MaterialType
|
||||||
{
|
{
|
||||||
|
InvalidType(-1, AEFeature.Core),
|
||||||
|
|
||||||
CertusQuartzCrystal(0, AEFeature.Core, "crystalCertusQuartz"), CertusQuartzCrystalCharged(1, AEFeature.Core, EntityChargedQuartz.class),
|
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(
|
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
|
public enum PartType
|
||||||
{
|
{
|
||||||
|
InvalidType(-1, AEFeature.Core, null),
|
||||||
|
|
||||||
CableGlass(0, AEFeature.Core, PartCableGlass.class),
|
CableGlass(0, AEFeature.Core, PartCableGlass.class),
|
||||||
|
|
||||||
CableCovered(20, AEFeature.Core, PartCableCovered.class),
|
CableCovered(20, AEFeature.Core, PartCableCovered.class),
|
||||||
|
|
Loading…
Reference in a new issue