Changed access to use this qualifier
This commit is contained in:
@@ -53,14 +53,14 @@ public class IntegrationNode
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return shortName.name() + ':' + state.name();
|
||||
return this.shortName.name() + ':' + this.state.name();
|
||||
}
|
||||
|
||||
void Call(IntegrationStage stage)
|
||||
{
|
||||
if ( state != IntegrationStage.FAILED )
|
||||
if ( this.state != IntegrationStage.FAILED )
|
||||
{
|
||||
if ( state.ordinal() > stage.ordinal() )
|
||||
if ( this.state.ordinal() > stage.ordinal() )
|
||||
return;
|
||||
|
||||
try
|
||||
@@ -69,13 +69,13 @@ public class IntegrationNode
|
||||
{
|
||||
case PRE_INIT:
|
||||
|
||||
boolean enabled = modID == null || Loader.isModLoaded( modID );
|
||||
boolean enabled = this.modID == null || Loader.isModLoaded( this.modID );
|
||||
|
||||
AEConfig.instance
|
||||
.addCustomCategoryComment(
|
||||
"ModIntegration",
|
||||
"Valid Values are 'AUTO', 'ON', or 'OFF' - defaults to 'AUTO' ; Suggested that you leave this alone unless your experiencing an issue, or wish to disable the integration for a reason." );
|
||||
String Mode = AEConfig.instance.get( "ModIntegration", displayName.replace( " ", "" ), "AUTO" ).getString();
|
||||
String Mode = AEConfig.instance.get( "ModIntegration", this.displayName.replace( " ", "" ), "AUTO" ).getString();
|
||||
|
||||
if ( Mode.toUpperCase().equals( "ON" ) )
|
||||
enabled = true;
|
||||
@@ -84,25 +84,25 @@ public class IntegrationNode
|
||||
|
||||
if ( enabled )
|
||||
{
|
||||
classValue = getClass().getClassLoader().loadClass( name );
|
||||
mod = (IIntegrationModule) classValue.getConstructor().newInstance();
|
||||
Field f = classValue.getField( "instance" );
|
||||
f.set( classValue, instance = mod );
|
||||
this.classValue = this.getClass().getClassLoader().loadClass( this.name );
|
||||
this.mod = (IIntegrationModule) this.classValue.getConstructor().newInstance();
|
||||
Field f = this.classValue.getField( "instance" );
|
||||
f.set( this.classValue, this.instance = this.mod );
|
||||
}
|
||||
else
|
||||
throw new ModNotInstalled( modID );
|
||||
throw new ModNotInstalled( this.modID );
|
||||
|
||||
state = IntegrationStage.INIT;
|
||||
this.state = IntegrationStage.INIT;
|
||||
|
||||
break;
|
||||
case INIT:
|
||||
mod.Init();
|
||||
state = IntegrationStage.POST_INIT;
|
||||
this.mod.Init();
|
||||
this.state = IntegrationStage.POST_INIT;
|
||||
|
||||
break;
|
||||
case POST_INIT:
|
||||
mod.PostInit();
|
||||
state = IntegrationStage.READY;
|
||||
this.mod.PostInit();
|
||||
this.state = IntegrationStage.READY;
|
||||
|
||||
break;
|
||||
case FAILED:
|
||||
@@ -112,33 +112,33 @@ public class IntegrationNode
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
failedStage = stage;
|
||||
exception = t;
|
||||
state = IntegrationStage.FAILED;
|
||||
this.failedStage = stage;
|
||||
this.exception = t;
|
||||
this.state = IntegrationStage.FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
if ( stage == IntegrationStage.POST_INIT )
|
||||
{
|
||||
if ( state == IntegrationStage.FAILED )
|
||||
if ( this.state == IntegrationStage.FAILED )
|
||||
{
|
||||
AELog.info( displayName + " - Integration Disabled" );
|
||||
if ( !(exception instanceof ModNotInstalled) )
|
||||
AELog.integration( exception );
|
||||
AELog.info( this.displayName + " - Integration Disabled" );
|
||||
if ( !(this.exception instanceof ModNotInstalled) )
|
||||
AELog.integration( this.exception );
|
||||
}
|
||||
else
|
||||
{
|
||||
AELog.info( displayName + " - Integration Enable" );
|
||||
AELog.info( this.displayName + " - Integration Enable" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isActive()
|
||||
{
|
||||
if ( state == IntegrationStage.PRE_INIT )
|
||||
Call( IntegrationStage.PRE_INIT );
|
||||
if ( this.state == IntegrationStage.PRE_INIT )
|
||||
this.Call( IntegrationStage.PRE_INIT );
|
||||
|
||||
return state != IntegrationStage.FAILED;
|
||||
return this.state != IntegrationStage.FAILED;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,21 +39,21 @@ public enum IntegrationRegistry
|
||||
if ( type.side == IntegrationSide.SERVER && FMLLaunchHandler.side() == Side.CLIENT )
|
||||
return;
|
||||
|
||||
modules.add( new IntegrationNode( type.dspName, type.modID, type, "appeng.integration.modules." + type.name() ) );
|
||||
this.modules.add( new IntegrationNode( type.dspName, type.modID, type, "appeng.integration.modules." + type.name() ) );
|
||||
}
|
||||
|
||||
public void init()
|
||||
{
|
||||
for ( IntegrationNode node : modules )
|
||||
for ( IntegrationNode node : this.modules )
|
||||
node.Call( IntegrationStage.PRE_INIT );
|
||||
|
||||
for ( IntegrationNode node : modules )
|
||||
for ( IntegrationNode node : this.modules )
|
||||
node.Call( IntegrationStage.INIT );
|
||||
}
|
||||
|
||||
public void postInit()
|
||||
{
|
||||
for ( IntegrationNode node : modules )
|
||||
for ( IntegrationNode node : this.modules )
|
||||
node.Call( IntegrationStage.POST_INIT );
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public enum IntegrationRegistry
|
||||
{
|
||||
String out = null;
|
||||
|
||||
for ( IntegrationNode node : modules )
|
||||
for ( IntegrationNode node : this.modules )
|
||||
{
|
||||
String str = node.shortName + ":" + ( node.state == IntegrationStage.FAILED ? "OFF" : "ON" );
|
||||
|
||||
@@ -76,7 +76,7 @@ public enum IntegrationRegistry
|
||||
|
||||
public boolean isEnabled( IntegrationType name )
|
||||
{
|
||||
for ( IntegrationNode node : modules )
|
||||
for ( IntegrationNode node : this.modules )
|
||||
{
|
||||
if ( node.shortName == name )
|
||||
return node.isActive();
|
||||
@@ -86,7 +86,7 @@ public enum IntegrationRegistry
|
||||
|
||||
public Object getInstance( IntegrationType name )
|
||||
{
|
||||
for ( IntegrationNode node : modules )
|
||||
for ( IntegrationNode node : this.modules )
|
||||
{
|
||||
if ( node.shortName.equals( name ) && node.isActive() )
|
||||
{
|
||||
|
||||
@@ -64,9 +64,9 @@ public class BC extends BaseModule implements IBC
|
||||
public static BC instance;
|
||||
|
||||
public BC() {
|
||||
TestClass( IPipeConnection.class );
|
||||
TestClass( ItemFacade.class );
|
||||
TestClass( IToolWrench.class );
|
||||
this.TestClass( IPipeConnection.class );
|
||||
this.TestClass( ItemFacade.class );
|
||||
this.TestClass( IToolWrench.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -231,14 +231,14 @@ public class BC extends BaseModule implements IBC
|
||||
AEApi.instance().registries().externalStorage().addExternalStorageInterface( new BCPipeHandler() );
|
||||
|
||||
Blocks b = AEApi.instance().blocks();
|
||||
addFacade( b.blockFluix.stack( 1 ) );
|
||||
addFacade( b.blockQuartz.stack( 1 ) );
|
||||
addFacade( b.blockQuartzChiseled.stack( 1 ) );
|
||||
addFacade( b.blockQuartzPillar.stack( 1 ) );
|
||||
this.addFacade( b.blockFluix.stack( 1 ) );
|
||||
this.addFacade( b.blockQuartz.stack( 1 ) );
|
||||
this.addFacade( b.blockQuartzChiseled.stack( 1 ) );
|
||||
this.addFacade( b.blockQuartzPillar.stack( 1 ) );
|
||||
|
||||
try
|
||||
{
|
||||
initBuilderSupport();
|
||||
this.initBuilderSupport();
|
||||
}
|
||||
catch (Throwable builderSupport)
|
||||
{
|
||||
@@ -248,10 +248,10 @@ public class BC extends BaseModule implements IBC
|
||||
Block skyStone = b.blockSkyStone.block();
|
||||
if ( skyStone != null )
|
||||
{
|
||||
addFacade( new ItemStack( skyStone, 1, 0 ) );
|
||||
addFacade( new ItemStack( skyStone, 1, 1 ) );
|
||||
addFacade( new ItemStack( skyStone, 1, 2 ) );
|
||||
addFacade( new ItemStack( skyStone, 1, 3 ) );
|
||||
this.addFacade( new ItemStack( skyStone, 1, 0 ) );
|
||||
this.addFacade( new ItemStack( skyStone, 1, 1 ) );
|
||||
this.addFacade( new ItemStack( skyStone, 1, 2 ) );
|
||||
this.addFacade( new ItemStack( skyStone, 1, 3 ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,9 +294,9 @@ public class BC extends BaseModule implements IBC
|
||||
@Override
|
||||
public void PostInit()
|
||||
{
|
||||
registerPowerP2P();
|
||||
registerItemP2P();
|
||||
registerLiquidsP2P();
|
||||
this.registerPowerP2P();
|
||||
this.registerItemP2P();
|
||||
this.registerLiquidsP2P();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,12 +43,12 @@ public class AECableSchematicTile extends AEGenericSchematicTile implements IPar
|
||||
public void rotateLeft(IBuilderContext context)
|
||||
{
|
||||
CableBusContainer cbc = new CableBusContainer( this );
|
||||
cbc.readFromNBT( tileNBT );
|
||||
cbc.readFromNBT( this.tileNBT );
|
||||
|
||||
cbc.rotateLeft();
|
||||
|
||||
tileNBT = new NBTTagCompound();
|
||||
cbc.writeToNBT( tileNBT );
|
||||
this.tileNBT = new NBTTagCompound();
|
||||
cbc.writeToNBT( this.tileNBT );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,16 +42,16 @@ public class AEGenericSchematicTile extends SchematicTile
|
||||
tcb.getDrops( tile.getWorldObj(), tile.xCoord, tile.yCoord, tile.zCoord, list );
|
||||
}
|
||||
|
||||
storedRequirements = list.toArray( new ItemStack[list.size()] );
|
||||
this.storedRequirements = list.toArray( new ItemStack[list.size()] );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void rotateLeft(IBuilderContext context)
|
||||
{
|
||||
if ( tileNBT.hasKey( "orientation_forward" ) && tileNBT.hasKey( "orientation_up" ) )
|
||||
if ( this.tileNBT.hasKey( "orientation_forward" ) && this.tileNBT.hasKey( "orientation_up" ) )
|
||||
{
|
||||
String forward = tileNBT.getString( "orientation_forward" );
|
||||
String up = tileNBT.getString( "orientation_up" );
|
||||
String forward = this.tileNBT.getString( "orientation_forward" );
|
||||
String up = this.tileNBT.getString( "orientation_up" );
|
||||
|
||||
if ( forward != null && up != null )
|
||||
{
|
||||
@@ -63,8 +63,8 @@ public class AEGenericSchematicTile extends SchematicTile
|
||||
fdForward = Platform.rotateAround( fdForward, ForgeDirection.DOWN );
|
||||
fdUp = Platform.rotateAround( fdUp, ForgeDirection.DOWN );
|
||||
|
||||
tileNBT.setString( "orientation_forward", fdForward.name() );
|
||||
tileNBT.setString( "orientation_up", fdUp.name() );
|
||||
this.tileNBT.setString( "orientation_forward", fdForward.name() );
|
||||
this.tileNBT.setString( "orientation_up", fdUp.name() );
|
||||
}
|
||||
catch (Throwable ignored)
|
||||
{
|
||||
|
||||
@@ -29,10 +29,10 @@ public class AERotatableBlockSchematic extends SchematicBlock
|
||||
@Override
|
||||
public void rotateLeft(IBuilderContext context)
|
||||
{
|
||||
if ( meta < 6 )
|
||||
if ( this.meta < 6 )
|
||||
{
|
||||
ForgeDirection d = Platform.rotateAround( ForgeDirection.values()[meta], ForgeDirection.DOWN );
|
||||
meta = d.ordinal();
|
||||
ForgeDirection d = Platform.rotateAround( ForgeDirection.values()[this.meta], ForgeDirection.DOWN );
|
||||
this.meta = d.ordinal();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ public class BCPipeInventory implements IMEInventory<IAEItemStack>
|
||||
final ForgeDirection dir;
|
||||
|
||||
public BCPipeInventory(TileEntity _te, ForgeDirection _dir) {
|
||||
te = _te;
|
||||
dir = _dir;
|
||||
this.te = _te;
|
||||
this.dir = _dir;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,12 +50,12 @@ public class BCPipeInventory implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
if ( mode == Actionable.SIMULATE )
|
||||
{
|
||||
if ( BC.instance.canAddItemsToPipe( te, input.getItemStack(), dir ) )
|
||||
if ( BC.instance.canAddItemsToPipe( this.te, input.getItemStack(), this.dir ) )
|
||||
return null;
|
||||
return input;
|
||||
}
|
||||
|
||||
if ( BC.instance.addItemsToPipe( te, input.getItemStack(), dir ) )
|
||||
if ( BC.instance.addItemsToPipe( this.te, input.getItemStack(), this.dir ) )
|
||||
return null;
|
||||
return input;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class CLApi extends BaseModule implements ICLApi
|
||||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
TestClass( coloredlightscore.src.api.CLApi.class );
|
||||
this.TestClass( coloredlightscore.src.api.CLApi.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -90,38 +90,38 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
|
||||
@Override
|
||||
public void generateRecipes(RecipeGenerator generator)
|
||||
{
|
||||
parent = generator;
|
||||
this.parent = generator;
|
||||
|
||||
RecipeTemplate craftingTemplate;
|
||||
RecipeTemplate smallCraftingTemplate;
|
||||
|
||||
if ( uristqwerty.CraftGuide.CraftGuide.newerBackgroundStyle )
|
||||
{
|
||||
craftingTemplate = generator.createRecipeTemplate( craftingSlotsOwnBackground, null );
|
||||
smallCraftingTemplate = generator.createRecipeTemplate( smallCraftingSlotsOwnBackground, null );
|
||||
craftingTemplate = generator.createRecipeTemplate( this.craftingSlotsOwnBackground, null );
|
||||
smallCraftingTemplate = generator.createRecipeTemplate( this.smallCraftingSlotsOwnBackground, null );
|
||||
}
|
||||
else
|
||||
{
|
||||
craftingTemplate = new DefaultRecipeTemplate( craftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip(
|
||||
craftingTemplate = new DefaultRecipeTemplate( this.craftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip(
|
||||
DynamicTexture.instance( "recipe_backgrounds" ), 1, 1, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 1,
|
||||
79, 58 ) );
|
||||
|
||||
smallCraftingTemplate = new DefaultRecipeTemplate( smallCraftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip(
|
||||
smallCraftingTemplate = new DefaultRecipeTemplate( this.smallCraftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip(
|
||||
DynamicTexture.instance( "recipe_backgrounds" ), 1, 61, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 61,
|
||||
79, 58 ) );
|
||||
}
|
||||
|
||||
RecipeTemplate shapelessTemplate = new DefaultRecipeTemplate( shapelessCraftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip(
|
||||
RecipeTemplate shapelessTemplate = new DefaultRecipeTemplate( this.shapelessCraftingSlots, RecipeGeneratorImplementation.workbench, new TextureClip(
|
||||
DynamicTexture.instance( "recipe_backgrounds" ), 1, 121, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 121,
|
||||
79, 58 ) );
|
||||
|
||||
RecipeTemplate furnaceTemplate = new DefaultRecipeTemplate( furnaceSlots, new ItemStack( Blocks.furnace ), new TextureClip(
|
||||
RecipeTemplate furnaceTemplate = new DefaultRecipeTemplate( this.furnaceSlots, new ItemStack( Blocks.furnace ), new TextureClip(
|
||||
DynamicTexture.instance( "recipe_backgrounds" ), 1, 181, 79, 58 ), new TextureClip( DynamicTexture.instance( "recipe_backgrounds" ), 82, 181,
|
||||
79, 58 ) );
|
||||
|
||||
addCraftingRecipes( craftingTemplate, smallCraftingTemplate, shapelessTemplate, this );
|
||||
addGrinderRecipes( furnaceTemplate, this );
|
||||
addInscriberRecipes( furnaceTemplate, this );
|
||||
this.addCraftingRecipes( craftingTemplate, smallCraftingTemplate, shapelessTemplate, this );
|
||||
this.addGrinderRecipes( furnaceTemplate, this );
|
||||
this.addInscriberRecipes( furnaceTemplate, this );
|
||||
}
|
||||
|
||||
private void addCraftingRecipes(RecipeTemplate template, RecipeTemplate templateSmall, RecipeTemplate templateShapeless, RecipeGenerator generator)
|
||||
@@ -183,46 +183,46 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
|
||||
@Override
|
||||
public RecipeTemplate createRecipeTemplate(Slot[] slots, ItemStack craftingType)
|
||||
{
|
||||
return parent.createRecipeTemplate( slots, craftingType );
|
||||
return this.parent.createRecipeTemplate( slots, craftingType );
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecipeTemplate createRecipeTemplate(Slot[] slots, ItemStack craftingType, String backgroundTexture, int backgroundX, int backgroundY,
|
||||
int backgroundSelectedX, int backgroundSelectedY)
|
||||
{
|
||||
return parent.createRecipeTemplate( slots, craftingType, backgroundTexture, backgroundX, backgroundY, backgroundSelectedX, backgroundSelectedY );
|
||||
return this.parent.createRecipeTemplate( slots, craftingType, backgroundTexture, backgroundX, backgroundY, backgroundSelectedX, backgroundSelectedY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public RecipeTemplate createRecipeTemplate(Slot[] slots, ItemStack craftingType, String backgroundTexture, int backgroundX, int backgroundY,
|
||||
String backgroundSelectedTexture, int backgroundSelectedX, int backgroundSelectedY)
|
||||
{
|
||||
return parent.createRecipeTemplate( slots, craftingType, backgroundTexture, backgroundX, backgroundY, backgroundSelectedTexture, backgroundSelectedX,
|
||||
return this.parent.createRecipeTemplate( slots, craftingType, backgroundTexture, backgroundX, backgroundY, backgroundSelectedTexture, backgroundSelectedX,
|
||||
backgroundSelectedY );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRecipe(RecipeTemplate template, Object[] crafting)
|
||||
{
|
||||
parent.addRecipe( template, crafting );
|
||||
this.parent.addRecipe( template, crafting );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addRecipe(CraftGuideRecipe recipe, ItemStack craftingType)
|
||||
{
|
||||
parent.addRecipe( recipe, craftingType );
|
||||
this.parent.addRecipe( recipe, craftingType );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDefaultTypeVisibility(ItemStack type, boolean visible)
|
||||
{
|
||||
parent.setDefaultTypeVisibility( type, visible );
|
||||
this.parent.setDefaultTypeVisibility( type, visible );
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object[] getCraftingRecipe(IRecipe recipe)
|
||||
{
|
||||
return getCraftingRecipe( recipe, true );
|
||||
return this.getCraftingRecipe( recipe, true );
|
||||
}
|
||||
|
||||
Object[] getCraftingShapelessRecipe(List items, ItemStack recipeOutput)
|
||||
@@ -240,7 +240,7 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
|
||||
{
|
||||
try
|
||||
{
|
||||
output[i] = toCG( ((IIngredient) output[i]).getItemStackSet() );
|
||||
output[i] = this.toCG( ((IIngredient) output[i]).getItemStackSet() );
|
||||
}
|
||||
catch (RegistrationError ignored)
|
||||
{
|
||||
@@ -275,7 +275,7 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
|
||||
{
|
||||
try
|
||||
{
|
||||
output[i] = toCG( ((IIngredient) output[i]).getItemStackSet() );
|
||||
output[i] = this.toCG( ((IIngredient) output[i]).getItemStackSet() );
|
||||
}
|
||||
catch (RegistrationError ignored)
|
||||
{
|
||||
@@ -311,7 +311,7 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
|
||||
{
|
||||
try
|
||||
{
|
||||
output[i] = toCG( ((IIngredient) output[i]).getItemStackSet() );
|
||||
output[i] = this.toCG( ((IIngredient) output[i]).getItemStackSet() );
|
||||
}
|
||||
catch (RegistrationError ignored)
|
||||
{
|
||||
@@ -349,7 +349,7 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
|
||||
if ( recipe instanceof ShapelessRecipe )
|
||||
{
|
||||
List items = ReflectionHelper.getPrivateValue( ShapelessRecipe.class, (ShapelessRecipe) recipe, "input" );
|
||||
return getCraftingShapelessRecipe( items, recipe.getRecipeOutput() );
|
||||
return this.getCraftingShapelessRecipe( items, recipe.getRecipeOutput() );
|
||||
}
|
||||
else if ( recipe instanceof ShapedRecipe )
|
||||
{
|
||||
@@ -359,11 +359,11 @@ public class CraftGuide extends CraftGuideAPIObject implements IIntegrationModul
|
||||
|
||||
if ( allowSmallGrid && width < 3 && height < 3 )
|
||||
{
|
||||
return getSmallShapedRecipe( width, height, items, recipe.getRecipeOutput() );
|
||||
return this.getSmallShapedRecipe( width, height, items, recipe.getRecipeOutput() );
|
||||
}
|
||||
else
|
||||
{
|
||||
return getCraftingShapedRecipe( width, height, items, recipe.getRecipeOutput() );
|
||||
return this.getCraftingShapedRecipe( width, height, items, recipe.getRecipeOutput() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ public class DSU extends BaseModule implements IDSU
|
||||
@Override
|
||||
public void Init()
|
||||
{
|
||||
TestClass( IDeepStorageUnit.class );
|
||||
this.TestClass( IDeepStorageUnit.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -83,13 +83,13 @@ public class FMP implements IIntegrationModule, IPartFactory, IPartConverter, IF
|
||||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
createAndRegister( AEApi.instance().blocks().blockQuartz.block(), 0 );
|
||||
createAndRegister( AEApi.instance().blocks().blockQuartzPillar.block(), 0 );
|
||||
createAndRegister( AEApi.instance().blocks().blockQuartzChiseled.block(), 0 );
|
||||
createAndRegister( AEApi.instance().blocks().blockSkyStone.block(), 0 );
|
||||
createAndRegister( AEApi.instance().blocks().blockSkyStone.block(), 1 );
|
||||
createAndRegister( AEApi.instance().blocks().blockSkyStone.block(), 2 );
|
||||
createAndRegister( AEApi.instance().blocks().blockSkyStone.block(), 3 );
|
||||
this.createAndRegister( AEApi.instance().blocks().blockQuartz.block(), 0 );
|
||||
this.createAndRegister( AEApi.instance().blocks().blockQuartzPillar.block(), 0 );
|
||||
this.createAndRegister( AEApi.instance().blocks().blockQuartzChiseled.block(), 0 );
|
||||
this.createAndRegister( AEApi.instance().blocks().blockSkyStone.block(), 0 );
|
||||
this.createAndRegister( AEApi.instance().blocks().blockSkyStone.block(), 1 );
|
||||
this.createAndRegister( AEApi.instance().blocks().blockSkyStone.block(), 2 );
|
||||
this.createAndRegister( AEApi.instance().blocks().blockSkyStone.block(), 3 );
|
||||
|
||||
PartRegistry reg[] = PartRegistry.values();
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class IC2 extends BaseModule implements IIC2
|
||||
public static IC2 instance;
|
||||
|
||||
public IC2() {
|
||||
TestClass( IEnergyTile.class );
|
||||
this.TestClass( IEnergyTile.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -47,17 +47,17 @@ public class IC2 extends BaseModule implements IIC2
|
||||
public void PostInit()
|
||||
{
|
||||
IP2PTunnelRegistry reg = AEApi.instance().registries().p2pTunnel();
|
||||
reg.addNewAttunement( getItem( "copperCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "insulatedCopperCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "goldCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "insulatedGoldCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "ironCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "insulatedIronCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "insulatedTinCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "glassFiberCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "tinCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "detectorCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( getItem( "splitterCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "copperCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "insulatedCopperCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "goldCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "insulatedGoldCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "ironCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "insulatedIronCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "insulatedTinCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "glassFiberCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "tinCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "detectorCableItem" ), TunnelType.IC2_POWER );
|
||||
reg.addNewAttunement( this.getItem( "splitterCableItem" ), TunnelType.IC2_POWER );
|
||||
|
||||
// this is gone?
|
||||
// AEApi.instance().registries().matterCannon().registerAmmo( getItem( "uraniumDrop" ), 238.0289 );
|
||||
|
||||
@@ -47,16 +47,16 @@ public class ImmibisMicroblocks extends BaseModule implements IImmibisMicroblock
|
||||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
TestClass( IMultipartTile.class );
|
||||
TestClass( ICoverSystem.class );
|
||||
TestClass( IPartContainer.class );
|
||||
this.TestClass( IMultipartTile.class );
|
||||
this.TestClass( ICoverSystem.class );
|
||||
this.TestClass( IPartContainer.class );
|
||||
|
||||
try
|
||||
{
|
||||
MicroblockAPIUtils = Class.forName( "mods.immibis.microblocks.api.MicroblockAPIUtils" );
|
||||
mergeIntoMicroblockContainer = MicroblockAPIUtils.getMethod( "mergeIntoMicroblockContainer", ItemStack.class, EntityPlayer.class, World.class,
|
||||
this.MicroblockAPIUtils = Class.forName( "mods.immibis.microblocks.api.MicroblockAPIUtils" );
|
||||
this.mergeIntoMicroblockContainer = this.MicroblockAPIUtils.getMethod( "mergeIntoMicroblockContainer", ItemStack.class, EntityPlayer.class, World.class,
|
||||
int.class, int.class, int.class, int.class, Block.class, int.class );
|
||||
canConvertTiles = true;
|
||||
this.canConvertTiles = true;
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
@@ -87,7 +87,7 @@ public class ImmibisMicroblocks extends BaseModule implements IImmibisMicroblock
|
||||
@Override
|
||||
public IPartHost getOrCreateHost(EntityPlayer player, int side, TileEntity te)
|
||||
{
|
||||
if ( te instanceof IMultipartTile && canConvertTiles )
|
||||
if ( te instanceof IMultipartTile && this.canConvertTiles )
|
||||
{
|
||||
Block blk = AEApi.instance().blocks().blockMultiPart.block();
|
||||
ItemStack what = AEApi.instance().blocks().blockMultiPart.stack( 1 );
|
||||
@@ -101,11 +101,11 @@ public class ImmibisMicroblocks extends BaseModule implements IImmibisMicroblock
|
||||
{
|
||||
// ItemStack.class, EntityPlayer.class, World.class,
|
||||
// int.class, int.class, int.class, int.class, Block.class, int.class );
|
||||
mergeIntoMicroblockContainer.invoke( null, what, player, w, x, y, z, side, blk, 0 );
|
||||
this.mergeIntoMicroblockContainer.invoke( null, what, player, w, x, y, z, side, blk, 0 );
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
canConvertTiles = false;
|
||||
this.canConvertTiles = false;
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class MFR extends BaseModule
|
||||
public static MFR instance;
|
||||
|
||||
public MFR() {
|
||||
TestClass( IRedNetConnection.class );
|
||||
this.TestClass( IRedNetConnection.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -29,7 +29,7 @@ public class MJ5 extends BaseModule implements IMJ5
|
||||
public static MJ5 instance;
|
||||
|
||||
public MJ5() {
|
||||
TestClass( IPowerReceptor.class );
|
||||
this.TestClass( IPowerReceptor.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,9 +37,9 @@ public class MJ6 extends BaseModule implements IMJ6
|
||||
public static MJ6 instance;
|
||||
|
||||
public MJ6() {
|
||||
TestClass( IBatteryObject.class );
|
||||
TestClass( IBatteryProvider.class );
|
||||
TestClass( ISidedBatteryProvider.class );
|
||||
this.TestClass( IBatteryObject.class );
|
||||
this.TestClass( IBatteryProvider.class );
|
||||
this.TestClass( ISidedBatteryProvider.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Mekanism extends BaseModule implements IMekanism
|
||||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
TestClass( mekanism.api.energy.IStrictEnergyAcceptor.class );
|
||||
this.TestClass( mekanism.api.energy.IStrictEnergyAcceptor.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -63,48 +63,48 @@ public class NEI extends BaseModule implements INEI, IContainerTooltipHandler
|
||||
Method registerUsageHandler;
|
||||
|
||||
public NEI() throws ClassNotFoundException {
|
||||
TestClass( GuiContainerManager.class );
|
||||
TestClass( codechicken.nei.recipe.ICraftingHandler.class );
|
||||
TestClass( codechicken.nei.recipe.IUsageHandler.class );
|
||||
API = Class.forName( "codechicken.nei.api.API" );
|
||||
this.TestClass( GuiContainerManager.class );
|
||||
this.TestClass( codechicken.nei.recipe.ICraftingHandler.class );
|
||||
this.TestClass( codechicken.nei.recipe.IUsageHandler.class );
|
||||
this.API = Class.forName( "codechicken.nei.api.API" );
|
||||
}
|
||||
|
||||
public void registerRecipeHandler(Object o) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
|
||||
{
|
||||
registerRecipeHandler.invoke( API, o );
|
||||
registerUsageHandler.invoke( API, o );
|
||||
this.registerRecipeHandler.invoke( this.API, o );
|
||||
this.registerUsageHandler.invoke( this.API, o );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
registerRecipeHandler = API.getDeclaredMethod( "registerRecipeHandler", codechicken.nei.recipe.ICraftingHandler.class );
|
||||
registerUsageHandler = API.getDeclaredMethod( "registerUsageHandler", codechicken.nei.recipe.IUsageHandler.class );
|
||||
this.registerRecipeHandler = this.API.getDeclaredMethod( "registerRecipeHandler", codechicken.nei.recipe.ICraftingHandler.class );
|
||||
this.registerUsageHandler = this.API.getDeclaredMethod( "registerUsageHandler", codechicken.nei.recipe.IUsageHandler.class );
|
||||
|
||||
registerRecipeHandler( new NEIAEShapedRecipeHandler() );
|
||||
registerRecipeHandler( new NEIAEShapelessRecipeHandler() );
|
||||
registerRecipeHandler( new NEIInscriberRecipeHandler() );
|
||||
registerRecipeHandler( new NEIWorldCraftingHandler() );
|
||||
registerRecipeHandler( new NEIGrinderRecipeHandler() );
|
||||
this.registerRecipeHandler( new NEIAEShapedRecipeHandler() );
|
||||
this.registerRecipeHandler( new NEIAEShapelessRecipeHandler() );
|
||||
this.registerRecipeHandler( new NEIInscriberRecipeHandler() );
|
||||
this.registerRecipeHandler( new NEIWorldCraftingHandler() );
|
||||
this.registerRecipeHandler( new NEIGrinderRecipeHandler() );
|
||||
|
||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) && AEConfig.instance.isFeatureEnabled( AEFeature.enableFacadeCrafting ) )
|
||||
registerRecipeHandler( new NEIFacadeRecipeHandler() );
|
||||
this.registerRecipeHandler( new NEIFacadeRecipeHandler() );
|
||||
|
||||
// large stack tooltips
|
||||
GuiContainerManager.addTooltipHandler( this );
|
||||
|
||||
// crafting terminal...
|
||||
Method registerGuiOverlay = API.getDeclaredMethod( "registerGuiOverlay", Class.class, String.class, IStackPositioner.class );
|
||||
Method registerGuiOverlay = this.API.getDeclaredMethod( "registerGuiOverlay", Class.class, String.class, IStackPositioner.class );
|
||||
Class IOverlayHandler = Class.forName( "codechicken.nei.api.IOverlayHandler" );
|
||||
Class DefaultOverlayHandler = NEICraftingHandler.class;
|
||||
|
||||
Method registerGuiOverlayHandler = API.getDeclaredMethod( "registerGuiOverlayHandler", Class.class, IOverlayHandler, String.class );
|
||||
registerGuiOverlay.invoke( API, GuiCraftingTerm.class, "crafting", new TerminalCraftingSlotFinder() );
|
||||
registerGuiOverlay.invoke( API, GuiPatternTerm.class, "crafting", new TerminalCraftingSlotFinder() );
|
||||
Method registerGuiOverlayHandler = this.API.getDeclaredMethod( "registerGuiOverlayHandler", Class.class, IOverlayHandler, String.class );
|
||||
registerGuiOverlay.invoke( this.API, GuiCraftingTerm.class, "crafting", new TerminalCraftingSlotFinder() );
|
||||
registerGuiOverlay.invoke( this.API, GuiPatternTerm.class, "crafting", new TerminalCraftingSlotFinder() );
|
||||
|
||||
Constructor DefaultOverlayHandlerConstructor = DefaultOverlayHandler.getConstructor( int.class, int.class );
|
||||
registerGuiOverlayHandler.invoke( API, GuiCraftingTerm.class, DefaultOverlayHandlerConstructor.newInstance( 6, 75 ), "crafting" );
|
||||
registerGuiOverlayHandler.invoke( API, GuiPatternTerm.class, DefaultOverlayHandlerConstructor.newInstance( 6, 75 ), "crafting" );
|
||||
registerGuiOverlayHandler.invoke( this.API, GuiCraftingTerm.class, DefaultOverlayHandlerConstructor.newInstance( 6, 75 ), "crafting" );
|
||||
registerGuiOverlayHandler.invoke( this.API, GuiPatternTerm.class, DefaultOverlayHandlerConstructor.newInstance( 6, 75 ), "crafting" );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -68,7 +68,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results)
|
||||
{
|
||||
if ( (outputId.equals( "crafting" )) && (getClass() == NEIAEShapedRecipeHandler.class) )
|
||||
if ( (outputId.equals( "crafting" )) && (this.getClass() == NEIAEShapedRecipeHandler.class) )
|
||||
{
|
||||
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe recipe : recipes)
|
||||
@@ -79,7 +79,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
{
|
||||
CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe );
|
||||
cachedRecipe.computeVisuals();
|
||||
arecipes.add( cachedRecipe );
|
||||
this.arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
{
|
||||
CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe );
|
||||
cachedRecipe.computeVisuals();
|
||||
arecipes.add( cachedRecipe );
|
||||
this.arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -124,7 +124,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) )
|
||||
{
|
||||
cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient );
|
||||
arecipes.add( cachedRecipe );
|
||||
this.arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public boolean hasOverlay(GuiContainer gui, Container container, int recipe)
|
||||
{
|
||||
return (super.hasOverlay( gui, container, recipe )) || ((isRecipe2x2( recipe )) && (RecipeInfo.hasDefaultOverlay( gui, "crafting2x2" )));
|
||||
return (super.hasOverlay( gui, container, recipe )) || ((this.isRecipe2x2( recipe )) && (RecipeInfo.hasDefaultOverlay( gui, "crafting2x2" )));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,7 +160,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
if ( positioner == null )
|
||||
return null;
|
||||
|
||||
return new DefaultOverlayRenderer( getIngredientStacks( recipe ), positioner );
|
||||
return new DefaultOverlayRenderer( this.getIngredientStacks( recipe ), positioner );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -175,7 +175,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
|
||||
public boolean isRecipe2x2(int recipe)
|
||||
{
|
||||
for (PositionedStack stack : getIngredientStacks( recipe ))
|
||||
for (PositionedStack stack : this.getIngredientStacks( recipe ))
|
||||
{
|
||||
if ( (stack.relx > 43) || (stack.rely > 24) )
|
||||
return false;
|
||||
@@ -190,9 +190,9 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
public final PositionedStack result;
|
||||
|
||||
public CachedShapedRecipe(ShapedRecipe recipe) {
|
||||
result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
|
||||
ingredients = new ArrayList<PositionedStack>();
|
||||
setIngredients( recipe.getWidth(), recipe.getHeight(), recipe.getIngredients() );
|
||||
this.result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
|
||||
this.ingredients = new ArrayList<PositionedStack>();
|
||||
this.setIngredients( recipe.getWidth(), recipe.getHeight(), recipe.getIngredients() );
|
||||
}
|
||||
|
||||
public void setIngredients(int width, int height, Object[] items)
|
||||
@@ -230,7 +230,7 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients()
|
||||
{
|
||||
return getCycledIngredients( cycleticks / 20, this.ingredients );
|
||||
return this.getCycledIngredients( NEIAEShapedRecipeHandler.this.cycleticks / 20, this.ingredients );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+9
-9
@@ -68,7 +68,7 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results)
|
||||
{
|
||||
if ( (outputId.equals( "crafting" )) && (getClass() == NEIAEShapelessRecipeHandler.class) )
|
||||
if ( (outputId.equals( "crafting" )) && (this.getClass() == NEIAEShapelessRecipeHandler.class) )
|
||||
{
|
||||
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
|
||||
for (IRecipe recipe : recipes)
|
||||
@@ -102,7 +102,7 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
|
||||
{
|
||||
CachedShapelessRecipe cachedRecipe = new CachedShapelessRecipe( (ShapelessRecipe) recipe );
|
||||
cachedRecipe.computeVisuals();
|
||||
arecipes.add( cachedRecipe );
|
||||
this.arecipes.add( cachedRecipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -146,7 +146,7 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public boolean hasOverlay(GuiContainer gui, Container container, int recipe)
|
||||
{
|
||||
return (super.hasOverlay( gui, container, recipe )) || ((isRecipe2x2( recipe )) && (RecipeInfo.hasDefaultOverlay( gui, "crafting2x2" )));
|
||||
return (super.hasOverlay( gui, container, recipe )) || ((this.isRecipe2x2( recipe )) && (RecipeInfo.hasDefaultOverlay( gui, "crafting2x2" )));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -160,7 +160,7 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
|
||||
if ( positioner == null )
|
||||
return null;
|
||||
|
||||
return new DefaultOverlayRenderer( getIngredientStacks( recipe ), positioner );
|
||||
return new DefaultOverlayRenderer( this.getIngredientStacks( recipe ), positioner );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -175,7 +175,7 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
|
||||
|
||||
public boolean isRecipe2x2(int recipe)
|
||||
{
|
||||
for (PositionedStack stack : getIngredientStacks( recipe ))
|
||||
for (PositionedStack stack : this.getIngredientStacks( recipe ))
|
||||
{
|
||||
if ( (stack.relx > 43) || (stack.rely > 24) )
|
||||
return false;
|
||||
@@ -190,9 +190,9 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
|
||||
public final PositionedStack result;
|
||||
|
||||
public CachedShapelessRecipe(ShapelessRecipe recipe) {
|
||||
result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
|
||||
ingredients = new ArrayList<PositionedStack>();
|
||||
setIngredients( recipe.getInput().toArray() );
|
||||
this.result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
|
||||
this.ingredients = new ArrayList<PositionedStack>();
|
||||
this.setIngredients( recipe.getInput().toArray() );
|
||||
}
|
||||
|
||||
public void setIngredients(Object[] items)
|
||||
@@ -231,7 +231,7 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients()
|
||||
{
|
||||
return getCycledIngredients( cycleticks / 20, this.ingredients );
|
||||
return this.getCycledIngredients( NEIAEShapelessRecipeHandler.this.cycleticks / 20, this.ingredients );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,8 +42,8 @@ public class NEICraftingHandler implements IOverlayHandler
|
||||
|
||||
public NEICraftingHandler(int x, int y)
|
||||
{
|
||||
offsetX = x;
|
||||
offsetY = y;
|
||||
this.offsetX = x;
|
||||
this.offsetY = y;
|
||||
}
|
||||
|
||||
final int offsetX;
|
||||
@@ -55,7 +55,7 @@ public class NEICraftingHandler implements IOverlayHandler
|
||||
try
|
||||
{
|
||||
List ingredients = recipe.getIngredientStacks( recipeIndex );
|
||||
overlayRecipe( gui, ingredients, shift );
|
||||
this.overlayRecipe( gui, ingredients, shift );
|
||||
}
|
||||
catch (Exception ignored)
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results)
|
||||
{
|
||||
if ( (outputId.equals( "crafting" )) && (getClass() == NEIFacadeRecipeHandler.class) )
|
||||
if ( (outputId.equals( "crafting" )) && (this.getClass() == NEIFacadeRecipeHandler.class) )
|
||||
{
|
||||
ItemFacade ifa = (ItemFacade) AEApi.instance().items().itemFacade.item();
|
||||
List<ItemStack> facades = ifa.getFacades();
|
||||
@@ -72,7 +72,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
{
|
||||
CachedShapedRecipe recipe = new CachedShapedRecipe( is );
|
||||
recipe.computeVisuals();
|
||||
arecipes.add( recipe );
|
||||
this.arecipes.add( recipe );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -84,18 +84,18 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public void loadCraftingRecipes(ItemStack result)
|
||||
{
|
||||
if ( result.getItem() == ifa )
|
||||
if ( result.getItem() == this.ifa )
|
||||
{
|
||||
CachedShapedRecipe recipe = new CachedShapedRecipe( result );
|
||||
recipe.computeVisuals();
|
||||
arecipes.add( recipe );
|
||||
this.arecipes.add( recipe );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadUsageRecipes(ItemStack ingredient)
|
||||
{
|
||||
List<ItemStack> facades = ifa.getFacades();
|
||||
List<ItemStack> facades = this.ifa.getFacades();
|
||||
for (ItemStack is : facades)
|
||||
{
|
||||
CachedShapedRecipe recipe = new CachedShapedRecipe( is );
|
||||
@@ -106,7 +106,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
if ( recipe.contains( recipe.ingredients, ingredient ) )
|
||||
{
|
||||
recipe.setIngredientPermutation( recipe.ingredients, ingredient );
|
||||
arecipes.add( recipe );
|
||||
this.arecipes.add( recipe );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public boolean hasOverlay(GuiContainer gui, Container container, int recipe)
|
||||
{
|
||||
return (super.hasOverlay( gui, container, recipe )) || ((isRecipe2x2( recipe )) && (RecipeInfo.hasDefaultOverlay( gui, "crafting2x2" )));
|
||||
return (super.hasOverlay( gui, container, recipe )) || ((this.isRecipe2x2( recipe )) && (RecipeInfo.hasDefaultOverlay( gui, "crafting2x2" )));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -141,7 +141,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
if ( positioner == null )
|
||||
return null;
|
||||
|
||||
return new DefaultOverlayRenderer( getIngredientStacks( recipe ), positioner );
|
||||
return new DefaultOverlayRenderer( this.getIngredientStacks( recipe ), positioner );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -156,7 +156,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
|
||||
public boolean isRecipe2x2(int recipe)
|
||||
{
|
||||
for (PositionedStack stack : getIngredientStacks( recipe ))
|
||||
for (PositionedStack stack : this.getIngredientStacks( recipe ))
|
||||
{
|
||||
if ( (stack.relx > 43) || (stack.rely > 24) )
|
||||
return false;
|
||||
@@ -172,10 +172,10 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
|
||||
public CachedShapedRecipe(ItemStack output) {
|
||||
output.stackSize = 4;
|
||||
result = new PositionedStack( output, 119, 24 );
|
||||
ingredients = new ArrayList<PositionedStack>();
|
||||
ItemStack in = ifa.getTextureItem( output );
|
||||
setIngredients( 3, 3, new Object[] { null, cable_anchor, null, cable_anchor, in, cable_anchor, null, cable_anchor, null } );
|
||||
this.result = new PositionedStack( output, 119, 24 );
|
||||
this.ingredients = new ArrayList<PositionedStack>();
|
||||
ItemStack in = NEIFacadeRecipeHandler.this.ifa.getTextureItem( output );
|
||||
this.setIngredients( 3, 3, new Object[] { null, NEIFacadeRecipeHandler.this.cable_anchor, null, NEIFacadeRecipeHandler.this.cable_anchor, in, NEIFacadeRecipeHandler.this.cable_anchor, null, NEIFacadeRecipeHandler.this.cable_anchor, null } );
|
||||
}
|
||||
|
||||
public void setIngredients(int width, int height, Object[] items)
|
||||
@@ -198,7 +198,7 @@ public class NEIFacadeRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients()
|
||||
{
|
||||
return getCycledIngredients( cycleticks / 20, this.ingredients );
|
||||
return this.getCycledIngredients( NEIFacadeRecipeHandler.this.cycleticks / 20, this.ingredients );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -51,7 +51,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
public void drawBackground(int recipe)
|
||||
{
|
||||
GL11.glColor4f( 1, 1, 1, 1 );
|
||||
changeTexture( getGuiTexture() );
|
||||
changeTexture( this.getGuiTexture() );
|
||||
drawTexturedModalRect( 40, 10, 75, 16 + 10, 90, 66 );
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results)
|
||||
{
|
||||
if ( (outputId.equals( "grindstone" )) && (getClass() == NEIGrinderRecipeHandler.class) )
|
||||
if ( (outputId.equals( "grindstone" )) && (this.getClass() == NEIGrinderRecipeHandler.class) )
|
||||
{
|
||||
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
|
||||
{
|
||||
@@ -191,24 +191,24 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
public String Chance;
|
||||
|
||||
public CachedGrindStoneRecipe(IGrinderEntry recipe) {
|
||||
result = new PositionedStack( recipe.getOutput(), -30 + 107, 47 );
|
||||
ingredients = new ArrayList<PositionedStack>();
|
||||
this.result = new PositionedStack( recipe.getOutput(), -30 + 107, 47 );
|
||||
this.ingredients = new ArrayList<PositionedStack>();
|
||||
|
||||
if ( recipe.getOptionalOutput() != null )
|
||||
{
|
||||
hasOptional = true;
|
||||
Chance = ((int) (recipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal();
|
||||
ingredients.add( new PositionedStack( recipe.getOptionalOutput(), -30 + 107 + 18, 47 ) );
|
||||
this.hasOptional = true;
|
||||
this.Chance = ((int) (recipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal();
|
||||
this.ingredients.add( new PositionedStack( recipe.getOptionalOutput(), -30 + 107 + 18, 47 ) );
|
||||
}
|
||||
|
||||
if ( recipe.getInput() != null )
|
||||
ingredients.add( new PositionedStack( recipe.getInput(), 45, 24 ) );
|
||||
this.ingredients.add( new PositionedStack( recipe.getInput(), 45, 24 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients()
|
||||
{
|
||||
return getCycledIngredients( cycleticks / 20, this.ingredients );
|
||||
return this.getCycledIngredients( NEIGrinderRecipeHandler.this.cycleticks / 20, this.ingredients );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,7 +49,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
|
||||
public void drawBackground(int recipe)
|
||||
{
|
||||
GL11.glColor4f( 1, 1, 1, 1 );
|
||||
changeTexture( getGuiTexture() );
|
||||
changeTexture( this.getGuiTexture() );
|
||||
drawTexturedModalRect( 0, 0, 5, 11, 166, 75 );
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
|
||||
@Override
|
||||
public void loadCraftingRecipes(String outputId, Object... results)
|
||||
{
|
||||
if ( (outputId.equals( "inscriber" )) && (getClass() == NEIInscriberRecipeHandler.class) )
|
||||
if ( (outputId.equals( "inscriber" )) && (this.getClass() == NEIInscriberRecipeHandler.class) )
|
||||
{
|
||||
for (InscriberRecipe recipe : Inscribe.recipes)
|
||||
{
|
||||
@@ -160,23 +160,23 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
|
||||
public final PositionedStack result;
|
||||
|
||||
public CachedInscriberRecipe(InscriberRecipe recipe) {
|
||||
result = new PositionedStack( recipe.output, 108, 29 );
|
||||
ingredients = new ArrayList<PositionedStack>();
|
||||
this.result = new PositionedStack( recipe.output, 108, 29 );
|
||||
this.ingredients = new ArrayList<PositionedStack>();
|
||||
|
||||
if ( recipe.plateA != null )
|
||||
ingredients.add( new PositionedStack( recipe.plateA, 40, 5 ) );
|
||||
this.ingredients.add( new PositionedStack( recipe.plateA, 40, 5 ) );
|
||||
|
||||
if ( recipe.imprintable != null )
|
||||
ingredients.add( new PositionedStack( recipe.imprintable, 40 + 18, 28 ) );
|
||||
this.ingredients.add( new PositionedStack( recipe.imprintable, 40 + 18, 28 ) );
|
||||
|
||||
if ( recipe.plateB != null )
|
||||
ingredients.add( new PositionedStack( recipe.plateB, 40, 51 ) );
|
||||
this.ingredients.add( new PositionedStack( recipe.plateB, 40, 51 ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PositionedStack> getIngredients()
|
||||
{
|
||||
return getCycledIngredients( cycleticks / 20, this.ingredients );
|
||||
return this.getCycledIngredients( NEIInscriberRecipeHandler.this.cycleticks / 20, this.ingredients );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -55,11 +55,11 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
|
||||
|
||||
private void addRecipe(AEItemDefinition def, String msg)
|
||||
{
|
||||
if ( NEIServerUtils.areStacksSameTypeCrafting( def.stack( 1 ), target ) )
|
||||
if ( NEIServerUtils.areStacksSameTypeCrafting( def.stack( 1 ), this.target ) )
|
||||
{
|
||||
offsets.add( def );
|
||||
outputs.add( new PositionedStack( def.stack( 1 ), 75, 4 ) );
|
||||
details.put( def, msg );
|
||||
this.offsets.add( def );
|
||||
this.outputs.add( new PositionedStack( def.stack( 1 ), 75, 4 ) );
|
||||
this.details.put( def, msg );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,29 +67,29 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
|
||||
{
|
||||
|
||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.CertusQuartzWorldGen ) )
|
||||
addRecipe( AEApi.instance().materials().materialCertusQuartzCrystalCharged,
|
||||
this.addRecipe( AEApi.instance().materials().materialCertusQuartzCrystalCharged,
|
||||
GuiText.ChargedQuartz.getLocal() + "\n\n" + GuiText.ChargedQuartzFind.getLocal() );
|
||||
else
|
||||
addRecipe( AEApi.instance().materials().materialCertusQuartzCrystalCharged, GuiText.ChargedQuartzFind.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialCertusQuartzCrystalCharged, GuiText.ChargedQuartzFind.getLocal() );
|
||||
|
||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.MeteoriteWorldGen ) )
|
||||
{
|
||||
addRecipe( AEApi.instance().materials().materialLogicProcessorPress, GuiText.inWorldCraftingPresses.getLocal() );
|
||||
addRecipe( AEApi.instance().materials().materialCalcProcessorPress, GuiText.inWorldCraftingPresses.getLocal() );
|
||||
addRecipe( AEApi.instance().materials().materialEngProcessorPress, GuiText.inWorldCraftingPresses.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialLogicProcessorPress, GuiText.inWorldCraftingPresses.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialCalcProcessorPress, GuiText.inWorldCraftingPresses.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialEngProcessorPress, GuiText.inWorldCraftingPresses.getLocal() );
|
||||
}
|
||||
|
||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.inWorldFluix ) )
|
||||
addRecipe( AEApi.instance().materials().materialFluixCrystal, GuiText.inWorldFluix.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialFluixCrystal, GuiText.inWorldFluix.getLocal() );
|
||||
|
||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.inWorldSingularity ) )
|
||||
addRecipe( AEApi.instance().materials().materialQESingularity, GuiText.inWorldSingularity.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialQESingularity, GuiText.inWorldSingularity.getLocal() );
|
||||
|
||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.inWorldPurification ) )
|
||||
{
|
||||
addRecipe( AEApi.instance().materials().materialPurifiedCertusQuartzCrystal, GuiText.inWorldPurificationCertus.getLocal() );
|
||||
addRecipe( AEApi.instance().materials().materialPurifiedNetherQuartzCrystal, GuiText.inWorldPurificationNether.getLocal() );
|
||||
addRecipe( AEApi.instance().materials().materialPurifiedFluixCrystal, GuiText.inWorldPurificationFluix.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialPurifiedCertusQuartzCrystal, GuiText.inWorldPurificationCertus.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialPurifiedNetherQuartzCrystal, GuiText.inWorldPurificationNether.getLocal() );
|
||||
this.addRecipe( AEApi.instance().materials().materialPurifiedFluixCrystal, GuiText.inWorldPurificationFluix.getLocal() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
|
||||
@Override
|
||||
public int numRecipes()
|
||||
{
|
||||
return offsets.size();
|
||||
return this.offsets.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -139,7 +139,7 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
|
||||
@Override
|
||||
public PositionedStack getResultStack(int recipe)
|
||||
{
|
||||
return outputs.get( recipe );
|
||||
return this.outputs.get( recipe );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,7 +200,7 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
|
||||
{
|
||||
try
|
||||
{
|
||||
return getClass().newInstance();
|
||||
return this.getClass().newInstance();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -217,7 +217,7 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
|
||||
@Override
|
||||
public ICraftingHandler getRecipeHandler(String outputId, Object... results)
|
||||
{
|
||||
NEIWorldCraftingHandler g = newInstance();
|
||||
NEIWorldCraftingHandler g = this.newInstance();
|
||||
if ( results.length > 0 && results[0] instanceof ItemStack )
|
||||
{
|
||||
g.target = (ItemStack) results[0];
|
||||
|
||||
@@ -33,31 +33,31 @@ public class RB extends BaseModule implements IRB
|
||||
final private IOrientable internal;
|
||||
|
||||
public RBWrapper(IOrientable ww) {
|
||||
internal = ww;
|
||||
this.internal = ww;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeRotated()
|
||||
{
|
||||
return internal.canBeRotated();
|
||||
return this.internal.canBeRotated();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getForward()
|
||||
{
|
||||
return internal.getForward();
|
||||
return this.internal.getForward();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getUp()
|
||||
{
|
||||
return internal.getUp();
|
||||
return this.internal.getUp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation(ForgeDirection Forward, ForgeDirection Up)
|
||||
{
|
||||
internal.setOrientation( Forward, Up );
|
||||
this.internal.setOrientation( Forward, Up );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public class RB extends BaseModule implements IRB
|
||||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
TestClass( IOrientable.class );
|
||||
this.TestClass( IOrientable.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,8 +37,8 @@ public class RC extends BaseModule implements IRC
|
||||
}
|
||||
|
||||
public RC() {
|
||||
TestClass( RailcraftCraftingManager.class );
|
||||
TestClass( IRockCrusherRecipe.class );
|
||||
this.TestClass( RailcraftCraftingManager.class );
|
||||
this.TestClass( IRockCrusherRecipe.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,10 +31,10 @@ public class RF extends BaseModule
|
||||
public static RF instance;
|
||||
|
||||
public RF() {
|
||||
TestClass( cofh.api.energy.IEnergyReceiver.class );
|
||||
TestClass( cofh.api.energy.IEnergyProvider.class );
|
||||
TestClass( cofh.api.energy.IEnergyHandler.class );
|
||||
TestClass( cofh.api.energy.IEnergyConnection.class );
|
||||
this.TestClass( cofh.api.energy.IEnergyReceiver.class );
|
||||
this.TestClass( cofh.api.energy.IEnergyProvider.class );
|
||||
this.TestClass( cofh.api.energy.IEnergyHandler.class );
|
||||
this.TestClass( cofh.api.energy.IEnergyConnection.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,17 +55,17 @@ public class RF extends BaseModule
|
||||
@Override
|
||||
public void PostInit()
|
||||
{
|
||||
RFStack( "ExtraUtilities", "extractor_base", 12 );
|
||||
RFStack( "ExtraUtilities", "pipes", 11 );
|
||||
RFStack( "ExtraUtilities", "pipes", 14 );
|
||||
RFStack( "ExtraUtilities", "generator", OreDictionary.WILDCARD_VALUE );
|
||||
this.RFStack( "ExtraUtilities", "extractor_base", 12 );
|
||||
this.RFStack( "ExtraUtilities", "pipes", 11 );
|
||||
this.RFStack( "ExtraUtilities", "pipes", 14 );
|
||||
this.RFStack( "ExtraUtilities", "generator", OreDictionary.WILDCARD_VALUE );
|
||||
|
||||
RFStack( "ThermalExpansion", "Cell", OreDictionary.WILDCARD_VALUE );
|
||||
RFStack( "ThermalExpansion", "Dynamo", OreDictionary.WILDCARD_VALUE );
|
||||
this.RFStack( "ThermalExpansion", "Cell", OreDictionary.WILDCARD_VALUE );
|
||||
this.RFStack( "ThermalExpansion", "Dynamo", OreDictionary.WILDCARD_VALUE );
|
||||
|
||||
RFStack( "EnderIO", "itemPowerConduit", OreDictionary.WILDCARD_VALUE );
|
||||
RFStack( "EnderIO", "blockCapacitorBank", 0 );
|
||||
RFStack( "EnderIO", "blockPowerMonitor", 0 );
|
||||
this.RFStack( "EnderIO", "itemPowerConduit", OreDictionary.WILDCARD_VALUE );
|
||||
this.RFStack( "EnderIO", "blockCapacitorBank", 0 );
|
||||
this.RFStack( "EnderIO", "blockPowerMonitor", 0 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class RFItem extends BaseModule
|
||||
public static RFItem instance;
|
||||
|
||||
public RFItem() {
|
||||
TestClass( cofh.api.energy.IEnergyContainerItem.class );
|
||||
this.TestClass( cofh.api.energy.IEnergyContainerItem.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ public class RotaryCraft extends BaseModule
|
||||
public static RotaryCraft instance;
|
||||
|
||||
public RotaryCraft() {
|
||||
TestClass( Reika.RotaryCraft.API.ShaftPowerReceiver.class );
|
||||
this.TestClass( Reika.RotaryCraft.API.ShaftPowerReceiver.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,8 +77,8 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
|
||||
@Override
|
||||
public void Init() throws Throwable
|
||||
{
|
||||
TestClass( IWailaDataProvider.class );
|
||||
TestClass( IWailaRegistrar.class );
|
||||
this.TestClass( IWailaDataProvider.class );
|
||||
this.TestClass( IWailaRegistrar.class );
|
||||
FMLInterModComms.sendMessage( "Waila", "register", this.getClass().getName() + ".register" );
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
|
||||
{
|
||||
}
|
||||
|
||||
return getBody( itemStack, currentToolTip, accessor.getPlayer(), nbt, te, mop );
|
||||
return this.getBody( itemStack, currentToolTip, accessor.getPlayer(), nbt, te, mop );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,7 +129,7 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
|
||||
{
|
||||
}
|
||||
|
||||
return getBody( itemStack, currentToolTip, accessor.getPlayer(), nbt, te, mop );
|
||||
return this.getBody( itemStack, currentToolTip, accessor.getPlayer(), nbt, te, mop );
|
||||
}
|
||||
|
||||
public List<String> getBody(ItemStack itemStack, List<String> currentToolTip, EntityPlayer player, NBTTagCompound nbt, TileEntity te, MovingObjectPosition mop)
|
||||
|
||||
@@ -36,8 +36,8 @@ public class BSCrate implements IMEInventory<IAEItemStack>
|
||||
final ForgeDirection side;
|
||||
|
||||
public BSCrate(Object object, ForgeDirection d) {
|
||||
cs = (ICrateStorage) object;
|
||||
side = d;
|
||||
this.cs = (ICrateStorage) object;
|
||||
this.side = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -52,7 +52,7 @@ public class BSCrate implements IMEInventory<IAEItemStack>
|
||||
if ( mode == Actionable.SIMULATE )
|
||||
return null;
|
||||
|
||||
ItemStack failed = cs.insertItems( input.getItemStack() );
|
||||
ItemStack failed = this.cs.insertItems( input.getItemStack() );
|
||||
if ( failed == null )
|
||||
return null;
|
||||
input.setStackSize( failed.stackSize );
|
||||
@@ -64,18 +64,18 @@ public class BSCrate implements IMEInventory<IAEItemStack>
|
||||
{
|
||||
if ( mode == Actionable.SIMULATE )
|
||||
{
|
||||
int howMany = cs.getItemCount( request.getItemStack() );
|
||||
int howMany = this.cs.getItemCount( request.getItemStack() );
|
||||
return howMany > request.getStackSize() ? request : request.copy().setStackSize( howMany );
|
||||
}
|
||||
|
||||
ItemStack Obtained = cs.extractItems( request.getItemStack(), (int) request.getStackSize() );
|
||||
ItemStack Obtained = this.cs.extractItems( request.getItemStack(), (int) request.getStackSize() );
|
||||
return AEItemStack.create( Obtained );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemList getAvailableItems(IItemList out)
|
||||
{
|
||||
for (ItemStack is : cs.getContents())
|
||||
for (ItemStack is : this.cs.getContents())
|
||||
{
|
||||
out.add( AEItemStack.create( is ) );
|
||||
}
|
||||
|
||||
@@ -37,8 +37,8 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
final ForgeDirection side;
|
||||
|
||||
public BSCrateStorageAdaptor(Object te, ForgeDirection d) {
|
||||
cs = (ICrateStorage) te;
|
||||
side = d;
|
||||
this.cs = (ICrateStorage) te;
|
||||
this.side = d;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +46,7 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
{
|
||||
ItemStack target = null;
|
||||
|
||||
for (ItemStack is : cs.getContents())
|
||||
for (ItemStack is : this.cs.getContents())
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
@@ -65,7 +65,7 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
{
|
||||
ItemStack f = Platform.cloneItemStack( target );
|
||||
f.stackSize = how_many;
|
||||
return cs.extractItems( f, how_many );
|
||||
return this.cs.extractItems( f, how_many );
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -76,7 +76,7 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
{
|
||||
ItemStack target = null;
|
||||
|
||||
for (ItemStack is : cs.getContents())
|
||||
for (ItemStack is : this.cs.getContents())
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
@@ -93,7 +93,7 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
|
||||
if ( target != null )
|
||||
{
|
||||
int cnt = cs.getItemCount( target );
|
||||
int cnt = this.cs.getItemCount( target );
|
||||
if ( cnt == 0 )
|
||||
return null;
|
||||
if ( cnt > how_many )
|
||||
@@ -111,7 +111,7 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
{
|
||||
ItemStack target = null;
|
||||
|
||||
for (ItemStack is : cs.getContents())
|
||||
for (ItemStack is : this.cs.getContents())
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
@@ -130,7 +130,7 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
{
|
||||
ItemStack f = Platform.cloneItemStack( target );
|
||||
f.stackSize = amount;
|
||||
return cs.extractItems( f, amount );
|
||||
return this.cs.extractItems( f, amount );
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -141,7 +141,7 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
{
|
||||
ItemStack target = null;
|
||||
|
||||
for (ItemStack is : cs.getContents())
|
||||
for (ItemStack is : this.cs.getContents())
|
||||
{
|
||||
if ( is != null )
|
||||
{
|
||||
@@ -158,7 +158,7 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
|
||||
if ( target != null )
|
||||
{
|
||||
int cnt = cs.getItemCount( target );
|
||||
int cnt = this.cs.getItemCount( target );
|
||||
if ( cnt == 0 )
|
||||
return null;
|
||||
if ( cnt > how_many )
|
||||
@@ -174,13 +174,13 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
@Override
|
||||
public ItemStack addItems(ItemStack A)
|
||||
{
|
||||
return cs.insertItems( A );
|
||||
return this.cs.insertItems( A );
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack simulateAdd(ItemStack A)
|
||||
{
|
||||
int items = cs.getSpaceForItem( A );
|
||||
int items = this.cs.getSpaceForItem( A );
|
||||
ItemStack B = Platform.cloneItemStack( A );
|
||||
if ( A.stackSize <= items )
|
||||
return null;
|
||||
@@ -191,13 +191,13 @@ public class BSCrateStorageAdaptor extends InventoryAdaptor
|
||||
@Override
|
||||
public boolean containsItems()
|
||||
{
|
||||
return cs.getUniqueItems() > 0;
|
||||
return this.cs.getUniqueItems() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<ItemSlot> iterator()
|
||||
{
|
||||
return new StackToSlotIterator( cs.getContents().iterator() );
|
||||
return new StackToSlotIterator( this.cs.getContents().iterator() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,8 +36,8 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
final IFZ fProxy;
|
||||
|
||||
public FactorizationBarrel(IFZ proxy, TileEntity tile) {
|
||||
te = tile;
|
||||
fProxy = proxy;
|
||||
this.te = tile;
|
||||
this.fProxy = proxy;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,17 +48,17 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
|
||||
public long remainingItemTypes()
|
||||
{
|
||||
return fProxy.barrelGetItem( te ) == null ? 1 : 0;
|
||||
return this.fProxy.barrelGetItem( this.te ) == null ? 1 : 0;
|
||||
}
|
||||
|
||||
public long remainingItemCount()
|
||||
{
|
||||
return fProxy.barrelGetMaxItemCount( te ) - fProxy.barrelGetItemCount( te );
|
||||
return this.fProxy.barrelGetMaxItemCount( this.te ) - this.fProxy.barrelGetItemCount( this.te );
|
||||
}
|
||||
|
||||
public boolean containsItemType(IAEItemStack i, boolean acceptEmpty)
|
||||
{
|
||||
ItemStack currentItem = fProxy.barrelGetItem( te );
|
||||
ItemStack currentItem = this.fProxy.barrelGetItem( this.te );
|
||||
|
||||
// empty barrels want your love too!
|
||||
if ( acceptEmpty && currentItem == null )
|
||||
@@ -69,7 +69,7 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
|
||||
public long storedItemCount()
|
||||
{
|
||||
return fProxy.barrelGetItemCount( te );
|
||||
return this.fProxy.barrelGetItemCount( this.te );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,20 +84,20 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
if ( shared.isItemDamaged() )
|
||||
return input;
|
||||
|
||||
if ( remainingItemTypes() > 0 )
|
||||
if ( this.remainingItemTypes() > 0 )
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
fProxy.setItemType( te, input.getItemStack() );
|
||||
this.fProxy.setItemType( this.te, input.getItemStack() );
|
||||
}
|
||||
|
||||
if ( containsItemType( input, mode == Actionable.SIMULATE ) )
|
||||
if ( this.containsItemType( input, mode == Actionable.SIMULATE ) )
|
||||
{
|
||||
int max = fProxy.barrelGetMaxItemCount( te );
|
||||
int newTotal = (int) storedItemCount() + (int) input.getStackSize();
|
||||
int max = this.fProxy.barrelGetMaxItemCount( this.te );
|
||||
int newTotal = (int) this.storedItemCount() + (int) input.getStackSize();
|
||||
if ( newTotal > max )
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
fProxy.barrelSetCount( te, max );
|
||||
this.fProxy.barrelSetCount( this.te, max );
|
||||
IAEItemStack result = input.copy();
|
||||
result.setStackSize( newTotal - max );
|
||||
return result;
|
||||
@@ -105,7 +105,7 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
else
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
fProxy.barrelSetCount( te, newTotal );
|
||||
this.fProxy.barrelSetCount( this.te, newTotal );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -116,15 +116,15 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
@Override
|
||||
public IAEItemStack extractItems(IAEItemStack request, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
if ( containsItemType( request, false ) )
|
||||
if ( this.containsItemType( request, false ) )
|
||||
{
|
||||
int howMany = (int) storedItemCount();
|
||||
int howMany = (int) this.storedItemCount();
|
||||
if ( request.getStackSize() >= howMany )
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
{
|
||||
fProxy.setItemType( te, null );
|
||||
fProxy.barrelSetCount( te, 0 );
|
||||
this.fProxy.setItemType( this.te, null );
|
||||
this.fProxy.barrelSetCount( this.te, 0 );
|
||||
}
|
||||
|
||||
IAEItemStack r = request.copy();
|
||||
@@ -134,7 +134,7 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
else
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
fProxy.barrelSetCount( te, (int) (howMany - request.getStackSize()) );
|
||||
this.fProxy.barrelSetCount( this.te, (int) (howMany - request.getStackSize()) );
|
||||
return request.copy();
|
||||
}
|
||||
}
|
||||
@@ -144,10 +144,10 @@ public class FactorizationBarrel implements IMEInventory<IAEItemStack>
|
||||
@Override
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList out)
|
||||
{
|
||||
ItemStack i = fProxy.barrelGetItem( te );
|
||||
ItemStack i = this.fProxy.barrelGetItem( this.te );
|
||||
if ( i != null )
|
||||
{
|
||||
i.stackSize = fProxy.barrelGetItemCount( te );
|
||||
i.stackSize = this.fProxy.barrelGetItemCount( this.te );
|
||||
out.addStorage( AEItemStack.create( i ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -31,49 +31,49 @@ public class MJPerdition extends BaseMJPerdition
|
||||
final protected PowerHandler bcPowerHandler;
|
||||
|
||||
public MJPerdition(IPowerReceptor te) {
|
||||
bcPowerHandler = new PowerHandler( te, Type.MACHINE );
|
||||
this.bcPowerHandler = new PowerHandler( te, Type.MACHINE );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void Tick()
|
||||
{
|
||||
bcPowerHandler.update();
|
||||
this.bcPowerHandler.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound data)
|
||||
{
|
||||
bcPowerHandler.writeToNBT( data, "bcPowerHandler" );
|
||||
this.bcPowerHandler.writeToNBT( data, "bcPowerHandler" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound data)
|
||||
{
|
||||
bcPowerHandler.readFromNBT( data, "bcPowerHandler" );
|
||||
this.bcPowerHandler.readFromNBT( data, "bcPowerHandler" );
|
||||
}
|
||||
|
||||
@Override
|
||||
public PowerReceiver getPowerReceiver()
|
||||
{
|
||||
return bcPowerHandler.getPowerReceiver();
|
||||
return this.bcPowerHandler.getPowerReceiver();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double useEnergy(double min, double max, boolean doUse)
|
||||
{
|
||||
return bcPowerHandler.useEnergy( min, max, doUse );
|
||||
return this.bcPowerHandler.useEnergy( min, max, doUse );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEnergy(float failed)
|
||||
{
|
||||
bcPowerHandler.addEnergy( failed );
|
||||
this.bcPowerHandler.addEnergy( failed );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(int i, int j, float f, int k)
|
||||
{
|
||||
bcPowerHandler.configure( i, j, f, k );
|
||||
this.bcPowerHandler.configure( i, j, f, k );
|
||||
}
|
||||
|
||||
}
|
||||
+11
-11
@@ -36,8 +36,8 @@ public class MinefactoryReloadedDeepStorageUnit implements IMEInventory<IAEItemS
|
||||
final TileEntity te;
|
||||
|
||||
public MinefactoryReloadedDeepStorageUnit(TileEntity ta) {
|
||||
te = ta;
|
||||
dsu = (IDeepStorageUnit) ta;
|
||||
this.te = ta;
|
||||
this.dsu = (IDeepStorageUnit) ta;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,12 +49,12 @@ public class MinefactoryReloadedDeepStorageUnit implements IMEInventory<IAEItemS
|
||||
@Override
|
||||
public IAEItemStack injectItems(IAEItemStack input, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
ItemStack is = dsu.getStoredItemType();
|
||||
ItemStack is = this.dsu.getStoredItemType();
|
||||
if ( is != null )
|
||||
{
|
||||
if ( input.equals( is ) )
|
||||
{
|
||||
long max = dsu.getMaxStoredCount();
|
||||
long max = this.dsu.getMaxStoredCount();
|
||||
long storedItems = is.stackSize;
|
||||
if ( max == storedItems )
|
||||
return input;
|
||||
@@ -65,13 +65,13 @@ public class MinefactoryReloadedDeepStorageUnit implements IMEInventory<IAEItemS
|
||||
IAEItemStack overflow = AEItemStack.create( is );
|
||||
overflow.setStackSize( (int) (storedItems - max) );
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemCount( (int) max );
|
||||
this.dsu.setStoredItemCount( (int) max );
|
||||
return overflow;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemCount( is.stackSize + (int) input.getStackSize() );
|
||||
this.dsu.setStoredItemCount( is.stackSize + (int) input.getStackSize() );
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class MinefactoryReloadedDeepStorageUnit implements IMEInventory<IAEItemS
|
||||
if ( input.getTagCompound() != null )
|
||||
return input;
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemType( input.getItemStack(), (int) input.getStackSize() );
|
||||
this.dsu.setStoredItemType( input.getItemStack(), (int) input.getStackSize() );
|
||||
return null;
|
||||
}
|
||||
return input;
|
||||
@@ -90,20 +90,20 @@ public class MinefactoryReloadedDeepStorageUnit implements IMEInventory<IAEItemS
|
||||
@Override
|
||||
public IAEItemStack extractItems(IAEItemStack request, Actionable mode, BaseActionSource src)
|
||||
{
|
||||
ItemStack is = dsu.getStoredItemType();
|
||||
ItemStack is = this.dsu.getStoredItemType();
|
||||
if ( request.equals( is ) )
|
||||
{
|
||||
if ( request.getStackSize() >= is.stackSize )
|
||||
{
|
||||
is = is.copy();
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemCount( 0 );
|
||||
this.dsu.setStoredItemCount( 0 );
|
||||
return AEItemStack.create( is );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( mode == Actionable.MODULATE )
|
||||
dsu.setStoredItemCount( is.stackSize - (int) request.getStackSize() );
|
||||
this.dsu.setStoredItemCount( is.stackSize - (int) request.getStackSize() );
|
||||
return request.copy();
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ public class MinefactoryReloadedDeepStorageUnit implements IMEInventory<IAEItemS
|
||||
@Override
|
||||
public IItemList<IAEItemStack> getAvailableItems(IItemList<IAEItemStack> out)
|
||||
{
|
||||
ItemStack is = dsu.getStoredItemType();
|
||||
ItemStack is = this.dsu.getStoredItemType();
|
||||
if ( is != null )
|
||||
{
|
||||
out.add( AEItemStack.create( is ) );
|
||||
|
||||
Reference in New Issue
Block a user