summaryrefslogtreecommitdiff
path: root/ihl/processing/chemistry
diff options
context:
space:
mode:
authorFoghrye4 <foghrye4@gmail.com>2017-01-27 11:32:28 +0300
committerFoghrye4 <foghrye4@gmail.com>2017-01-27 11:32:28 +0300
commit2db8e30b1d2151fdde5d08a6c06aef55f0c397d2 (patch)
treee8cd0022f3a30a5c952092e0ea4c7ffdafcdf7bb /ihl/processing/chemistry
parentffe23313fb7421b0a1849b420baf708999023f7b (diff)
License, readme and stuff
Diffstat (limited to 'ihl/processing/chemistry')
-rw-r--r--ihl/processing/chemistry/ApparatusProcessableInvSlot.java2
-rw-r--r--ihl/processing/chemistry/BatteryItem.java16
-rw-r--r--ihl/processing/chemistry/ChemicalReactorContainer.java4
-rw-r--r--ihl/processing/chemistry/ChemicalReactorGui.java5
-rw-r--r--ihl/processing/chemistry/ChemicalReactorTileEntity.java67
-rw-r--r--ihl/processing/chemistry/CryogenicDistillerContainer.java4
-rw-r--r--ihl/processing/chemistry/CryogenicDistillerGui.java5
-rw-r--r--ihl/processing/chemistry/CryogenicDistillerTileEntity.java17
-rw-r--r--ihl/processing/chemistry/ElectricEvaporatorBlock.java1
-rw-r--r--ihl/processing/chemistry/ElectricEvaporatorContainer.java2
-rw-r--r--ihl/processing/chemistry/ElectricEvaporatorTileEntity.java21
-rw-r--r--ihl/processing/chemistry/ElectrolysisBathContainer.java2
-rw-r--r--ihl/processing/chemistry/ElectrolysisBathGui.java2
-rw-r--r--ihl/processing/chemistry/ElectrolysisBathTileEntity.java13
-rw-r--r--ihl/processing/chemistry/EvaporatorBlock.java1
-rw-r--r--ihl/processing/chemistry/EvaporatorContainer.java2
-rw-r--r--ihl/processing/chemistry/EvaporatorTileEntity.java12
-rw-r--r--ihl/processing/chemistry/ExplosiveTileEntity.java49
-rw-r--r--ihl/processing/chemistry/FluidizedBedReactorContainer.java4
-rw-r--r--ihl/processing/chemistry/FluidizedBedReactorGui.java53
-rw-r--r--ihl/processing/chemistry/FluidizedBedReactorTileEntity.java83
-rw-r--r--ihl/processing/chemistry/FractionatorBottomTileEntity.java5
-rw-r--r--ihl/processing/chemistry/FractionatorCoverTileEntity.java3
-rw-r--r--ihl/processing/chemistry/FractionatorSectionTileEntity.java3
-rw-r--r--ihl/processing/chemistry/GaedesMercuryRotaryPumpContainer.java4
-rw-r--r--ihl/processing/chemistry/GaedesMercuryRotaryPumpGui.java9
-rw-r--r--ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java2
-rw-r--r--ihl/processing/chemistry/GoldChimneyKneeTileEntity.java6
-rw-r--r--ihl/processing/chemistry/LabElectrolyzerContainer.java4
-rw-r--r--ihl/processing/chemistry/LabElectrolyzerGui.java6
-rw-r--r--ihl/processing/chemistry/LabElectrolyzerTileEntity.java25
-rw-r--r--ihl/processing/chemistry/LeadOvenContainer.java2
-rw-r--r--ihl/processing/chemistry/LeadOvenGui.java9
-rw-r--r--ihl/processing/chemistry/LeadOvenTileEntity.java22
-rw-r--r--ihl/processing/chemistry/LoomContainer.java2
-rw-r--r--ihl/processing/chemistry/LoomGui.java1
-rw-r--r--ihl/processing/chemistry/LoomTileEntity.java8
-rw-r--r--ihl/processing/chemistry/PaperMachineContainer.java4
-rw-r--r--ihl/processing/chemistry/PaperMachineGui.java5
-rw-r--r--ihl/processing/chemistry/PaperMachineTileEntity.java65
-rw-r--r--ihl/processing/chemistry/PrecipitatorCondenserTileEntity.java3
-rw-r--r--ihl/processing/chemistry/RefluxCondenserTileEntity.java3
42 files changed, 120 insertions, 436 deletions
diff --git a/ihl/processing/chemistry/ApparatusProcessableInvSlot.java b/ihl/processing/chemistry/ApparatusProcessableInvSlot.java
index f0b69b3..3698160 100644
--- a/ihl/processing/chemistry/ApparatusProcessableInvSlot.java
+++ b/ihl/processing/chemistry/ApparatusProcessableInvSlot.java
@@ -18,7 +18,7 @@ public class ApparatusProcessableInvSlot extends InvSlot {
public List<ItemStack> getItemStackList()
{
- List<ItemStack> list = new ArrayList();
+ List<ItemStack> list = new ArrayList<ItemStack>();
for(int i=0; i<this.size(); i++)
{
if(get(i)!=null)
diff --git a/ihl/processing/chemistry/BatteryItem.java b/ihl/processing/chemistry/BatteryItem.java
index 4b2cf63..10cd7cd 100644
--- a/ihl/processing/chemistry/BatteryItem.java
+++ b/ihl/processing/chemistry/BatteryItem.java
@@ -27,9 +27,9 @@ public class BatteryItem extends Item implements IElectricItem, IItemHudInfo
public int maxCharge=65536;
public int transferLimit = 4096;
public int tier = 4;
- private static Map<Integer, IIcon> iconMap = new HashMap();
- private static Map<Integer, String> nameMap = new HashMap();
- private static Map<Integer, String> descriptionMap = new HashMap();
+ private static Map<Integer, IIcon> iconMap = new HashMap<Integer, IIcon>();
+ private static Map<Integer, String> nameMap = new HashMap<Integer, String>();
+ private static Map<Integer, String> descriptionMap = new HashMap<Integer, String>();
public BatteryItem()
{
@@ -96,7 +96,7 @@ public class BatteryItem extends Item implements IElectricItem, IItemHudInfo
@Override
public List<String> getHudInfo(ItemStack itemStack)
{
- LinkedList info = new LinkedList();
+ LinkedList<String> info = new LinkedList<String>();
info.add(ElectricItem.manager.getToolTip(itemStack));
return info;
}
@@ -125,11 +125,8 @@ public class BatteryItem extends Item implements IElectricItem, IItemHudInfo
return nameMap.get(0);//stack.getItemDamage());
}
- @SideOnly(Side.CLIENT)
-
- /**
- * This returns the sub items
- */
+ @SideOnly(Side.CLIENT)
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public void func_150895_a(Item item, CreativeTabs par2CreativeTabs, List itemList)
{
ItemStack itemStack = new ItemStack(this, 1);
@@ -158,6 +155,7 @@ public class BatteryItem extends Item implements IElectricItem, IItemHudInfo
}
@Override
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public void addInformation(ItemStack itemStack, EntityPlayer player, List info, boolean flag)
{
if(BatteryItem.descriptionMap.containsKey(0))//itemStack.getItemDamage()))
diff --git a/ihl/processing/chemistry/ChemicalReactorContainer.java b/ihl/processing/chemistry/ChemicalReactorContainer.java
index ee60543..a20cc01 100644
--- a/ihl/processing/chemistry/ChemicalReactorContainer.java
+++ b/ihl/processing/chemistry/ChemicalReactorContainer.java
@@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class ChemicalReactorContainer extends ContainerBase {
+public class ChemicalReactorContainer extends ContainerBase<ChemicalReactorTileEntity> {
protected ChemicalReactorTileEntity tileEntity;
public int lastFluidAmount = -1;
@@ -44,7 +44,7 @@ public class ChemicalReactorContainer extends ContainerBase {
this.addSlotToContainer(new SlotInvSlot(tileEntity1.input, 1, 122, 15));
this.addSlotToContainer(new SlotInvSlot(tileEntity1.outputSlot, 0, 122-18, 51));
this.addSlotToContainer(new SlotInvSlot(tileEntity1.outputSlot, 1, 122, 51));
- this.addSlotToContainer(new SlotInvSlot(tileEntity1.engine, 0, 8, 33));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity1.dischargeSlot, 0, 8, 33));
}
@Override
diff --git a/ihl/processing/chemistry/ChemicalReactorGui.java b/ihl/processing/chemistry/ChemicalReactorGui.java
index 6342d40..029281b 100644
--- a/ihl/processing/chemistry/ChemicalReactorGui.java
+++ b/ihl/processing/chemistry/ChemicalReactorGui.java
@@ -54,11 +54,6 @@ public class ChemicalReactorGui extends GuiContainer {
{
IHLRenderUtils.instance.renderIHLFluidTank(this.container.tileEntity.getFluidTank(), 102-18, 28, 114-18, 59, zLevel, par1, par2, xOffset, yOffset);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(background);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 26, 34, xOffset, yOffset);
- }
}
@Override
diff --git a/ihl/processing/chemistry/ChemicalReactorTileEntity.java b/ihl/processing/chemistry/ChemicalReactorTileEntity.java
index 7720d2b..cec4177 100644
--- a/ihl/processing/chemistry/ChemicalReactorTileEntity.java
+++ b/ihl/processing/chemistry/ChemicalReactorTileEntity.java
@@ -50,7 +50,6 @@ public class ChemicalReactorTileEntity extends BasicElectricMotorTileEntity impl
this.fillInputSlot = new InvSlotConsumableLiquidIHL(this, "fillInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
this.emptyFluidItemsSlot = new InvSlotOutput(this, "fluidCellsOutput", 2, 1);
this.input = new ApparatusProcessableInvSlot(this, "input", 3, Access.IO, 2, 64);
- this.isGuiScreenOpened=true;
}
@Override
@@ -131,69 +130,12 @@ public class ChemicalReactorTileEntity extends BasicElectricMotorTileEntity impl
return "chemicalReactor";
}
- private int mX()
- {
- switch(this.getFacing())
- {
- case 4:
- return -1;
- case 5:
- return 1;
- default:
- return 0;
- }
- }
-
- private int mZ()
- {
- switch(this.getFacing())
- {
- case 3:
- return 1;
- case 2:
- return -1;
- case 4:
- return 0;
- case 5:
- return 0;
- default:
- return -1;
- }
- }
-
- private short getFacingFromXZ(int x, int z)
- {
- switch(x)
- {
- case -1:
- return (short)4;
- case 1:
- return (short)5;
- default:
- switch(z)
- {
- case 1:
- return (short)3;
- case -1:
- return (short)2;
- default:
- return (short)2;
- }
- }
- }
-
public float getRenderLiquidLevel()
{
return (float)this.fluidTank.getFluidAmount()/(float)this.fluidTank.getCapacity();
}
@Override
- public void onNetworkEvent(EntityPlayer player, int event)
- {
- // TODO Auto-generated method stub
- }
-
- @Override
public int gaugeProgressScaled(int i)
{
return this.progress * i / operationLength;
@@ -245,11 +187,13 @@ public class ChemicalReactorTileEntity extends BasicElectricMotorTileEntity impl
return false;
}
+ @SuppressWarnings("unchecked")
public UniversalRecipeOutput getOutput()
{
return ChemicalReactorTileEntity.recipeManager.getOutputFor(this.getInput()[0],this.getInput()[1], false, false);
}
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List[] getInput()
{
@@ -270,6 +214,7 @@ public class ChemicalReactorTileEntity extends BasicElectricMotorTileEntity impl
}
@Override
+ @SuppressWarnings({ "unchecked"})
public void operate()
{
UniversalRecipeInput recipeInput = ChemicalReactorTileEntity.recipeManager.getRecipeInput(this.getInput()[0],this.getInput()[1]);
@@ -285,7 +230,7 @@ public class ChemicalReactorTileEntity extends BasicElectricMotorTileEntity impl
if(te instanceof CryogenicDistillerTileEntity)
{
CryogenicDistillerTileEntity cgte = (CryogenicDistillerTileEntity)te;
- int filled = cgte.fill(ForgeDirection.getOrientation(this.getFacing()), recipeInput.getFluidInputs().get(1).getInputs().get(0), true);
+ cgte.fill(ForgeDirection.getOrientation(this.getFacing()), recipeInput.getFluidInputs().get(1).getInputs().get(0), true);
}
}
this.fluidTank.drain(recipeInput.getFluidInputs(), true);
@@ -347,12 +292,12 @@ public class ChemicalReactorTileEntity extends BasicElectricMotorTileEntity impl
public static void addRecipe(FluidStack fluidStackInput1, FluidStack fluidStackInput2, ItemStack itemStackInput, FluidStack fluidStackOutput, ItemStack itemStackOutput1, ItemStack itemStackOutput2)
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1, fluidStackInput2}), Arrays.asList(new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackOutput}), Arrays.asList(new ItemStack[] {itemStackOutput1, itemStackOutput2}),200));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1, fluidStackInput2}), (new ItemStack[] {itemStackInput})), new UniversalRecipeOutput((new FluidStack[] {fluidStackOutput}), (new ItemStack[] {itemStackOutput1, itemStackOutput2}),200));
}
public static void addSpecialConditionsRecipe(FluidStack fluidStackInput1, FluidStack fluidStackInput2, ItemStack itemStackInput, FluidStack fluidStackOutput, ItemStack itemStackOutput1, ItemStack itemStackOutput2)
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1, fluidStackInput2}), Arrays.asList(new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackOutput}), Arrays.asList(new ItemStack[] {itemStackOutput1, itemStackOutput2}),200, true));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1, fluidStackInput2}), (new ItemStack[] {itemStackInput})), new UniversalRecipeOutput((new FluidStack[] {fluidStackOutput}), (new ItemStack[] {itemStackOutput1, itemStackOutput2}),200, true));
}
public IHLFluidTank getFluidTank()
diff --git a/ihl/processing/chemistry/CryogenicDistillerContainer.java b/ihl/processing/chemistry/CryogenicDistillerContainer.java
index d3ed523..be35e2a 100644
--- a/ihl/processing/chemistry/CryogenicDistillerContainer.java
+++ b/ihl/processing/chemistry/CryogenicDistillerContainer.java
@@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class CryogenicDistillerContainer extends ContainerBase {
+public class CryogenicDistillerContainer extends ContainerBase<CryogenicDistillerTileEntity> {
public CryogenicDistillerTileEntity tileEntity;
public int lastProgress = -1;
@@ -39,7 +39,7 @@ public class CryogenicDistillerContainer extends ContainerBase {
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, col, 8 + col * 18, height + -24));
}
- this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.engine,0, 8, 32));
+ this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.dischargeSlot,0, 8, 32));
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.fillInputSlotInput,0, 58, 51));
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.fillInputSlotProducts,0, 103, 51));
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.fluidItemsSlot,0, 58, 15));
diff --git a/ihl/processing/chemistry/CryogenicDistillerGui.java b/ihl/processing/chemistry/CryogenicDistillerGui.java
index ef18c53..3fbbfa4 100644
--- a/ihl/processing/chemistry/CryogenicDistillerGui.java
+++ b/ihl/processing/chemistry/CryogenicDistillerGui.java
@@ -42,11 +42,6 @@ public class CryogenicDistillerGui extends GuiContainer {
{
IHLRenderUtils.instance.renderIHLFluidTank(this.container.tileEntity.fluidTankProducts, 125, 28, 137, 67, zLevel, par1, par2, xOffset, yOffset);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(tex);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 26, 34, xOffset, yOffset);
- }
}
@Override
diff --git a/ihl/processing/chemistry/CryogenicDistillerTileEntity.java b/ihl/processing/chemistry/CryogenicDistillerTileEntity.java
index 4c237d3..5a0194f 100644
--- a/ihl/processing/chemistry/CryogenicDistillerTileEntity.java
+++ b/ihl/processing/chemistry/CryogenicDistillerTileEntity.java
@@ -45,8 +45,7 @@ public class CryogenicDistillerTileEntity extends BasicElectricMotorTileEntity i
public CryogenicDistillerTileEntity()
{
super();
- this.isGuiScreenOpened=true;
- this.fillInputSlotInput = new InvSlotConsumableLiquidIHL(this, "fillInputSlotInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
+ this.fillInputSlotInput = new InvSlotConsumableLiquidIHL(this, "fillInputSlotInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
this.fillInputSlotProducts = new InvSlotConsumableLiquidIHL(this, "fillInputSlotProducts", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
this.fluidItemsSlot = new InvSlotOutput(this, "fluidCellsOutput", 2, 2);
}
@@ -61,10 +60,9 @@ public class CryogenicDistillerTileEntity extends BasicElectricMotorTileEntity i
{
super.updateEntityServer();
ForgeDirection dir = ForgeDirection.getOrientation(getFacing());
- TileEntity te = worldObj.getTileEntity(xCoord+dir.offsetX,yCoord+dir.offsetY,zCoord+dir.offsetZ);
- if(this.processTimer++>20 && this.engine.correctContent() && this.energy>=this.energyConsume/this.engine.getEfficiency())
+ if(this.processTimer++>20 && this.energy>=this.energyConsume)
{
- this.energy-=this.energyConsume/this.engine.getEfficiency();
+ this.energy-=this.energyConsume;
this.processTimer=0;
dir = dir.getOpposite();
Block block = worldObj.getBlock(xCoord+dir.offsetX,yCoord+dir.offsetY,zCoord+dir.offsetZ);
@@ -144,6 +142,7 @@ public class CryogenicDistillerTileEntity extends BasicElectricMotorTileEntity i
}
@Override
+ @SuppressWarnings({ "unchecked", "rawtypes" })
public List[] getInput()
{
return new List [] {Arrays.asList(new FluidStack [] {this.fluidTankInput.getLigthestFluid()}),null};
@@ -152,7 +151,7 @@ public class CryogenicDistillerTileEntity extends BasicElectricMotorTileEntity i
@Override
public boolean canOperate()
{
- return this.engine.correctContent() && this.getOutput()!=null;
+ return this.getOutput()!=null;
}
@Override
@@ -182,11 +181,11 @@ public class CryogenicDistillerTileEntity extends BasicElectricMotorTileEntity i
{
if(output2!=null)
{
- recipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {input}),null), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {output,output2}),null,20,specialCondition));
+ recipeManager.addRecipe(new UniversalRecipeInput(new FluidStack[] {input},null), new UniversalRecipeOutput(new FluidStack[] {output,output2},null,20,specialCondition));
}
else
{
- recipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {input}),null), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {output}),null,20,specialCondition));
+ recipeManager.addRecipe(new UniversalRecipeInput(new FluidStack[] {input},null), new UniversalRecipeOutput(new FluidStack[] {output},null,20,specialCondition));
}
}
@@ -197,7 +196,7 @@ public class CryogenicDistillerTileEntity extends BasicElectricMotorTileEntity i
public boolean canProcess()
{
- return this.engine.correctContent() && this.energy>=this.maxStorage && this.fluidTankInput.getFluidAmount()<1000;
+ return this.energy>=this.maxStorage && this.fluidTankInput.getFluidAmount()<1000;
}
@Override
diff --git a/ihl/processing/chemistry/ElectricEvaporatorBlock.java b/ihl/processing/chemistry/ElectricEvaporatorBlock.java
index 2507b2e..f65b76d 100644
--- a/ihl/processing/chemistry/ElectricEvaporatorBlock.java
+++ b/ihl/processing/chemistry/ElectricEvaporatorBlock.java
@@ -185,7 +185,6 @@ public class ElectricEvaporatorBlock extends Block implements ITileEntityProvide
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
- IIcon sideIcon = this.blockIcon;
switch (side)
{
case 0:
diff --git a/ihl/processing/chemistry/ElectricEvaporatorContainer.java b/ihl/processing/chemistry/ElectricEvaporatorContainer.java
index 9dc136e..d981d94 100644
--- a/ihl/processing/chemistry/ElectricEvaporatorContainer.java
+++ b/ihl/processing/chemistry/ElectricEvaporatorContainer.java
@@ -8,7 +8,7 @@ import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
-public class ElectricEvaporatorContainer extends ContainerBase {
+public class ElectricEvaporatorContainer extends ContainerBase<ElectricEvaporatorTileEntity> {
protected ElectricEvaporatorTileEntity tileEntity;
public int lastFluidAmount = -1;
diff --git a/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java b/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java
index 3505cda..1b5b647 100644
--- a/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java
+++ b/ihl/processing/chemistry/ElectricEvaporatorTileEntity.java
@@ -27,7 +27,6 @@ import ic2.core.audio.AudioSource;
import ic2.core.block.invslot.InvSlot;
import ic2.core.block.invslot.InvSlotUpgrade;
import ic2.core.block.invslot.InvSlot.Access;
-import ic2.core.network.NetworkManager;
import ic2.core.upgrade.IUpgradableBlock;
import ic2.core.upgrade.IUpgradeItem;
import ic2.core.upgrade.UpgradableProperty;
@@ -39,7 +38,6 @@ public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implement
{
public final InvSlotUpgrade upgradeSlot;
private int tier;
- private int lastTier;
public int maxStorage;
private int defaultMaxStorage;
private double energy;
@@ -48,9 +46,6 @@ public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implement
public final int defaultTier;
public int energyConsume;
public AudioSource audioSource;
- private static final int EventStart = 0;
- private static final int EventInterrupt = 1;
- private static final int EventStop = 2;
private int updateChecksum=0;
private boolean addedToEnergyNet=false;
@@ -60,7 +55,7 @@ public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implement
this.defaultEnergyConsume = this.energyConsume = 8;
this.defaultOperationLength = this.maxProgress = 400;
this.energy=0D;
- this.lastTier = this.tier = this.defaultTier = 1;
+ this.tier = this.defaultTier = 1;
this.maxStorage = this.defaultMaxStorage = defaultEnergyConsume * defaultOperationLength;
this.fuelSlot = new IHLInvSlotDischarge(this, 1, Access.IO, this.tier, InvSlot.InvSide.BOTTOM);
this.upgradeSlot = new InvSlotUpgrade(this, "upgrade", 4, 4);
@@ -206,7 +201,6 @@ public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implement
}
if(IC2.platform.isSimulating())
{
- boolean needsInvUpdate = false;
this.setOverclockRates();
if(this.getDemandedEnergy() > 1.0D)
@@ -232,7 +226,6 @@ public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implement
if (this.progress >= this.maxProgress)
{
this.operate();
- needsInvUpdate = true;
this.progress = 0;
IC2.network.get().initiateTileEntityEvent(this, 2, true);
}
@@ -253,20 +246,14 @@ public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implement
{
ItemStack stack = this.upgradeSlot.get(i);
- if (stack != null && stack.getItem() instanceof IUpgradeItem && ((IUpgradeItem)stack.getItem()).onTick(stack, this))
+ if (stack != null && stack.getItem() instanceof IUpgradeItem)
{
- needsInvUpdate = true;
+ ((IUpgradeItem)stack.getItem()).onTick(stack, this);
}
}
}
}
- private static int applyModifier(int base, int extra, double multiplier)
- {
- double ret = Math.round(((double)base + (double)extra) * multiplier);
- return ret > 2.147483647E9D ? Integer.MAX_VALUE : (int)ret;
- }
-
@Override
public void onNetworkEvent(int event)
{
@@ -317,7 +304,7 @@ public class ElectricEvaporatorTileEntity extends EvaporatorTileEntity implement
}
@Override
- public ContainerBase getGuiContainer(EntityPlayer entityPlayer)
+ public ContainerBase<ElectricEvaporatorTileEntity> getGuiContainer(EntityPlayer entityPlayer)
{
return new ElectricEvaporatorContainer(entityPlayer, this);
}
diff --git a/ihl/processing/chemistry/ElectrolysisBathContainer.java b/ihl/processing/chemistry/ElectrolysisBathContainer.java
index f2cc74e..9797755 100644
--- a/ihl/processing/chemistry/ElectrolysisBathContainer.java
+++ b/ihl/processing/chemistry/ElectrolysisBathContainer.java
@@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class ElectrolysisBathContainer extends ContainerBase {
+public class ElectrolysisBathContainer extends ContainerBase<ElectrolysisBathTileEntity> {
protected ElectrolysisBathTileEntity tileEntity;
public int lastFluidAmount = -1;
diff --git a/ihl/processing/chemistry/ElectrolysisBathGui.java b/ihl/processing/chemistry/ElectrolysisBathGui.java
index cb39044..a7788a5 100644
--- a/ihl/processing/chemistry/ElectrolysisBathGui.java
+++ b/ihl/processing/chemistry/ElectrolysisBathGui.java
@@ -8,7 +8,6 @@ import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
-import ic2.core.network.NetworkManager;
import ihl.collector.GuiMultiTextureButton;
import ihl.utils.IHLRenderUtils;
@@ -25,6 +24,7 @@ public class ElectrolysisBathGui extends GuiContainer {
this.container=container1;
}
+ @SuppressWarnings("unchecked")
@Override
public void initGui()
{
diff --git a/ihl/processing/chemistry/ElectrolysisBathTileEntity.java b/ihl/processing/chemistry/ElectrolysisBathTileEntity.java
index b549247..5a7a215 100644
--- a/ihl/processing/chemistry/ElectrolysisBathTileEntity.java
+++ b/ihl/processing/chemistry/ElectrolysisBathTileEntity.java
@@ -1,19 +1,16 @@
package ihl.processing.chemistry;
import java.util.Arrays;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
@@ -23,17 +20,11 @@ import ic2.api.network.INetworkClientTileEntityEventListener;
import ic2.core.ContainerBase;
import ic2.core.IC2;
import ic2.core.IHasGui;
-import ic2.core.block.TileEntityInventory;
import ic2.core.block.invslot.InvSlot;
import ic2.core.block.invslot.InvSlot.Access;
import ic2.core.block.invslot.InvSlotConsumableLiquid;
import ic2.core.block.invslot.InvSlotOutput;
-import ic2.core.network.NetworkManager;
-import ihl.IHLMod;
import ihl.flexible_cable.FlexibleCableHolderBaseTileEntity;
-import ihl.flexible_cable.IHLGrid;
-import ihl.flexible_cable.NodeEntity;
-import ihl.interfaces.IEnergyNetNode;
import ihl.processing.chemistry.ApparatusProcessableInvSlot;
import ihl.processing.invslots.InvSlotConsumableLiquidIHL;
import ihl.recipes.UniversalRecipeInput;
@@ -77,7 +68,6 @@ public class ElectrolysisBathTileEntity extends FlexibleCableHolderBaseTileEntit
NBTTagCompound fluidTankTag = new NBTTagCompound();
this.fluidTank.writeToNBT(fluidTankTag);
nbttagcompound.setTag("fluidTank", fluidTankTag);
- NBTTagCompound fractionalOutputNBT = new NBTTagCompound();
}
@Override
@@ -101,7 +91,6 @@ public class ElectrolysisBathTileEntity extends FlexibleCableHolderBaseTileEntit
super.updateEntityServer();
temperature=(short) (this.fluidTank.getTemperature()-273);
IHLUtils.handleFluidSlotsBehaviour(fillInputSlot, drainInputSlot, emptyFluidItemsSlot, fluidTank);
- boolean needsInvUpdate = false;
if (this.canOperate())
{
this.setActive(true);
@@ -120,7 +109,6 @@ public class ElectrolysisBathTileEntity extends FlexibleCableHolderBaseTileEntit
if (this.progress >= this.operationLength)
{
this.operate();
- needsInvUpdate = true;
this.progress = 0;
IC2.network.get().initiateTileEntityEvent(this, 2, true);
}
@@ -209,6 +197,7 @@ public class ElectrolysisBathTileEntity extends FlexibleCableHolderBaseTileEntit
return ElectrolysisBathTileEntity.recipeManager.getOutputFor(this.getInput(), false, false);
}
+ @SuppressWarnings("rawtypes")
public List[] getInput()
{
for(int i=0;i<fluidTank.getNumberOfFluids();i++)
diff --git a/ihl/processing/chemistry/EvaporatorBlock.java b/ihl/processing/chemistry/EvaporatorBlock.java
index 038a044..6994176 100644
--- a/ihl/processing/chemistry/EvaporatorBlock.java
+++ b/ihl/processing/chemistry/EvaporatorBlock.java
@@ -185,7 +185,6 @@ public class EvaporatorBlock extends Block implements ITileEntityProvider{
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
- IIcon sideIcon = this.blockIcon;
switch (side)
{
case 0:
diff --git a/ihl/processing/chemistry/EvaporatorContainer.java b/ihl/processing/chemistry/EvaporatorContainer.java
index 1df3d2f..cb83269 100644
--- a/ihl/processing/chemistry/EvaporatorContainer.java
+++ b/ihl/processing/chemistry/EvaporatorContainer.java
@@ -8,7 +8,7 @@ import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
-public class EvaporatorContainer extends ContainerBase {
+public class EvaporatorContainer extends ContainerBase<EvaporatorTileEntity> {
protected EvaporatorTileEntity tileEntity;
public int lastFluidAmount = -1;
diff --git a/ihl/processing/chemistry/EvaporatorTileEntity.java b/ihl/processing/chemistry/EvaporatorTileEntity.java
index e4eb8c0..8160d63 100644
--- a/ihl/processing/chemistry/EvaporatorTileEntity.java
+++ b/ihl/processing/chemistry/EvaporatorTileEntity.java
@@ -138,7 +138,6 @@ public class EvaporatorTileEntity extends TileEntityLiquidTankInventory implemen
public void updateEntityServer()
{
super.updateEntityServer();
- boolean needsInvUpdate = false;
if (this.needsFluid())
{
IHLUtils.handleFluidSlotsBehaviour(fillItemsSlot, fluidItemsSlot, emptyFluidItemsSlot, fluidTank);
@@ -146,11 +145,6 @@ public class EvaporatorTileEntity extends TileEntityLiquidTankInventory implemen
if (this.fuel <= 0 && this.canOperate())
{
this.fuel = this.maxFuel = ((InvSlotConsumableFuel) this.fuelSlot).consumeFuel();
-
- if (this.fuel > 0)
- {
- needsInvUpdate = true;
- }
}
if (this.isBurning() && this.canOperate())
@@ -161,7 +155,6 @@ public class EvaporatorTileEntity extends TileEntityLiquidTankInventory implemen
{
this.progress = 0;
this.operate();
- needsInvUpdate = true;
}
}
else
@@ -177,7 +170,6 @@ public class EvaporatorTileEntity extends TileEntityLiquidTankInventory implemen
if (this.getActive() != this.isBurning())
{
this.setActive(this.isBurning());
- needsInvUpdate = true;
}
}
@@ -219,7 +211,7 @@ public class EvaporatorTileEntity extends TileEntityLiquidTankInventory implemen
}
@Override
- public ContainerBase getGuiContainer(EntityPlayer entityPlayer)
+ public ContainerBase<? extends EvaporatorTileEntity> getGuiContainer(EntityPlayer entityPlayer)
{
return new EvaporatorContainer(entityPlayer, this);
}
@@ -277,7 +269,7 @@ public class EvaporatorTileEntity extends TileEntityLiquidTankInventory implemen
public static void addRecipe(FluidStack input, ItemStack output)
{
- recipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack [] {input}),null), new UniversalRecipeOutput(null, Arrays.asList(new ItemStack[] {output}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput((new FluidStack [] {input}),null), new UniversalRecipeOutput(null, (new ItemStack[] {output}),20));
}
public UniversalRecipeOutput getOutput()
diff --git a/ihl/processing/chemistry/ExplosiveTileEntity.java b/ihl/processing/chemistry/ExplosiveTileEntity.java
deleted file mode 100644
index 777f527..0000000
--- a/ihl/processing/chemistry/ExplosiveTileEntity.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package ihl.processing.chemistry;
-
-import ic2.core.ExplosionIC2;
-import ic2.core.block.EntityIC2Explosive;
-import ihl.utils.EntityIHLExplosion;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-
-public class ExplosiveTileEntity extends TileEntity {
-
- public int explosionPower=10000;
- public int explosionType=1;
-
- public void createExplosion(EntityPlayer player)
- {
- switch(this.explosionType)
- {
- case 0:
- ExplosionIC2 explosion = new ExplosionIC2(this.worldObj, new EntityIC2Explosive(worldObj), xCoord+0.5d, yCoord+0.5d, zCoord+0.5d, this.explosionPower/1000f, 0f, ExplosionIC2.Type.Normal,player, 0);
- System.out.println("Start");
- explosion.doExplosion();
- System.out.println("End");
- break;
- case 1:
- EntityIHLExplosion ex1 = new EntityIHLExplosion(worldObj, xCoord, yCoord, zCoord,this.explosionPower);
- worldObj.spawnEntityInWorld(ex1);
- break;
- }
- }
-
- @Override
- public void readFromNBT(NBTTagCompound nbt)
- {
- if(nbt!=null)
- {
- explosionPower=nbt.getInteger("explosionPower");
- explosionType=nbt.getInteger("explosionType");
- }
- }
-
- @Override
- public void writeToNBT(NBTTagCompound nbt)
- {
- nbt.setInteger("explosionPower",explosionPower);
- nbt.setInteger("explosionType",explosionType);
- }
-
-}
diff --git a/ihl/processing/chemistry/FluidizedBedReactorContainer.java b/ihl/processing/chemistry/FluidizedBedReactorContainer.java
index 4d42d29..b2c7738 100644
--- a/ihl/processing/chemistry/FluidizedBedReactorContainer.java
+++ b/ihl/processing/chemistry/FluidizedBedReactorContainer.java
@@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class FluidizedBedReactorContainer extends ContainerBase {
+public class FluidizedBedReactorContainer extends ContainerBase<FluidizedBedReactorTileEntity> {
protected FluidizedBedReactorTileEntity tileEntity;
public int lastFluidAmount = -1;
@@ -43,7 +43,7 @@ public class FluidizedBedReactorContainer extends ContainerBase {
this.addSlotToContainer(new SlotInvSlot(tileEntity1.input, 0, 8, 23));
this.addSlotToContainer(new SlotInvSlot(tileEntity1.input, 1, 8, 41));
this.addSlotToContainer(new SlotInvSlot(tileEntity1.outputSlot, 0, 43, 33));
- this.addSlotToContainer(new SlotInvSlot(tileEntity1.engine, 0, 151, 33));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity1.dischargeSlot, 0, 151, 33));
}
@Override
diff --git a/ihl/processing/chemistry/FluidizedBedReactorGui.java b/ihl/processing/chemistry/FluidizedBedReactorGui.java
index 6d07aca..3b52c38 100644
--- a/ihl/processing/chemistry/FluidizedBedReactorGui.java
+++ b/ihl/processing/chemistry/FluidizedBedReactorGui.java
@@ -22,35 +22,30 @@ public class FluidizedBedReactorGui extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- int xOffset = (this.width - xSize) / 2;
- int yOffset = (this.height - ySize) / 2;
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.renderEngine.bindTexture(background);
- int i1;
- if (this.container.tileEntity.getEnergy() > 0D)
- {
- i1 = Math.min(this.container.tileEntity.getGUIEnergy(12),12);
- this.drawTexturedModalRect(155, 17 + 12 - i1, 179, 12 - i1, 14, i1 + 2);
- }
- if (this.container.tileEntity.progress > 0)
- {
- i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(17),17);
- this.drawTexturedModalRect(25, 34, 198, 0,i1,13);
- if(mixerFrame++>3)
- {
- mixerFrame=0;
- }
- this.drawTexturedModalRect(126, 31, 244, 126+26*mixerFrame,12,26);
- }
- if (this.container.tileEntity.getTankAmount() > 0)
- {
- IHLRenderUtils.instance.renderIHLFluidTank(this.container.tileEntity.getFluidTank(), 126, 28, 138, 59, zLevel, par1, par2, xOffset, yOffset);
- }
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(background);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 169, 34, xOffset, yOffset);
- }
+ int xOffset = (this.width - xSize) / 2;
+ int yOffset = (this.height - ySize) / 2;
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture(background);
+ int i1;
+ if (this.container.tileEntity.getEnergy() > 0D)
+ {
+ i1 = Math.min(this.container.tileEntity.getGUIEnergy(12),12);
+ this.drawTexturedModalRect(155, 17 + 12 - i1, 179, 12 - i1, 14, i1 + 2);
+ }
+ if (this.container.tileEntity.progress > 0)
+ {
+ i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(17),17);
+ this.drawTexturedModalRect(25, 34, 198, 0,i1,13);
+ if(mixerFrame++>3)
+ {
+ mixerFrame=0;
+ }
+ this.drawTexturedModalRect(126, 31, 244, 126+26*mixerFrame,12,26);
+ }
+ if (this.container.tileEntity.getTankAmount() > 0)
+ {
+ IHLRenderUtils.instance.renderIHLFluidTank(this.container.tileEntity.getFluidTank(), 126, 28, 138, 59, zLevel, par1, par2, xOffset, yOffset);
+ }
}
@Override
diff --git a/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java b/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java
index e9b2ec5..0e279b5 100644
--- a/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java
+++ b/ihl/processing/chemistry/FluidizedBedReactorTileEntity.java
@@ -42,7 +42,6 @@ public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity
public final InvSlotOutput emptyFluidItemsSlot;
private final IHLFluidTank fluidTank = new IHLFluidTank(8000);
public short temperature=20;
- private int fractionalOutputAmount=0;
public FluidizedBedReactorTileEntity() {
super();
@@ -51,7 +50,6 @@ public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity
this.fillInputSlot = new InvSlotConsumableLiquidIHL(this, "fillInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
this.emptyFluidItemsSlot = new InvSlotOutput(this, "fluidCellsOutput", 2, 1);
this.input = new ApparatusProcessableInvSlot(this, "input", 3, Access.IO, 2, 64);
- this.isGuiScreenOpened=true;
}
@Override
@@ -125,65 +123,8 @@ public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity
public String getInventoryName() {
return "fluidizedBedReactor";
}
-
- private int mX()
- {
- switch(this.getFacing())
- {
- case 4:
- return -1;
- case 5:
- return 1;
- default:
- return 0;
- }
- }
-
- private int mZ()
- {
- switch(this.getFacing())
- {
- case 3:
- return 1;
- case 2:
- return -1;
- case 4:
- return 0;
- case 5:
- return 0;
- default:
- return -1;
- }
- }
-
- private short getFacingFromXZ(int x, int z)
- {
- switch(x)
- {
- case -1:
- return (short)4;
- case 1:
- return (short)5;
- default:
- switch(z)
- {
- case 1:
- return (short)3;
- case -1:
- return (short)2;
- default:
- return (short)2;
- }
- }
- }
-
- @Override
- public void onNetworkEvent(EntityPlayer player, int event)
- {
- // TODO Auto-generated method stub
- }
- @Override
+ @Override
public int gaugeProgressScaled(int i)
{
return this.progress * i / operationLength;
@@ -240,6 +181,7 @@ public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity
return FluidizedBedReactorTileEntity.recipeManager.getOutputFor(this.getInput(), false, false);
}
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public List[] getInput()
{
@@ -267,6 +209,19 @@ public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity
UniversalRecipeOutput output1 = getOutput();
this.fluidTank.drain(recipeInput.getFluidInputs(), true);
this.input.consume(0, recipeInput.getItemInputs().get(0).getAmount());
+ if(recipeInput.getItemInputs().get(0).getAmount()==0)
+ {
+ ItemStack stack = this.input.get();
+ if(stack.stackTagCompound==null)
+ {
+ stack.stackTagCompound = new NBTTagCompound();
+ }
+ stack.stackTagCompound.setInteger("catalyst_uses",stack.stackTagCompound.getInteger("catalyst_uses")+1);
+ if(stack.stackTagCompound.getInteger("catalyst_uses")>1000)
+ {
+ this.input.consume(0,1);
+ }
+ }
if(recipeInput.getItemInputs().size()>1)this.input.consume(1, recipeInput.getItemInputs().get(1).getAmount());
if(output1.getFluidOutputs().size()>0)this.fluidTank.fill(output1.getFluidOutputs().get(0).copy(), true);
if(output1.getFluidOutputs().size()>1)this.fluidTank.fill(output1.getFluidOutputs().get(1).copy(), true);
@@ -331,11 +286,11 @@ public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity
{
if(fluidStackOutput!=null)
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1}), Arrays.asList(new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackOutput}), Arrays.asList(new ItemStack[] {itemStackOutput1}),200));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1}), (new ItemStack[] {itemStackInput})), new UniversalRecipeOutput((new FluidStack[] {fluidStackOutput}), (new ItemStack[] {itemStackOutput1}),200));
}
else
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1}), Arrays.asList(new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(null, Arrays.asList(new ItemStack[] {itemStackOutput1}),200));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1}), (new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(null, (new ItemStack[] {itemStackOutput1}),200));
}
}
@@ -347,11 +302,11 @@ public class FluidizedBedReactorTileEntity extends BasicElectricMotorTileEntity
public static void addRecipe(FluidStack fluidStackInput1, ItemStack itemStackInput, FluidStack fluidStackOutput, RecipeOutputItemStack itemStackOutput1) {
if(fluidStackOutput!=null)
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1}), Arrays.asList(new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackOutput}), Arrays.asList(new RecipeOutputItemStack[] {itemStackOutput1}),200));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1}), (new ItemStack[] {itemStackInput})), new UniversalRecipeOutput((new FluidStack[] {fluidStackOutput}), (new RecipeOutputItemStack[] {itemStackOutput1}),200));
}
else
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1}), Arrays.asList(new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(null, Arrays.asList(new RecipeOutputItemStack[] {itemStackOutput1}),200));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1}), (new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(null, (new RecipeOutputItemStack[] {itemStackOutput1}),200));
}
}
diff --git a/ihl/processing/chemistry/FractionatorBottomTileEntity.java b/ihl/processing/chemistry/FractionatorBottomTileEntity.java
index 41840e0..20132e9 100644
--- a/ihl/processing/chemistry/FractionatorBottomTileEntity.java
+++ b/ihl/processing/chemistry/FractionatorBottomTileEntity.java
@@ -29,7 +29,6 @@ public class FractionatorBottomTileEntity extends TileEntityInventory
{
private final static UniversalRecipeManager recipeManager = new UniversalRecipeManager("fractionator");
private static float kF = 24000F;
- private static float gasC = 1F;
private static float fluidC = 4F;
private static float H = 2256F;
private final IHLFluidTank waterTank = new IHLFluidTank(100);
@@ -38,7 +37,7 @@ public class FractionatorBottomTileEntity extends TileEntityInventory
private int amountOfFluidEvaporated=0;
private int systemHeat=0;
private static final int maxSystemHeat=10000;
- private final List<FractionatorSectionTileEntity> listOfColumnSections = new ArrayList();
+ private final List<FractionatorSectionTileEntity> listOfColumnSections = new ArrayList<FractionatorSectionTileEntity>();
private FractionatorCoverTileEntity columnCover;
private RefluxCondenserTileEntity refluxCondenser;
private IHeatSource heatSource;
@@ -78,7 +77,7 @@ public class FractionatorBottomTileEntity extends TileEntityInventory
public static void addRecipe(FluidStack fluidIn, FluidStack fluidOut1, FluidStack fluidOut2)
{
- recipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidIn}), null), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidOut1,fluidOut2}),null,2));
+ recipeManager.addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidIn}), null), new UniversalRecipeOutput((new FluidStack[] {fluidOut1,fluidOut2}),null,2));
}
diff --git a/ihl/processing/chemistry/FractionatorCoverTileEntity.java b/ihl/processing/chemistry/FractionatorCoverTileEntity.java
index d7addf2..048f953 100644
--- a/ihl/processing/chemistry/FractionatorCoverTileEntity.java
+++ b/ihl/processing/chemistry/FractionatorCoverTileEntity.java
@@ -6,7 +6,6 @@ import java.util.List;
import ic2.api.network.INetworkDataProvider;
import ic2.api.tile.IWrenchable;
import ic2.core.IC2;
-import ic2.core.network.NetworkManager;
import ihl.utils.IHLUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -32,7 +31,7 @@ public class FractionatorCoverTileEntity extends TileEntity implements IWrenchab
@Override
public List<String> getNetworkedFields()
{
- List<String> fields = new ArrayList();
+ List<String> fields = new ArrayList<String>();
fields.add("facing");
return fields;
}
diff --git a/ihl/processing/chemistry/FractionatorSectionTileEntity.java b/ihl/processing/chemistry/FractionatorSectionTileEntity.java
index 18314d6..ddd3f31 100644
--- a/ihl/processing/chemistry/FractionatorSectionTileEntity.java
+++ b/ihl/processing/chemistry/FractionatorSectionTileEntity.java
@@ -6,7 +6,6 @@ import java.util.List;
import ic2.api.network.INetworkDataProvider;
import ic2.api.tile.IWrenchable;
import ic2.core.IC2;
-import ic2.core.network.NetworkManager;
import ihl.utils.IHLUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -37,7 +36,7 @@ public class FractionatorSectionTileEntity extends TileEntity implements IWrench
@Override
public List<String> getNetworkedFields()
{
- List<String> fields = new ArrayList();
+ List<String> fields = new ArrayList<String>();
fields.add("facing");
return fields;
}
diff --git a/ihl/processing/chemistry/GaedesMercuryRotaryPumpContainer.java b/ihl/processing/chemistry/GaedesMercuryRotaryPumpContainer.java
index cbd3239..b283a48 100644
--- a/ihl/processing/chemistry/GaedesMercuryRotaryPumpContainer.java
+++ b/ihl/processing/chemistry/GaedesMercuryRotaryPumpContainer.java
@@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-public class GaedesMercuryRotaryPumpContainer extends ContainerBase {
+public class GaedesMercuryRotaryPumpContainer extends ContainerBase<GaedesMercuryRotaryPumpTileEntity> {
protected GaedesMercuryRotaryPumpTileEntity tileEntity;
private final static int height=166;
@@ -28,7 +28,7 @@ public class GaedesMercuryRotaryPumpContainer extends ContainerBase {
{
this.addSlotToContainer(new Slot(entityPlayer.inventory, col, 8 + col * 18, height + -24));
}
- this.addSlotToContainer(new SlotInvSlot(tileEntity1.engine, 0, 61, 36));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity1.dischargeSlot, 0, 61, 36));
}
@Override
diff --git a/ihl/processing/chemistry/GaedesMercuryRotaryPumpGui.java b/ihl/processing/chemistry/GaedesMercuryRotaryPumpGui.java
index 78f1b0c..28c9edc 100644
--- a/ihl/processing/chemistry/GaedesMercuryRotaryPumpGui.java
+++ b/ihl/processing/chemistry/GaedesMercuryRotaryPumpGui.java
@@ -2,7 +2,6 @@ package ihl.processing.chemistry;
import org.lwjgl.opengl.GL11;
-import ihl.utils.IHLRenderUtils;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
@@ -19,9 +18,6 @@ public class GaedesMercuryRotaryPumpGui extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- int xOffset = (this.width - xSize) / 2;
- int yOffset = (this.height - ySize) / 2;
-
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
this.mc.renderEngine.bindTexture(tex);
int i1;
@@ -39,11 +35,6 @@ public class GaedesMercuryRotaryPumpGui extends GuiContainer {
i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(27),27);
this.drawTexturedModalRect(17, 30, getFrameX(i1), getFrameY(i1),24,24);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(tex);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 79, 37, xOffset, yOffset);
- }
}
@Override
diff --git a/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java b/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java
index 3a9b814..3227ab7 100644
--- a/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java
+++ b/ihl/processing/chemistry/GaedesMercuryRotaryPumpTileEntity.java
@@ -18,7 +18,6 @@ public class GaedesMercuryRotaryPumpTileEntity extends BasicElectricMotorTileEnt
public GaedesMercuryRotaryPumpTileEntity()
{
- this.isGuiScreenOpened=true;
}
@Override
@@ -33,6 +32,7 @@ public class GaedesMercuryRotaryPumpTileEntity extends BasicElectricMotorTileEnt
return IHLUtils.getThisModItemStack("gaedesMercuryRotaryPump");
}
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List[] getInput()
{
diff --git a/ihl/processing/chemistry/GoldChimneyKneeTileEntity.java b/ihl/processing/chemistry/GoldChimneyKneeTileEntity.java
index 6c73a5b..34b3de2 100644
--- a/ihl/processing/chemistry/GoldChimneyKneeTileEntity.java
+++ b/ihl/processing/chemistry/GoldChimneyKneeTileEntity.java
@@ -8,7 +8,6 @@ import java.util.Map;
import ic2.api.network.INetworkDataProvider;
import ic2.api.tile.IWrenchable;
import ic2.core.IC2;
-import ic2.core.network.NetworkManager;
import ihl.recipes.UniversalRecipeInput;
import ihl.recipes.UniversalRecipeManager;
import ihl.recipes.UniversalRecipeOutput;
@@ -52,7 +51,7 @@ public class GoldChimneyKneeTileEntity extends TileEntity implements IWrenchable
@Override
public List<String> getNetworkedFields()
{
- List<String> fields = new ArrayList();
+ List<String> fields = new ArrayList<String>();
fields.add("facing");
return fields;
}
@@ -273,7 +272,7 @@ public class GoldChimneyKneeTileEntity extends TileEntity implements IWrenchable
public static void addRecipe(UniversalRecipeInput input, FluidStack fluidStackWithSize)
{
- recipeManager.addRecipe(input, new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackWithSize}),null,20));
+ recipeManager.addRecipe(input, new UniversalRecipeOutput((new FluidStack[] {fluidStackWithSize}),null,20));
}
public UniversalRecipeOutput getOutput()
@@ -281,6 +280,7 @@ public class GoldChimneyKneeTileEntity extends TileEntity implements IWrenchable
return GoldChimneyKneeTileEntity.recipeManager.getOutputFor(this.getInput(), false, false);
}
+ @SuppressWarnings("rawtypes")
public List[] getInput()
{
return new List[] {Arrays.asList(new FluidStack[] {this.gasBuffer.getFluid(),this.fluidTank.getFluid()}),null};
diff --git a/ihl/processing/chemistry/LabElectrolyzerContainer.java b/ihl/processing/chemistry/LabElectrolyzerContainer.java
index 5ee9caf..b1fec2f 100644
--- a/ihl/processing/chemistry/LabElectrolyzerContainer.java
+++ b/ihl/processing/chemistry/LabElectrolyzerContainer.java
@@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class LabElectrolyzerContainer extends ContainerBase {
+public class LabElectrolyzerContainer extends ContainerBase<LabElectrolyzerTileEntity> {
protected LabElectrolyzerTileEntity tileEntity;
public short lastProgress = -1;
@@ -53,7 +53,7 @@ public class LabElectrolyzerContainer extends ContainerBase {
this.addSlotToContainer(new SlotInvSlot(tileEntity1.emptyFluidItemsSlot, 1, 42, 33));
this.addSlotToContainer(new SlotInvSlot(tileEntity1.emptyFluidItemsSlot, 2, 106, 15));
this.addSlotToContainer(new SlotInvSlot(tileEntity1.outputSlot, 1, 87, 51));
- this.addSlotToContainer(new SlotInvSlot(tileEntity1.engine, 0, 152, 15));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity1.dischargeSlot, 0, 152, 15));
}
@Override
diff --git a/ihl/processing/chemistry/LabElectrolyzerGui.java b/ihl/processing/chemistry/LabElectrolyzerGui.java
index c5997ca..aea51f8 100644
--- a/ihl/processing/chemistry/LabElectrolyzerGui.java
+++ b/ihl/processing/chemistry/LabElectrolyzerGui.java
@@ -12,7 +12,6 @@ import ihl.utils.IHLRenderUtils;
public class LabElectrolyzerGui extends GuiContainer {
private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUILabElectrolyzer.png");
private LabElectrolyzerContainer container;
- private int mixerFrame=0;
public LabElectrolyzerGui (LabElectrolyzerContainer container1) {
//the container is instanciated and passed to the superclass for handling
@@ -53,11 +52,6 @@ public class LabElectrolyzerGui extends GuiContainer {
{
IHLRenderUtils.instance.renderIHLFluidTank(this.container.tileEntity.fluidTankAnodeOutput, 125, 28, 137, 67, zLevel, par1, par2, xOffset, yOffset);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(background);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 170, 16, xOffset, yOffset);
- }
}
@Override
diff --git a/ihl/processing/chemistry/LabElectrolyzerTileEntity.java b/ihl/processing/chemistry/LabElectrolyzerTileEntity.java
index cde3e39..10feef6 100644
--- a/ihl/processing/chemistry/LabElectrolyzerTileEntity.java
+++ b/ihl/processing/chemistry/LabElectrolyzerTileEntity.java
@@ -10,7 +10,6 @@ import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
@@ -52,7 +51,6 @@ public class LabElectrolyzerTileEntity extends BasicElectricMotorTileEntity impl
this.fillInputSlotAnodeOutput = new InvSlotConsumableLiquidIHL(this, "fillInputAnodeOutput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
this.fillInputSlotCathodeOutput = new InvSlotConsumableLiquidIHL(this, "fillInputCathodeOutput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
this.emptyFluidItemsSlot = new InvSlotOutput(this, "fluidCellsOutput", 2, 3);
- this.isGuiScreenOpened=true;
}
@Override
@@ -142,12 +140,6 @@ public class LabElectrolyzerTileEntity extends BasicElectricMotorTileEntity impl
return "labElectrolizer";
}
- @Override
- public void onNetworkEvent(EntityPlayer player, int event)
- {
- // TODO Auto-generated method stub
- }
-
@Override
public int gaugeProgressScaled(int i)
{
@@ -188,23 +180,12 @@ public class LabElectrolyzerTileEntity extends BasicElectricMotorTileEntity impl
return false;
}
- private boolean checkSpecialConditions()
- {
- ForgeDirection dir = ForgeDirection.getOrientation(this.getFacing());
- TileEntity te = worldObj.getTileEntity(xCoord+dir.offsetX, yCoord, zCoord+dir.offsetZ);
- if(te instanceof CryogenicDistillerTileEntity)
- {
- CryogenicDistillerTileEntity cgte = (CryogenicDistillerTileEntity)te;
- return cgte.getFacing()==this.getFacing() && cgte.canProcess();
- }
- return false;
- }
-
public UniversalRecipeOutput getOutput()
{
return LabElectrolyzerTileEntity.recipeManager.getOutputFor(this.getInput(), false, false);
}
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List[] getInput()
{
@@ -282,11 +263,11 @@ public class LabElectrolyzerTileEntity extends BasicElectricMotorTileEntity impl
{
if(itemStackOutput1!=null)
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1}), null), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackOutputAnode, fluidStackOutputCathode}), Arrays.asList(new ItemStack[] {itemStackOutput1}),200));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1}), null), new UniversalRecipeOutput((new FluidStack[] {fluidStackOutputAnode, fluidStackOutputCathode}), (new ItemStack[] {itemStackOutput1}),200));
}
else
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1}), null), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackOutputAnode, fluidStackOutputCathode}), null,200));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1}), null), new UniversalRecipeOutput((new FluidStack[] {fluidStackOutputAnode, fluidStackOutputCathode}), null,200));
}
}
diff --git a/ihl/processing/chemistry/LeadOvenContainer.java b/ihl/processing/chemistry/LeadOvenContainer.java
index aa0eafc..c273623 100644
--- a/ihl/processing/chemistry/LeadOvenContainer.java
+++ b/ihl/processing/chemistry/LeadOvenContainer.java
@@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-public class LeadOvenContainer extends ContainerBase {
+public class LeadOvenContainer extends ContainerBase<LeadOvenTileEntity> {
protected LeadOvenTileEntity tileEntity;
public int lastFluidAmount = -1;
diff --git a/ihl/processing/chemistry/LeadOvenGui.java b/ihl/processing/chemistry/LeadOvenGui.java
index 133cb4e..2d8e785 100644
--- a/ihl/processing/chemistry/LeadOvenGui.java
+++ b/ihl/processing/chemistry/LeadOvenGui.java
@@ -5,15 +5,12 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class LeadOvenGui extends GuiContainer {
private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUILeadOven.png");
private LeadOvenContainer container;
- private String title = StatCollector.translateToLocal("ihl.gui.leadOven");
-
public LeadOvenGui (LeadOvenContainer container1) {
//the container is instanciated and passed to the superclass for handling
@@ -23,10 +20,8 @@ public class LeadOvenGui extends GuiContainer {
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- int xOffset = (this.width - xSize) / 2;
- int yOffset = (this.height - ySize) / 2;
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.renderEngine.bindTexture(background);
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.renderEngine.bindTexture(background);
}
@Override
diff --git a/ihl/processing/chemistry/LeadOvenTileEntity.java b/ihl/processing/chemistry/LeadOvenTileEntity.java
index 01f69bf..340d848 100644
--- a/ihl/processing/chemistry/LeadOvenTileEntity.java
+++ b/ihl/processing/chemistry/LeadOvenTileEntity.java
@@ -24,6 +24,7 @@ import ic2.core.block.TileEntityLiquidTankInventory;
import ic2.core.block.invslot.InvSlotConsumableFuel;
import ic2.core.block.invslot.InvSlot.Access;
import ihl.processing.invslots.IHLInvSlotOutput;
+import ihl.recipes.RecipeOutputItemStack;
import ihl.recipes.UniversalRecipeInput;
import ihl.recipes.UniversalRecipeManager;
import ihl.recipes.UniversalRecipeOutput;
@@ -152,7 +153,6 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
}
}
}
- boolean needsInvUpdate = false;
if (this.fuel <= 0 && this.canOperate())
{
if(this.fuelSlot.get()!=null)
@@ -168,11 +168,6 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
}
}
this.fuel = this.maxFuel = this.fuelSlot.consumeFuel();
-
- if (this.fuel > 0)
- {
- needsInvUpdate = true;
- }
}
if (this.isBurning() && this.canOperate())
@@ -183,7 +178,6 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
{
this.progress = 0;
this.operate();
- needsInvUpdate = true;
}
}
else
@@ -199,7 +193,6 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
if (this.getActive() != this.isBurning())
{
this.setActive(this.isBurning());
- needsInvUpdate = true;
}
}
@@ -223,12 +216,12 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
}
@Override
- public ContainerBase getGuiContainer(EntityPlayer entityPlayer)
+ public ContainerBase<LeadOvenTileEntity> getGuiContainer(EntityPlayer entityPlayer)
{
return new LeadOvenContainer(entityPlayer, this);
}
- @Override
+ @Override
@SideOnly(Side.CLIENT)
public GuiScreen getGui(EntityPlayer entityPlayer, boolean isAdmin)
{
@@ -269,6 +262,7 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
return LeadOvenTileEntity.recipeManager.getOutputFor(this.getInput(), false, false);
}
+ @SuppressWarnings("rawtypes")
public List[] getInput()
{
if(this.inputSlot.get(1)!=null)
@@ -287,7 +281,7 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
{
this.getFluidTank().fill(output2.get(0), true);
}
- List itemOutputs = routput.getItemOutputs();
+ List<RecipeOutputItemStack> itemOutputs = routput.getItemOutputs();
if(itemOutputs!=null && !itemOutputs.isEmpty())
{
this.outputSlot.add(itemOutputs);
@@ -326,7 +320,7 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
public static void addRecipe(UniversalRecipeInput input, FluidStack fluidStackWithSize)
{
- recipeManager.addRecipe(input, new UniversalRecipeOutput(Arrays.asList(new FluidStack[]{fluidStackWithSize}),null,20));
+ recipeManager.addRecipe(input, new UniversalRecipeOutput((new FluidStack[]{fluidStackWithSize}),null,20));
}
public static Map<UniversalRecipeInput, UniversalRecipeOutput> getRecipes() {
@@ -334,10 +328,10 @@ public class LeadOvenTileEntity extends TileEntityLiquidTankInventory implements
}
public static void addRecipe(ItemStack input, FluidStack fluidStackOutput, ItemStack output) {
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new ItemStack[] {input})),new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackOutput}),Arrays.asList(new ItemStack[] {output}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, (new ItemStack[] {input})),new UniversalRecipeOutput((new FluidStack[] {fluidStackOutput}),(new ItemStack[] {output}),20));
}
public static void addRecipe(ItemStack input, ItemStack output) {
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new ItemStack[] {input})),new UniversalRecipeOutput(null,Arrays.asList(new ItemStack[] {output}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, (new ItemStack[] {input})),new UniversalRecipeOutput(null,(new ItemStack[] {output}),20));
}
} \ No newline at end of file
diff --git a/ihl/processing/chemistry/LoomContainer.java b/ihl/processing/chemistry/LoomContainer.java
index 4b8e182..2d480ef 100644
--- a/ihl/processing/chemistry/LoomContainer.java
+++ b/ihl/processing/chemistry/LoomContainer.java
@@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-public class LoomContainer extends ContainerBase {
+public class LoomContainer extends ContainerBase<LoomTileEntity> {
public LoomTileEntity tileEntity;
public int lastProgress = -1;
diff --git a/ihl/processing/chemistry/LoomGui.java b/ihl/processing/chemistry/LoomGui.java
index 1052252..4964687 100644
--- a/ihl/processing/chemistry/LoomGui.java
+++ b/ihl/processing/chemistry/LoomGui.java
@@ -3,7 +3,6 @@ package ihl.processing.chemistry;
import org.lwjgl.opengl.GL11;
import ic2.core.IC2;
-import ic2.core.network.NetworkManager;
import ihl.utils.IHLRenderUtils;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
diff --git a/ihl/processing/chemistry/LoomTileEntity.java b/ihl/processing/chemistry/LoomTileEntity.java
index df5ce20..e81680d 100644
--- a/ihl/processing/chemistry/LoomTileEntity.java
+++ b/ihl/processing/chemistry/LoomTileEntity.java
@@ -11,7 +11,6 @@ import ic2.core.IC2;
import ic2.core.IHasGui;
import ic2.core.block.TileEntityInventory;
import ic2.core.block.invslot.InvSlot.Access;
-import ic2.core.network.NetworkManager;
import ihl.processing.chemistry.ApparatusProcessableInvSlot;
import ihl.processing.invslots.IHLInvSlotOutput;
import ihl.recipes.RecipeInputWire;
@@ -106,7 +105,7 @@ public class LoomTileEntity extends TileEntityInventory implements IHasGui, INet
public void operate()
{
List<IRecipeInput> input1 = LoomTileEntity.recipeManager.getRecipeInput(getInput()).getItemInputs();
- List output1 = LoomTileEntity.recipeManager.getOutputFor(getInput(), false, false).getItemOutputs();
+ List<?> output1 = LoomTileEntity.recipeManager.getOutputFor(getInput(), false, false).getItemOutputs();
this.output.add(output1);
if(input1.get(0) instanceof RecipeInputWire)
{
@@ -123,6 +122,7 @@ public class LoomTileEntity extends TileEntityInventory implements IHasGui, INet
}
}
+ @SuppressWarnings("rawtypes")
public List[] getInput()
{
return new List[] {null,Arrays.asList(new ItemStack[] {input.get()})};
@@ -131,7 +131,7 @@ public class LoomTileEntity extends TileEntityInventory implements IHasGui, INet
public boolean canOperate()
{
if(LoomTileEntity.recipeManager.getOutputFor(getInput(), false, false)==null) return false;
- List output1 = LoomTileEntity.recipeManager.getOutputFor(getInput(), false, false).getItemOutputs();
+ List<?> output1 = LoomTileEntity.recipeManager.getOutputFor(getInput(), false, false).getItemOutputs();
return this.output.canAdd(output1);
}
@@ -141,7 +141,7 @@ public class LoomTileEntity extends TileEntityInventory implements IHasGui, INet
public static void addRecipe(ItemStack input, ItemStack output)
{
if(input==null || output==null) throw new NullPointerException();
- recipeManager.addRecipe(new UniversalRecipeInput(null,Arrays.asList(new ItemStack[] {input})), new UniversalRecipeOutput(null, Arrays.asList(new ItemStack[] {output}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null,new ItemStack[] {input}), new UniversalRecipeOutput(null, new ItemStack[] {output},20));
}
public int gaugeProgressScaled(int i)
diff --git a/ihl/processing/chemistry/PaperMachineContainer.java b/ihl/processing/chemistry/PaperMachineContainer.java
index 99bfa61..ea07afc 100644
--- a/ihl/processing/chemistry/PaperMachineContainer.java
+++ b/ihl/processing/chemistry/PaperMachineContainer.java
@@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class PaperMachineContainer extends ContainerBase {
+public class PaperMachineContainer extends ContainerBase<PaperMachineTileEntity> {
protected PaperMachineTileEntity tileEntity;
public int lastFluidAmount = -1;
@@ -41,7 +41,7 @@ public class PaperMachineContainer extends ContainerBase {
this.addSlotToContainer(new SlotInvSlot(tileEntity1.drainInputSlot, 0, 78, 15));
this.addSlotToContainer(new SlotInvSlot(tileEntity1.emptyFluidItemsSlot, 0, 78, 33));
this.addSlotToContainer(new SlotInvSlot(tileEntity1.outputSlot, 0, 122, 51));
- this.addSlotToContainer(new SlotInvSlot(tileEntity1.engine, 0, 8, 32));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity1.dischargeSlot, 0, 8, 32));
}
@Override
diff --git a/ihl/processing/chemistry/PaperMachineGui.java b/ihl/processing/chemistry/PaperMachineGui.java
index 4c8cb72..b65f041 100644
--- a/ihl/processing/chemistry/PaperMachineGui.java
+++ b/ihl/processing/chemistry/PaperMachineGui.java
@@ -54,11 +54,6 @@ public class PaperMachineGui extends GuiContainer {
{
IHLRenderUtils.instance.renderIHLFluidTank(this.container.tileEntity.getFluidTank(), 102, 28, 114, 59, zLevel, par1, par2, xOffset, yOffset);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(background);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 26, 34, xOffset, yOffset);
- }
}
@Override
diff --git a/ihl/processing/chemistry/PaperMachineTileEntity.java b/ihl/processing/chemistry/PaperMachineTileEntity.java
index a694b82..4784d38 100644
--- a/ihl/processing/chemistry/PaperMachineTileEntity.java
+++ b/ihl/processing/chemistry/PaperMachineTileEntity.java
@@ -39,7 +39,6 @@ public class PaperMachineTileEntity extends BasicElectricMotorTileEntity impleme
public final InvSlotOutput emptyFluidItemsSlot;
private final IHLFluidTank fluidTank = new IHLFluidTank(8000);
public short temperature=20;
- private int fractionalOutputAmount=0;
public PaperMachineTileEntity() {
super();
@@ -47,7 +46,6 @@ public class PaperMachineTileEntity extends BasicElectricMotorTileEntity impleme
this.drainInputSlot = new InvSlotConsumableLiquidIHL(this, "drainInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.TOP, InvSlotConsumableLiquid.OpType.Drain);
this.fillInputSlot = new InvSlotConsumableLiquidIHL(this, "fillInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
this.emptyFluidItemsSlot = new InvSlotOutput(this, "fluidCellsOutput", 2, 1);
- this.isGuiScreenOpened=true;
}
@Override
@@ -64,7 +62,6 @@ public class PaperMachineTileEntity extends BasicElectricMotorTileEntity impleme
NBTTagCompound fluidTankTag = new NBTTagCompound();
this.fluidTank.writeToNBT(fluidTankTag);
nbttagcompound.setTag("fluidTank", fluidTankTag);
- NBTTagCompound fractionalOutputNBT = new NBTTagCompound();
}
@Override
@@ -115,69 +112,12 @@ public class PaperMachineTileEntity extends BasicElectricMotorTileEntity impleme
return "chemicalReactor";
}
- private int mX()
- {
- switch(this.getFacing())
- {
- case 4:
- return -1;
- case 5:
- return 1;
- default:
- return 0;
- }
- }
-
- private int mZ()
- {
- switch(this.getFacing())
- {
- case 3:
- return 1;
- case 2:
- return -1;
- case 4:
- return 0;
- case 5:
- return 0;
- default:
- return -1;
- }
- }
-
- private short getFacingFromXZ(int x, int z)
- {
- switch(x)
- {
- case -1:
- return (short)4;
- case 1:
- return (short)5;
- default:
- switch(z)
- {
- case 1:
- return (short)3;
- case -1:
- return (short)2;
- default:
- return (short)2;
- }
- }
- }
-
public float getRenderLiquidLevel()
{
return (float)this.fluidTank.getFluidAmount()/(float)this.fluidTank.getCapacity();
}
@Override
- public void onNetworkEvent(EntityPlayer player, int event)
- {
- // TODO Auto-generated method stub
- }
-
- @Override
public int gaugeProgressScaled(int i)
{
return this.progress * i / operationLength;
@@ -235,6 +175,7 @@ public class PaperMachineTileEntity extends BasicElectricMotorTileEntity impleme
}
@Override
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public List[] getInput()
{
return new List[] {Arrays.asList(new FluidStack[]{fluidTank.getFluid()}), null};
@@ -304,12 +245,12 @@ public class PaperMachineTileEntity extends BasicElectricMotorTileEntity impleme
public static void addRecipe(FluidStack fluidStackInput1, ItemStack itemStackOutput1)
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1}), null), new UniversalRecipeOutput(null, Arrays.asList(new ItemStack[] {itemStackOutput1}),200));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {fluidStackInput1}), null), new UniversalRecipeOutput(null, (new ItemStack[] {itemStackOutput1}),200));
}
public static void addSpecialConditionsRecipe(FluidStack fluidStackInput1, FluidStack fluidStackInput2, ItemStack itemStackInput, FluidStack fluidStackOutput, ItemStack itemStackOutput1, ItemStack itemStackOutput2)
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {fluidStackInput1, fluidStackInput2}), Arrays.asList(new ItemStack[] {itemStackInput})), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStackOutput}), Arrays.asList(new ItemStack[] {itemStackOutput1, itemStackOutput2}),200, true));
+ addRecipe(new UniversalRecipeInput(new FluidStack[] {fluidStackInput1, fluidStackInput2}, (new ItemStack[] {itemStackInput})), new UniversalRecipeOutput((new FluidStack[] {fluidStackOutput}), (new ItemStack[] {itemStackOutput1, itemStackOutput2}),200, true));
}
public IHLFluidTank getFluidTank()
diff --git a/ihl/processing/chemistry/PrecipitatorCondenserTileEntity.java b/ihl/processing/chemistry/PrecipitatorCondenserTileEntity.java
index becd7e8..6f3b43f 100644
--- a/ihl/processing/chemistry/PrecipitatorCondenserTileEntity.java
+++ b/ihl/processing/chemistry/PrecipitatorCondenserTileEntity.java
@@ -25,7 +25,6 @@ public class PrecipitatorCondenserTileEntity extends TileEntityInventory impleme
{
private final static UniversalRecipeManager recipeManager = new UniversalRecipeManager("precipitatorcondenser");
private static float kF = 24000F;
- private static float gasC = 1F;
private static float fluidC = 4F;
private static float H = 2256F;
private final IHLFluidTank gasBuffer = new IHLFluidTank(10000);
@@ -49,7 +48,7 @@ public class PrecipitatorCondenserTileEntity extends TileEntityInventory impleme
public static void addRecipe(String fluidNameIn, String fluidNameOut, int conversionRateToGas)
{
- recipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {IHLUtils.getFluidStackWithSize(fluidNameIn, conversionRateToGas)}), null), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {IHLUtils.getFluidStackWithSize(fluidNameOut, 1)}),null,2));
+ recipeManager.addRecipe(new UniversalRecipeInput((new FluidStack[] {IHLUtils.getFluidStackWithSize(fluidNameIn, conversionRateToGas)}), null), new UniversalRecipeOutput((new FluidStack[] {IHLUtils.getFluidStackWithSize(fluidNameOut, 1)}),null,2));
}
@Override
diff --git a/ihl/processing/chemistry/RefluxCondenserTileEntity.java b/ihl/processing/chemistry/RefluxCondenserTileEntity.java
index 91366fb..b6cbcb0 100644
--- a/ihl/processing/chemistry/RefluxCondenserTileEntity.java
+++ b/ihl/processing/chemistry/RefluxCondenserTileEntity.java
@@ -6,7 +6,6 @@ import java.util.List;
import ic2.api.network.INetworkDataProvider;
import ic2.api.tile.IWrenchable;
import ic2.core.IC2;
-import ic2.core.network.NetworkManager;
import ihl.utils.IHLUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@@ -37,7 +36,7 @@ public class RefluxCondenserTileEntity extends TileEntity implements IWrenchable
@Override
public List<String> getNetworkedFields()
{
- List<String> fields = new ArrayList();
+ List<String> fields = new ArrayList<String>();
fields.add("facing");
return fields;
}