Merge pull request #157 from thatsIch/Spelling

Spelling
This commit is contained in:
Chris
2014-09-28 10:09:39 -07:00
220 changed files with 1644 additions and 1665 deletions
@@ -10,8 +10,8 @@ import cpw.mods.fml.common.Loader;
public class IntegrationNode
{
IntegrationStage state = IntegrationStage.PREINIT;
IntegrationStage failedStage = IntegrationStage.PREINIT;
IntegrationStage state = IntegrationStage.PRE_INIT;
IntegrationStage failedStage = IntegrationStage.PRE_INIT;
Throwable exception = null;
String displayName;
@@ -23,11 +23,11 @@ public class IntegrationNode
Object instance;
IIntegrationModule mod = null;
public IntegrationNode(String dspname, String _modID, IntegrationType sName, String n) {
displayName = dspname;
shortName = sName;
modID = _modID;
name = n;
public IntegrationNode(String displayName, String modID, IntegrationType shortName, String name) {
this.displayName = displayName;
this.shortName = shortName;
this.modID = modID;
this.name = name;
}
@Override
@@ -47,7 +47,7 @@ public class IntegrationNode
{
switch (stage)
{
case PREINIT:
case PRE_INIT:
boolean enabled = modID == null || Loader.isModLoaded( modID );
@@ -77,10 +77,10 @@ public class IntegrationNode
break;
case INIT:
mod.Init();
state = IntegrationStage.POSTINIT;
state = IntegrationStage.POST_INIT;
break;
case POSTINIT:
case POST_INIT:
mod.PostInit();
state = IntegrationStage.READY;
@@ -98,7 +98,7 @@ public class IntegrationNode
}
}
if ( stage == IntegrationStage.POSTINIT )
if ( stage == IntegrationStage.POST_INIT )
{
if ( state == IntegrationStage.FAILED )
{
@@ -115,8 +115,8 @@ public class IntegrationNode
public boolean isActive()
{
if ( state == IntegrationStage.PREINIT )
Call( IntegrationStage.PREINIT );
if ( state == IntegrationStage.PRE_INIT )
Call( IntegrationStage.PRE_INIT );
return state != IntegrationStage.FAILED;
}
@@ -29,16 +29,16 @@ public class IntegrationRegistry
public void init()
{
for (IntegrationNode node : modules)
node.Call( IntegrationStage.PREINIT );
node.Call( IntegrationStage.PRE_INIT );
for (IntegrationNode node : modules)
node.Call( IntegrationStage.INIT );
}
public void postinit()
public void postInit()
{
for (IntegrationNode node : modules)
node.Call( IntegrationStage.POSTINIT );
node.Call( IntegrationStage.POST_INIT );
}
public String getStatus()
@@ -3,7 +3,7 @@ package appeng.integration;
public enum IntegrationStage
{
PREINIT, INIT, POSTINIT,
PRE_INIT, INIT, POST_INIT,
FAILED, READY
@@ -8,6 +8,6 @@ public interface INEI
void drawSlot(Slot s);
RenderItem setItemRender(RenderItem aeri2);
RenderItem setItemRender(RenderItem renderItem);
}
@@ -4,9 +4,8 @@ import net.minecraft.nbt.NBTTagCompound;
import appeng.transformer.annotations.integration.Method;
import buildcraft.api.power.PowerHandler.PowerReceiver;
public abstract class BaseMJperdition
public abstract class BaseMJPerdition
{
@Method(iname = "MJ5")
public abstract PowerReceiver getPowerReceiver();
@@ -21,5 +20,4 @@ public abstract class BaseMJperdition
public abstract void readFromNBT(NBTTagCompound tag);
public abstract void Tick();
}
@@ -237,14 +237,14 @@ public class BC extends BaseModule implements IBC
{
SchematicRegistry.declareBlueprintSupport( AppEng.modid );
Blocks blks = AEApi.instance().blocks();
Block cable = blks.blockMultiPart.block();
for (Field f : blks.getClass().getFields())
Blocks blocks = AEApi.instance().blocks();
Block cable = blocks.blockMultiPart.block();
for (Field f : blocks.getClass().getFields())
{
AEItemDefinition def;
try
{
def = (AEItemDefinition) f.get( blks );
def = (AEItemDefinition) f.get( blocks );
if ( def != null )
{
Block myBlock = def.block();
@@ -1,12 +1,12 @@
package appeng.integration.modules;
import appeng.integration.modules.helpers.MinefactoryReloadedDeepStorageUnit;
import net.minecraft.tileentity.TileEntity;
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
import appeng.api.AEApi;
import appeng.api.storage.IMEInventory;
import appeng.integration.BaseModule;
import appeng.integration.abstraction.IDSU;
import appeng.integration.modules.helpers.MFRDSU;
import appeng.integration.modules.helpers.MFRDSUHandler;
public class DSU extends BaseModule implements IDSU
@@ -17,7 +17,7 @@ public class DSU extends BaseModule implements IDSU
@Override
public IMEInventory getDSU(TileEntity te)
{
return new MFRDSU( te );
return new MinefactoryReloadedDeepStorageUnit( te );
}
@Override
@@ -88,7 +88,7 @@ public class ImmibisMicroblocks extends BaseModule implements IImmibisMicroblock
catch (Throwable e)
{
canConvertTiles = false;
return null; // nevermind..
return null;
}
TileEntity tx = w.getTileEntity( x, y, z );
@@ -40,8 +40,8 @@ public class MJ6 extends BaseModule implements IMJ6
{
if ( te instanceof IPowerReceptor )
{
final IPowerReceptor recp = (IPowerReceptor) te;
final PowerReceiver ph = recp.getPowerReceiver( side );
final IPowerReceptor receptor = (IPowerReceptor) te;
final PowerReceiver ph = receptor.getPowerReceiver( side );
if ( ph == null )
return null;
@@ -114,12 +114,12 @@ public class NEI extends BaseModule implements IIntegrationModule, INEI, IContai
}
@Override
public RenderItem setItemRender(RenderItem aeri2)
public RenderItem setItemRender(RenderItem renderItem)
{
try
{
RenderItem ri = GuiContainerManager.drawItems;
GuiContainerManager.drawItems = aeri2;
GuiContainerManager.drawItems = renderItem;
return ri;
}
catch (Throwable t)
@@ -135,12 +135,12 @@ public class NEI extends BaseModule implements IIntegrationModule, INEI, IContai
}
@Override
public List<String> handleItemTooltip(GuiContainer guiScreen, ItemStack stack, int mousex, int mousey, List<String> currenttip)
public List<String> handleItemTooltip(GuiContainer guiScreen, ItemStack stack, int mouseX, int mouseY, List<String> currentToolTip)
{
if ( guiScreen instanceof AEBaseMEGui )
return ((AEBaseMEGui) guiScreen).handleItemTooltip( stack, mousex, mousey, currenttip );
return ((AEBaseMEGui) guiScreen).handleItemTooltip( stack, mouseX, mouseY, currentToolTip );
return currenttip;
return currentToolTip;
}
@Override
@@ -50,16 +50,16 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
{
if ( (outputId.equals( "crafting" )) && (getClass() == NEIAEShapedRecipeHandler.class) )
{
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe irecipe : allrecipes)
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe recipe : recipes)
{
if ( (irecipe instanceof ShapedRecipe) )
if ( (recipe instanceof ShapedRecipe) )
{
if ( ((ShapedRecipe) irecipe).isEnabled() )
if ( ((ShapedRecipe) recipe).isEnabled() )
{
CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe );
recipe.computeVisuals();
arecipes.add( recipe );
CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe );
cachedRecipe.computeVisuals();
arecipes.add( cachedRecipe );
}
}
}
@@ -72,16 +72,16 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
public void loadCraftingRecipes(ItemStack result)
{
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe irecipe : allrecipes)
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe recipe : recipes)
{
if ( (irecipe instanceof ShapedRecipe) )
if ( (recipe instanceof ShapedRecipe) )
{
if ( ((ShapedRecipe) irecipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( irecipe.getRecipeOutput(), result ) )
if ( ((ShapedRecipe) recipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( recipe.getRecipeOutput(), result ) )
{
CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe );
recipe.computeVisuals();
arecipes.add( recipe );
CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe );
cachedRecipe.computeVisuals();
arecipes.add( cachedRecipe );
}
}
}
@@ -89,20 +89,20 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
public void loadUsageRecipes(ItemStack ingredient)
{
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe irecipe : allrecipes)
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe recipe : recipes)
{
if ( (irecipe instanceof ShapedRecipe) )
if ( (recipe instanceof ShapedRecipe) )
{
CachedShapedRecipe recipe = new CachedShapedRecipe( (ShapedRecipe) irecipe );
CachedShapedRecipe cachedRecipe = new CachedShapedRecipe( (ShapedRecipe) recipe );
if ( ((ShapedRecipe) irecipe).isEnabled() && recipe.contains( recipe.ingredients, ingredient.getItem() ) )
if ( ((ShapedRecipe) recipe).isEnabled() && cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() ) )
{
recipe.computeVisuals();
if ( recipe.contains( recipe.ingredients, ingredient ) )
cachedRecipe.computeVisuals();
if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) )
{
recipe.setIngredientPermutation( recipe.ingredients, ingredient );
arecipes.add( recipe );
cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient );
arecipes.add( cachedRecipe );
}
}
}
@@ -165,10 +165,10 @@ public class NEIAEShapedRecipeHandler extends TemplateRecipeHandler
public ArrayList<PositionedStack> ingredients;
public PositionedStack result;
public CachedShapedRecipe(ShapedRecipe irecipe) {
result = new PositionedStack( irecipe.getRecipeOutput(), 119, 24 );
public CachedShapedRecipe(ShapedRecipe recipe) {
result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
ingredients = new ArrayList<PositionedStack>();
setIngredients( irecipe.getWidth(), irecipe.getHeight(), irecipe.getIngredients() );
setIngredients( recipe.getWidth(), recipe.getHeight(), recipe.getIngredients() );
}
public void setIngredients(int width, int height, Object[] items)
@@ -50,16 +50,16 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
{
if ( (outputId.equals( "crafting" )) && (getClass() == NEIAEShapelessRecipeHandler.class) )
{
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe irecipe : allrecipes)
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe recipe : recipes)
{
if ( (irecipe instanceof ShapelessRecipe) )
if ( (recipe instanceof ShapelessRecipe) )
{
if ( ((ShapelessRecipe) irecipe).isEnabled() )
if ( ((ShapelessRecipe) recipe).isEnabled() )
{
CachedShapelessRecipe recipe = new CachedShapelessRecipe( (ShapelessRecipe) irecipe );
recipe.computeVisuals();
this.arecipes.add( recipe );
CachedShapelessRecipe cachedRecipe = new CachedShapelessRecipe( (ShapelessRecipe) recipe );
cachedRecipe.computeVisuals();
this.arecipes.add( cachedRecipe );
}
}
}
@@ -72,16 +72,16 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
public void loadCraftingRecipes(ItemStack result)
{
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe irecipe : allrecipes)
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe recipe : recipes)
{
if ( (irecipe instanceof ShapelessRecipe) )
if ( (recipe instanceof ShapelessRecipe) )
{
if ( ((ShapelessRecipe) irecipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( irecipe.getRecipeOutput(), result ) )
if ( ((ShapelessRecipe) recipe).isEnabled() && NEIServerUtils.areStacksSameTypeCrafting( recipe.getRecipeOutput(), result ) )
{
CachedShapelessRecipe recipe = new CachedShapelessRecipe( (ShapelessRecipe) irecipe );
recipe.computeVisuals();
arecipes.add( recipe );
CachedShapelessRecipe cachedRecipe = new CachedShapelessRecipe( (ShapelessRecipe) recipe );
cachedRecipe.computeVisuals();
arecipes.add( cachedRecipe );
}
}
}
@@ -89,20 +89,20 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
public void loadUsageRecipes(ItemStack ingredient)
{
List<IRecipe> allrecipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe irecipe : allrecipes)
List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList();
for (IRecipe recipe : recipes)
{
if ( (irecipe instanceof ShapelessRecipe) )
if ( (recipe instanceof ShapelessRecipe) )
{
CachedShapelessRecipe recipe = new CachedShapelessRecipe( (ShapelessRecipe) irecipe );
CachedShapelessRecipe cachedRecipe = new CachedShapelessRecipe( (ShapelessRecipe) recipe );
if ( ((ShapelessRecipe) irecipe).isEnabled() && recipe.contains( recipe.ingredients, ingredient.getItem() ) )
if ( ((ShapelessRecipe) recipe).isEnabled() && cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() ) )
{
recipe.computeVisuals();
if ( recipe.contains( recipe.ingredients, ingredient ) )
cachedRecipe.computeVisuals();
if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) )
{
recipe.setIngredientPermutation( recipe.ingredients, ingredient );
this.arecipes.add( recipe );
cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient );
this.arecipes.add( cachedRecipe );
}
}
}
@@ -165,10 +165,10 @@ public class NEIAEShapelessRecipeHandler extends TemplateRecipeHandler
public ArrayList<PositionedStack> ingredients;
public PositionedStack result;
public CachedShapelessRecipe(ShapelessRecipe irecipe) {
result = new PositionedStack( irecipe.getRecipeOutput(), 119, 24 );
public CachedShapelessRecipe(ShapelessRecipe recipe) {
result = new PositionedStack( recipe.getRecipeOutput(), 119, 24 );
ingredients = new ArrayList<PositionedStack>();
setIngredients( irecipe.getInput().toArray() );
setIngredients( recipe.getInput().toArray() );
}
public void setIngredients(Object[] items)
@@ -24,12 +24,12 @@ public class NEICraftingHandler implements IOverlayHandler
public NEICraftingHandler(int x, int y)
{
offsetx = x;
offsety = y;
offsetX = x;
offsetY = y;
}
int offsetx;
int offsety;
int offsetX;
int offsetY;
@Override
public void overlayRecipe(GuiContainer gui, IRecipeHandler recipe, int recipeIndex, boolean shift)
@@ -57,10 +57,10 @@ public class NEICraftingHandler implements IOverlayHandler
{
for (int i = 0; i < ingredients.size(); i++)// identify slots
{
PositionedStack pstack = ingredients.get( i );
int col = (pstack.relx - 25) / 18;
int row = (pstack.rely - 6) / 18;
if ( pstack.items != null && pstack.items.length > 0 )
PositionedStack positionedStack = ingredients.get( i );
int col = (positionedStack.relx - 25) / 18;
int row = (positionedStack.rely - 6) / 18;
if ( positionedStack.items != null && positionedStack.items.length > 0 )
{
for (Slot slot : (List<Slot>) gui.inventorySlots.inventorySlots)
{
@@ -69,26 +69,26 @@ public class NEICraftingHandler implements IOverlayHandler
Slot ctSlot = (Slot) slot;
if ( ctSlot.getSlotIndex() == col + row * 3 )
{
NBTTagList ilist = new NBTTagList();
NBTTagList tags = new NBTTagList();
List<ItemStack> list = new LinkedList();
// prefer pure crystals.
for (int x = 0; x < pstack.items.length; x++)
for (int x = 0; x < positionedStack.items.length; x++)
{
if ( Platform.isRecipePrioritized( pstack.items[x] ) )
list.add( 0, pstack.items[x] );
if ( Platform.isRecipePrioritized( positionedStack.items[x] ) )
list.add( 0, positionedStack.items[x] );
else
list.add( pstack.items[x] );
list.add( positionedStack.items[x] );
}
for (ItemStack is : list)
{
NBTTagCompound inbt = new NBTTagCompound();
is.writeToNBT( inbt );
ilist.appendTag( inbt );
NBTTagCompound tag = new NBTTagCompound();
is.writeToNBT( tag );
tags.appendTag( tag );
}
recipe.setTag( "#" + ctSlot.getSlotIndex(), ilist );
recipe.setTag( "#" + ctSlot.getSlotIndex(), tags );
break;
}
}
@@ -45,12 +45,12 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
CachedRecipe cr = this.arecipes.get( recipe );
if ( cr instanceof CachedGrindStoneRecipe )
{
CachedGrindStoneRecipe cgsr = (CachedGrindStoneRecipe) cr;
if ( cgsr.hasOptional )
CachedGrindStoneRecipe cachedRecipe = (CachedGrindStoneRecipe) cr;
if ( cachedRecipe.hasOptional )
{
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
int width = fr.getStringWidth( cgsr.Chance );
fr.drawString( cgsr.Chance, (168 - width) / 2, 5, 0 );
int width = fr.getStringWidth( cachedRecipe.Chance );
fr.drawString( cachedRecipe.Chance, (168 - width) / 2, 5, 0 );
}
else
{
@@ -83,13 +83,13 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
{
if ( (outputId.equals( "grindstone" )) && (getClass() == NEIGrinderRecipeHandler.class) )
{
for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes())
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
{
CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe );
if ( recipe != null )
CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe );
if ( cachedRecipe != null )
{
recipe.computeVisuals();
this.arecipes.add( recipe );
cachedRecipe.computeVisuals();
this.arecipes.add( cachedRecipe );
}
}
}
@@ -101,30 +101,30 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
public void loadCraftingRecipes(ItemStack result)
{
for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes())
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
{
if ( NEIServerUtils.areStacksSameTypeCrafting( irecipe.getOutput(), result ) )
if ( NEIServerUtils.areStacksSameTypeCrafting( recipe.getOutput(), result ) )
{
CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe );
recipe.computeVisuals();
this.arecipes.add( recipe );
CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe );
cachedRecipe.computeVisuals();
this.arecipes.add( cachedRecipe );
}
}
}
public void loadUsageRecipes(ItemStack ingredient)
{
for (IGrinderEntry irecipe : AEApi.instance().registries().grinder().getRecipes())
for (IGrinderEntry recipe : AEApi.instance().registries().grinder().getRecipes())
{
CachedGrindStoneRecipe recipe = new CachedGrindStoneRecipe( irecipe );
CachedGrindStoneRecipe cachedRecipe = new CachedGrindStoneRecipe( recipe );
if ( (recipe != null) && (recipe.contains( recipe.ingredients, ingredient.getItem() )) )
if ( (cachedRecipe != null) && (cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() )) )
{
recipe.computeVisuals();
if ( recipe.contains( recipe.ingredients, ingredient ) )
cachedRecipe.computeVisuals();
if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) )
{
recipe.setIngredientPermutation( recipe.ingredients, ingredient );
this.arecipes.add( recipe );
cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient );
this.arecipes.add( cachedRecipe );
}
}
}
@@ -169,19 +169,19 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
boolean hasOptional = false;
public String Chance;
public CachedGrindStoneRecipe(IGrinderEntry irecipe) {
result = new PositionedStack( irecipe.getOutput(), -30 + 107, 47 );
public CachedGrindStoneRecipe(IGrinderEntry recipe) {
result = new PositionedStack( recipe.getOutput(), -30 + 107, 47 );
ingredients = new ArrayList<PositionedStack>();
if ( irecipe.getOptionalOutput() != null )
if ( recipe.getOptionalOutput() != null )
{
hasOptional = true;
Chance = ((int) (irecipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal();
ingredients.add( new PositionedStack( irecipe.getOptionalOutput(), -30 + 107 + 18, 47 ) );
Chance = ((int) (recipe.getOptionalChance() * 100)) + GuiText.OfSecondOutput.getLocal();
ingredients.add( new PositionedStack( recipe.getOptionalOutput(), -30 + 107 + 18, 47 ) );
}
if ( irecipe.getInput() != null )
ingredients.add( new PositionedStack( irecipe.getInput(), 45, 24 ) );
if ( recipe.getInput() != null )
ingredients.add( new PositionedStack( recipe.getInput(), 45, 24 ) );
}
@Override
@@ -55,13 +55,13 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
{
if ( (outputId.equals( "inscriber" )) && (getClass() == NEIInscriberRecipeHandler.class) )
{
for (InscriberRecipe irecipe : Inscribe.recipes)
for (InscriberRecipe recipe : Inscribe.recipes)
{
CachedInscriberRecipe recipe = new CachedInscriberRecipe( irecipe );
if ( recipe != null )
CachedInscriberRecipe cachedRecipe = new CachedInscriberRecipe( recipe );
if ( cachedRecipe != null )
{
recipe.computeVisuals();
this.arecipes.add( recipe );
cachedRecipe.computeVisuals();
this.arecipes.add( cachedRecipe );
}
}
}
@@ -73,30 +73,30 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
public void loadCraftingRecipes(ItemStack result)
{
for (InscriberRecipe irecipe : Inscribe.recipes)
for (InscriberRecipe recipe : Inscribe.recipes)
{
if ( NEIServerUtils.areStacksSameTypeCrafting( irecipe.output, result ) )
if ( NEIServerUtils.areStacksSameTypeCrafting( recipe.output, result ) )
{
CachedInscriberRecipe recipe = new CachedInscriberRecipe( irecipe );
recipe.computeVisuals();
this.arecipes.add( recipe );
CachedInscriberRecipe cachedRecipe = new CachedInscriberRecipe( recipe );
cachedRecipe.computeVisuals();
this.arecipes.add( cachedRecipe );
}
}
}
public void loadUsageRecipes(ItemStack ingredient)
{
for (InscriberRecipe irecipe : Inscribe.recipes)
for (InscriberRecipe recipe : Inscribe.recipes)
{
CachedInscriberRecipe recipe = new CachedInscriberRecipe( irecipe );
CachedInscriberRecipe cachedRecipe = new CachedInscriberRecipe( recipe );
if ( (recipe != null) && (recipe.contains( recipe.ingredients, ingredient.getItem() )) )
if ( (cachedRecipe != null) && (cachedRecipe.contains( cachedRecipe.ingredients, ingredient.getItem() )) )
{
recipe.computeVisuals();
if ( recipe.contains( recipe.ingredients, ingredient ) )
cachedRecipe.computeVisuals();
if ( cachedRecipe.contains( cachedRecipe.ingredients, ingredient ) )
{
recipe.setIngredientPermutation( recipe.ingredients, ingredient );
this.arecipes.add( recipe );
cachedRecipe.setIngredientPermutation( cachedRecipe.ingredients, ingredient );
this.arecipes.add( cachedRecipe );
}
}
}
@@ -138,18 +138,18 @@ public class NEIInscriberRecipeHandler extends TemplateRecipeHandler
public ArrayList<PositionedStack> ingredients;
public PositionedStack result;
public CachedInscriberRecipe(InscriberRecipe irecipe) {
result = new PositionedStack( irecipe.output, 108, 29 );
public CachedInscriberRecipe(InscriberRecipe recipe) {
result = new PositionedStack( recipe.output, 108, 29 );
ingredients = new ArrayList<PositionedStack>();
if ( irecipe.plateA != null )
ingredients.add( new PositionedStack( irecipe.plateA, 40, 5 ) );
if ( recipe.plateA != null )
ingredients.add( new PositionedStack( recipe.plateA, 40, 5 ) );
if ( irecipe.imprintable != null )
ingredients.add( new PositionedStack( irecipe.imprintable, 40 + 18, 28 ) );
if ( recipe.imprintable != null )
ingredients.add( new PositionedStack( recipe.imprintable, 40 + 18, 28 ) );
if ( irecipe.plateB != null )
ingredients.add( new PositionedStack( irecipe.plateB, 40, 51 ) );
if ( recipe.plateB != null )
ingredients.add( new PositionedStack( recipe.plateB, 40, 51 ) );
}
@Override
@@ -106,13 +106,13 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
}
@Override
public List<PositionedStack> getIngredientStacks(int recipe)
public List<PositionedStack> getIngredientStacks(int recipeIndex)
{
return new ArrayList<PositionedStack>();
}
@Override
public List<PositionedStack> getOtherStacks(int recipetype)
public List<PositionedStack> getOtherStacks(int recipeIndex)
{
return new ArrayList<PositionedStack>();
}
@@ -154,15 +154,15 @@ public class NEIWorldCraftingHandler implements ICraftingHandler, IUsageHandler
}
@Override
public List<String> handleTooltip(GuiRecipe gui, List<String> currenttip, int recipe)
public List<String> handleTooltip(GuiRecipe gui, List<String> currentToolTip, int recipe)
{
return currenttip;
return currentToolTip;
}
@Override
public List<String> handleItemTooltip(GuiRecipe gui, ItemStack stack, List<String> currenttip, int recipe)
public List<String> handleItemTooltip(GuiRecipe gui, ItemStack stack, List<String> currentToolTip, int recipe)
{
return currenttip;
return currentToolTip;
}
@Override
@@ -75,7 +75,7 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
}
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
public List<String> getWailaBody(ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config)
{
TileEntity te = accessor.getTileEntity();
MovingObjectPosition mop = accessor.getPosition();
@@ -90,11 +90,11 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
{
}
return getBody( itemStack, currenttip, accessor.getPlayer(), nbt, te, mop );
return getBody( itemStack, currentToolTip, accessor.getPlayer(), nbt, te, mop );
}
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config)
public List<String> getWailaBody(ItemStack itemStack, List<String> currentToolTip, IWailaFMPAccessor accessor, IWailaConfigHandler config)
{
TileEntity te = accessor.getTileEntity();
MovingObjectPosition mop = accessor.getPosition();
@@ -109,10 +109,10 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
{
}
return getBody( itemStack, currenttip, accessor.getPlayer(), nbt, te, mop );
return getBody( itemStack, currentToolTip, accessor.getPlayer(), nbt, te, mop );
}
public List<String> getBody(ItemStack itemStack, List<String> currenttip, EntityPlayer player, NBTTagCompound nbt, TileEntity te, MovingObjectPosition mop)
public List<String> getBody(ItemStack itemStack, List<String> currentToolTip, EntityPlayer player, NBTTagCompound nbt, TileEntity te, MovingObjectPosition mop)
{
Object ThingOfInterest = te;
@@ -143,7 +143,7 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
if ( ic != null && ic.hasKey( "usedChannels" ) )
{
int channels = ic.getByte( "usedChannels" );
currenttip.add( channels + " " + GuiText.Of.getLocal() + " " + (ThingOfInterest instanceof PartDenseCable ? 32 : 8) + " "
currentToolTip.add( channels + " " + GuiText.Of.getLocal() + " " + (ThingOfInterest instanceof PartDenseCable ? 32 : 8) + " "
+ WailaText.Channels.getLocal() );
}
}
@@ -156,7 +156,7 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
{
TileEnergyCell tec = (TileEnergyCell) ThingOfInterest;
long power = (long) (100 * c.getDouble( "internalCurrentPower" ));
currenttip.add( WailaText.Contains + ": " + Platform.formatPowerLong( power, false ) + " / "
currentToolTip.add( WailaText.Contains + ": " + Platform.formatPowerLong( power, false ) + " / "
+ Platform.formatPowerLong( (long) (100 * tec.getAEMaxPower()), false ) );
}
}
@@ -175,19 +175,19 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
if ( stack instanceof IAEItemStack )
{
IAEItemStack ais = (IAEItemStack) stack;
currenttip.add( WailaText.Showing.getLocal() + ": " + ais.getItemStack().getDisplayName() );
currentToolTip.add( WailaText.Showing.getLocal() + ": " + ais.getItemStack().getDisplayName() );
}
if ( stack instanceof IAEFluidStack )
{
IAEFluidStack ais = (IAEFluidStack) stack;
currenttip.add( WailaText.Showing.getLocal() + ": " + ais.getFluid().getLocalizedName( ais.getFluidStack() ) );
currentToolTip.add( WailaText.Showing.getLocal() + ": " + ais.getFluid().getLocalizedName( ais.getFluidStack() ) );
}
if ( isLocked )
currenttip.add( WailaText.Locked.getLocal() );
currentToolTip.add( WailaText.Locked.getLocal() );
else
currenttip.add( WailaText.Unlocked.getLocal() );
currentToolTip.add( WailaText.Unlocked.getLocal() );
}
if ( ThingOfInterest instanceof TileCharger )
@@ -197,8 +197,8 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
ItemStack is = inv.getStackInSlot( 0 );
if ( is != null )
{
currenttip.add( WailaText.Contains + ": " + is.getDisplayName() );
is.getItem().addInformation( is, player, currenttip, true );
currentToolTip.add( WailaText.Contains + ": " + is.getDisplayName() );
is.getItem().addInformation( is, player, currentToolTip, true );
}
}
@@ -206,40 +206,38 @@ public class Waila extends BaseModule implements IWailaDataProvider, IWailaFMPPr
{
IPowerChannelState pbs = (IPowerChannelState) ThingOfInterest;
if ( pbs.isActive() && pbs.isPowered() )
currenttip.add( WailaText.DeviceOnline.getLocal() );
currentToolTip.add( WailaText.DeviceOnline.getLocal() );
else if ( pbs.isPowered() )
currenttip.add( WailaText.DeviceMissingChannel.getLocal() );
currentToolTip.add( WailaText.DeviceMissingChannel.getLocal() );
else
currenttip.add( WailaText.DeviceOffline.getLocal() );
currentToolTip.add( WailaText.DeviceOffline.getLocal() );
}
return currenttip;
return currentToolTip;
}
@Override
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
public List<String> getWailaHead(ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config)
{
return currenttip;
return currentToolTip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config)
public List<String> getWailaTail(ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config)
{
return currenttip;
return currentToolTip;
}
@Override
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config)
public List<String> getWailaHead(ItemStack itemStack, List<String> currentToolTip, IWailaFMPAccessor accessor, IWailaConfigHandler config)
{
return currenttip;
return currentToolTip;
}
@Override
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config)
public List<String> getWailaTail(ItemStack itemStack, List<String> currentToolTip, IWailaFMPAccessor accessor, IWailaConfigHandler config)
{
return currenttip;
return currentToolTip;
}
}
@@ -1,13 +1,13 @@
package appeng.integration.modules.helpers;
import appeng.integration.abstraction.helpers.BaseMJPerdition;
import net.minecraft.nbt.NBTTagCompound;
import appeng.integration.abstraction.helpers.BaseMJperdition;
import buildcraft.api.power.IPowerReceptor;
import buildcraft.api.power.PowerHandler;
import buildcraft.api.power.PowerHandler.PowerReceiver;
import buildcraft.api.power.PowerHandler.Type;
public class MJPerdition extends BaseMJperdition
public class MJPerdition extends BaseMJPerdition
{
final protected PowerHandler bcPowerHandler;
@@ -11,13 +11,13 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.util.item.AEItemStack;
public class MFRDSU implements IMEInventory<IAEItemStack>
public class MinefactoryReloadedDeepStorageUnit implements IMEInventory<IAEItemStack>
{
IDeepStorageUnit dsu;
TileEntity te;
public MFRDSU(TileEntity ta) {
public MinefactoryReloadedDeepStorageUnit(TileEntity ta) {
te = ta;
dsu = (IDeepStorageUnit) ta;
}