diff options
Diffstat (limited to 'ihl/processing/metallurgy')
52 files changed, 139 insertions, 855 deletions
diff --git a/ihl/processing/metallurgy/AchesonFurnaceGui.java b/ihl/processing/metallurgy/AchesonFurnaceGui.java index bafa530..70e9d05 100644 --- a/ihl/processing/metallurgy/AchesonFurnaceGui.java +++ b/ihl/processing/metallurgy/AchesonFurnaceGui.java @@ -17,8 +17,6 @@ public class AchesonFurnaceGui 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(achesonFurnaceBackground);
int i1;
diff --git a/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java b/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java index 5d228fc..0c1b75f 100644 --- a/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java +++ b/ihl/processing/metallurgy/AchesonFurnanceTileEntity.java @@ -1,6 +1,5 @@ package ihl.processing.metallurgy;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -35,7 +34,7 @@ public class AchesonFurnanceTileEntity extends MachineBaseTileEntity{ public static void addRecipe(IRecipeInput input1, IRecipeInput input2, String output1)
{
- recipeManager.addRecipe(new UniversalRecipeInput(null,Arrays.asList(new IRecipeInput [] {input1,input2})),new UniversalRecipeOutput(null,Arrays.asList(new ItemStack [] {IHLUtils.getThisModItemStack(output1)}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null,new IRecipeInput [] {input1,input2}),new UniversalRecipeOutput(null,new ItemStack [] {IHLUtils.getThisModItemStack(output1)},20));
}
@Override
@@ -46,13 +45,11 @@ public class AchesonFurnanceTileEntity extends MachineBaseTileEntity{ @Override
public String getLoopSoundFile() {
- // TODO Auto-generated method stub
return null;
}
@Override
public String getStopSoundFile() {
- // TODO Auto-generated method stub
return null;
}
@@ -104,7 +101,7 @@ public class AchesonFurnanceTileEntity extends MachineBaseTileEntity{ ItemStack crucible = input.getItemStack(IHLMod.crucible);
if(crucible!=null)
{
- ItemStack stack = ((Crucible)crucible.getItem()).processContent(crucible, this);
+ ((Crucible)crucible.getItem()).processContent(crucible, this);
}
}
@@ -117,7 +114,7 @@ public class AchesonFurnanceTileEntity extends MachineBaseTileEntity{ }
@Override
- public List[] getInput()
+ public List<?>[] getInput()
{
return new List[] {null, this.input.getItemStackList()};
}
diff --git a/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java b/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java index 11865a4..47cfda9 100644 --- a/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java +++ b/ihl/processing/metallurgy/BasicElectricMotorTileEntity.java @@ -9,18 +9,12 @@ import ic2.api.energy.tile.IEnergySink; import ic2.api.network.INetworkClientTileEntityEventListener;
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.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.utils.IHLUtils;
-import net.minecraft.entity.item.EntityItem;
+import ihl.utils.IHLInvSlotDischarge;
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;
@@ -29,10 +23,9 @@ import net.minecraftforge.common.util.ForgeDirection; public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBaseTileEntity implements IHasGui, INetworkClientTileEntityEventListener, IEnergySink{
- public final ElectricEngineInvSlot engine;
+ public final IHLInvSlotDischarge dischargeSlot;
public short progress;
protected short operationLength=600;
- public boolean isGuiScreenOpened=false;
protected final double energyConsume=0.1D;
public double energy;
public int maxStorage=128;
@@ -41,7 +34,7 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa public BasicElectricMotorTileEntity()
{
super();
- engine = new ElectricEngineInvSlot(this, "engine", 0, Access.IO, 1, 1);
+ dischargeSlot = new IHLInvSlotDischarge(this, 1, Access.IO, 4, InvSlot.InvSide.BOTTOM);
}
@@ -79,6 +72,7 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa }
+ @SuppressWarnings("unchecked")
@Override
public void setFacing(short facing1)
{
@@ -125,10 +119,10 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa }
if(!nodeList.isEmpty())
{
- Iterator ei = nodeList.iterator();
+ Iterator<NodeEntity> ei = nodeList.iterator();
while(ei.hasNext())
{
- NodeEntity ne=(NodeEntity) ei.next();
+ NodeEntity ne= ei.next();
if((ne.prevAnchorEntity==null||ne.nextAnchorEntity==null) && this.cableListContains(ne.getChainUniqueID()))
{
ne.setVirtualNodePos(connectionX,connectionY,connectionZ);
@@ -194,7 +188,6 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa switch(event)
{
case 0:
- this.isGuiScreenOpened=false;
break;
}
}
@@ -204,14 +197,19 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa @Override
public void updateEntityServer()
{
- if(this.gridID!=-1 && this.getGrid().energy>0D && this.energy<this.maxStorage)
- {
- this.energy+=energyConsume*10D;
- this.getGrid().drawEnergy(energyConsume*10D, this);
- }
- if (this.canOperate() && this.engine.correctContent() && this.isGuiScreenOpened && this.energy>=this.energyConsume/this.engine.getEfficiency())
+ if(this.getDemandedEnergy() > 1.0D)
+ {
+ double amount = this.dischargeSlot.discharge(this.getDemandedEnergy(), false);
+ this.energy += amount;
+ }
+ if(this.gridID!=-1 && this.getGrid().energy>0D && this.energy<this.maxStorage)
{
- this.energy-=this.energyConsume/this.engine.getEfficiency();
+ this.energy+=energyConsume*10D;
+ this.getGrid().drawEnergy(energyConsume*10D, this);
+ }
+ if (this.canOperate() && this.energy>=this.energyConsume)
+ {
+ this.energy-=this.energyConsume;
if (this.progress == 0)
{
IC2.network.get().initiateTileEntityEvent(this, 0, true);
@@ -238,7 +236,7 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa }
- public abstract List[] getInput();
+ public abstract List<?>[] getInput();
public abstract boolean canOperate();
@Override
public void onGuiClosed(EntityPlayer arg0) {}
@@ -294,6 +292,7 @@ public abstract class BasicElectricMotorTileEntity extends FlexibleCableHolderBa return 0d;
}
+ @Override
public void injectEnergyInThisNode(double amount, double voltage)
{
this.energy+=amount;
diff --git a/ihl/processing/metallurgy/CoilerContainer.java b/ihl/processing/metallurgy/CoilerContainer.java index ba809d2..710a708 100644 --- a/ihl/processing/metallurgy/CoilerContainer.java +++ b/ihl/processing/metallurgy/CoilerContainer.java @@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-public class CoilerContainer extends ContainerBase {
+public class CoilerContainer extends ContainerBase<CoilerTileEntity> {
public CoilerTileEntity tileEntity;
private short lastEnergy = -1;
@@ -31,7 +31,7 @@ public class CoilerContainer extends ContainerBase { this.addSlotToContainer(new Slot(entityPlayer.inventory, col, 8 + col * 18, height + -24));
}
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.output, 0, 69, 22));
- this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.engine,0, 22, 55));
+ this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.dischargeSlot,0, 22, 55));
}
@Override
diff --git a/ihl/processing/metallurgy/CoilerGui.java b/ihl/processing/metallurgy/CoilerGui.java index fd3b7cd..b635506 100644 --- a/ihl/processing/metallurgy/CoilerGui.java +++ b/ihl/processing/metallurgy/CoilerGui.java @@ -32,10 +32,6 @@ public class CoilerGui extends GuiContainer { i1 = Math.min(this.container.tileEntity.getGUIEnergy(12),12);
this.drawTexturedModalRect(39, 55 + 12 - i1, 179, 12 - i1, 14, i1 + 2);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 47, 56, xOffset, yOffset);
- }
IHLRenderUtils.instance.drawTooltip(par1,par2,9,11,xOffset,yOffset,StatCollector.translateToLocal("ihl.coiler.tip"));
}
diff --git a/ihl/processing/metallurgy/CoilerRender.java b/ihl/processing/metallurgy/CoilerRender.java index 646b342..f3da8fa 100644 --- a/ihl/processing/metallurgy/CoilerRender.java +++ b/ihl/processing/metallurgy/CoilerRender.java @@ -70,11 +70,8 @@ private final float scale=1F/16F; {
model.CoilRotating.render(scale);
}
- if(cte.hasEngine)
- {
- model.MotorPart1.render(scale);
- model.MotorPart2.render(scale);
- }
+ model.MotorPart1.render(scale);
+ model.MotorPart2.render(scale);
}
model.RotatingPart2.render(scale);
GL11.glPopMatrix(); //end
diff --git a/ihl/processing/metallurgy/CoilerTileEntity.java b/ihl/processing/metallurgy/CoilerTileEntity.java index 6a671b0..5fdcf13 100644 --- a/ihl/processing/metallurgy/CoilerTileEntity.java +++ b/ihl/processing/metallurgy/CoilerTileEntity.java @@ -5,7 +5,6 @@ import java.util.List; import ic2.core.ContainerBase;
import ic2.core.IC2;
import ic2.core.block.invslot.InvSlotOutput;
-import ic2.core.network.NetworkManager;
import ihl.interfaces.IWire;
import ihl.utils.IHLUtils;
import net.minecraft.client.gui.GuiScreen;
@@ -19,13 +18,11 @@ public class CoilerTileEntity extends BasicElectricMotorTileEntity implements IP public final InvSlotOutput output;
private int activeTimer=0;
public boolean hasCoil=false;
- public boolean hasEngine=false;
public CoilerTileEntity()
{
super();
this.output = new InvSlotOutput(this, "output", 1, 1);
- this.isGuiScreenOpened=true;
}
@@ -39,7 +36,6 @@ public class CoilerTileEntity extends BasicElectricMotorTileEntity implements IP {
List<String> fields = super.getNetworkedFields();
fields.add("hasCoil");
- fields.add("hasEngine");
return fields;
}
@@ -89,34 +85,22 @@ public class CoilerTileEntity extends BasicElectricMotorTileEntity implements IP this.hasCoil=true;
IC2.network.get().updateTileEntityField(this, "hasCoil");
}
- if(this.engine.isEmpty() && hasEngine==true)
- {
- this.hasEngine=false;
- IC2.network.get().updateTileEntityField(this, "hasEngine");
- }
- else if(this.engine.correctContent() && hasEngine==false)
- {
- this.hasEngine=true;
- IC2.network.get().updateTileEntityField(this, "hasEngine");
- }
-
}
@Override
public void operate()
{}
-
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List[] getInput()
{
return null;
}
-
@Override
public boolean canProcess(ItemStack cable) {
- if(this.engine.correctContent() && this.energy>1D/this.engine.getEfficiency() && cable.getItem() instanceof IWire)
+ if(this.energy>1D && cable.getItem() instanceof IWire)
{
if(this.output.isEmpty())
{
@@ -139,7 +123,7 @@ public class CoilerTileEntity extends BasicElectricMotorTileEntity implements IP public void process(ItemStack cable) {
if(cable.getItem() instanceof IWire)
{
- this.energy-=1D/this.engine.getEfficiency();
+ this.energy-=1D;
if(this.output.isEmpty())
{
setActive(true);
diff --git a/ihl/processing/metallurgy/Crucible.java b/ihl/processing/metallurgy/Crucible.java index a435e49..3f14f48 100644 --- a/ihl/processing/metallurgy/Crucible.java +++ b/ihl/processing/metallurgy/Crucible.java @@ -25,7 +25,6 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem;
import net.minecraftforge.fluids.IFluidHandler;
-import net.minecraftforge.oredict.OreDictionary;
import ic2.api.item.IItemHudInfo;
import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeInputOreDict;
@@ -62,7 +61,7 @@ public class Crucible extends Item implements IHandHeldInventory, IFluidContaine public static void addRecipe(String string, FluidStack output)
{
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new IRecipeInput[] {new RecipeInputOreDict(string)})), new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {output}),null,20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, new IRecipeInput[] {new RecipeInputOreDict(string)}), new UniversalRecipeOutput(new FluidStack[] {output},null,20));
}
@Override
@@ -84,7 +83,8 @@ public class Crucible extends Item implements IHandHeldInventory, IFluidContaine /**
* allows items to add custom lines of information to the mouseover description
*/
- @Override
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ @Override
public void addInformation(ItemStack itemStack, EntityPlayer player, List info, boolean b)
{
super.addInformation(itemStack, player, info, b);
@@ -103,7 +103,7 @@ public class Crucible extends Item implements IHandHeldInventory, IFluidContaine @Override
public List<String> getHudInfo(ItemStack itemStack)
{
- LinkedList info = new LinkedList();
+ LinkedList<String> info = new LinkedList<String>();
FluidStack fs = this.getFluid(itemStack);
if (fs != null)
@@ -249,29 +249,7 @@ public class Crucible extends Item implements IHandHeldInventory, IFluidContaine }
}
}
- private String getFormattedFluidNameFromMaterialName(String input)
- {
- if(input.length()<6)
- {
- return "";
- }
- String input2 = input.substring(5);
- return "molten."+input2.toLowerCase();
- }
-
- private String getOreName(ItemStack stack)
- {
- int[] arrayIDs = OreDictionary.getOreIDs(stack);
- for(int i=0; i<arrayIDs.length;i++)
- {
- if(OreDictionary.getOreName(arrayIDs[i]).startsWith("ingot"))
- {
- return OreDictionary.getOreName(arrayIDs[i]);
- }
- }
- return "";
- }
-
+
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister register)
diff --git a/ihl/processing/metallurgy/CrucibleContainer.java b/ihl/processing/metallurgy/CrucibleContainer.java index b3ab3d8..647c277 100644 --- a/ihl/processing/metallurgy/CrucibleContainer.java +++ b/ihl/processing/metallurgy/CrucibleContainer.java @@ -4,7 +4,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import ic2.core.ContainerBase;
import ic2.core.IC2;
import ic2.core.util.StackUtil;
@@ -44,7 +43,7 @@ public class CrucibleContainer extends ContainerBase<CrucibleInventory> if (stack != null)
{
- NBTTagCompound nbtTagCompoundSlot = StackUtil.getOrCreateNbtData(stack);
+ StackUtil.getOrCreateNbtData(stack);
if (this.box.isThisContainer(stack))
{
diff --git a/ihl/processing/metallurgy/CrucibleGui.java b/ihl/processing/metallurgy/CrucibleGui.java index b0bfc85..e92347c 100644 --- a/ihl/processing/metallurgy/CrucibleGui.java +++ b/ihl/processing/metallurgy/CrucibleGui.java @@ -27,8 +27,6 @@ public class CrucibleGui extends GuiContainer @Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- int xOffset = (this.width - xSize) / 2;
- int yOffset = (this.height - ySize) / 2;
fontRendererObj.drawString(title, 68, 0, 6171880);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineContainer.java b/ihl/processing/metallurgy/DetonationSprayingMachineContainer.java index 3bfd2b0..94d479c 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineContainer.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineContainer.java @@ -5,7 +5,7 @@ import ic2.core.slot.SlotInvSlot; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Slot;
-public class DetonationSprayingMachineContainer extends ContainerBase {
+public class DetonationSprayingMachineContainer extends ContainerBase<DetonationSprayingMachineTileEntity> {
protected DetonationSprayingMachineTileEntity tileEntity;
public int lastFluidAmount = -1;
diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineGui.java b/ihl/processing/metallurgy/DetonationSprayingMachineGui.java index cc4d455..66d9acb 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineGui.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineGui.java @@ -17,24 +17,21 @@ import cpw.mods.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT)
public class DetonationSprayingMachineGui extends GuiContainer {
private static final ResourceLocation background = new ResourceLocation("ihl", "textures/gui/GUIDetonationSprayingMachine.png");
- private DetonationSprayingMachineContainer container;
private static final String hint = StatCollector.translateToLocal("ihl.dsmhint");
public DetonationSprayingMachineGui (DetonationSprayingMachineContainer detonationSprayingMachineContainer) {
//the container is instanciated and passed to the superclass for handling
super(detonationSprayingMachineContainer);
- this.container=detonationSprayingMachineContainer;
}
@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
+ @SuppressWarnings("unchecked")
+ @Override
protected void drawGuiContainerBackgroundLayer(float par1, int par2,
int par3) {
//draw your Gui here, only thing you need to change is the path
diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineModel.java b/ihl/processing/metallurgy/DetonationSprayingMachineModel.java index 48329d5..7335125 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineModel.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineModel.java @@ -2,7 +2,6 @@ package ihl.processing.metallurgy; import ihl.model.IHLModelRenderer;
import net.minecraft.client.model.ModelBase;
-import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
import net.minecraftforge.common.util.ForgeDirection;
@@ -48,13 +47,6 @@ public class DetonationSprayingMachineModel extends ModelBase { Base.addTube("Tube11", -1F, 10F, -8F, 2, 2, 1, 0F,1F,ForgeDirection.NORTH);
}
- private void setRotation(ModelRenderer model, float x, float y, float z)
- {
- model.rotateAngleX = x;
- model.rotateAngleY = y;
- model.rotateAngleZ = z;
- }
-
@Override
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity)
{
diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineRender.java b/ihl/processing/metallurgy/DetonationSprayingMachineRender.java index 9bb0c6e..ee64b65 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineRender.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineRender.java @@ -49,7 +49,7 @@ public void renderAModelAt(DetonationSprayingMachineTileEntity tile, double x, d bindTexture(tex); //texture
GL11.glScalef(1F, -1F, -1F);
GL11.glTranslatef(0F, -1.0F, 0F);
- model.Base.render(1.0F/16.0F);
+ model.Base.render(scale);
GL11.glPopMatrix();
}
diff --git a/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java b/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java index 590f6e9..f9d2cb6 100644 --- a/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java +++ b/ihl/processing/metallurgy/DetonationSprayingMachineTileEntity.java @@ -23,7 +23,6 @@ import ic2.core.audio.AudioSource; import ic2.core.audio.PositionSpec;
import ic2.core.block.TileEntityInventory;
import ic2.core.block.invslot.InvSlot.Access;
-import ic2.core.network.NetworkManager;
import ihl.processing.chemistry.ApparatusProcessableInvSlot;
import ihl.recipes.RecipeOutputItemStack;
import ihl.recipes.UniversalRecipeInput;
@@ -76,58 +75,6 @@ public class DetonationSprayingMachineTileEntity extends TileEntityInventory imp return "detonationSprayingMachine";
}
- 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(int event)
{
@@ -158,7 +105,7 @@ public class DetonationSprayingMachineTileEntity extends TileEntityInventory imp return DetonationSprayingMachineTileEntity.recipeManager.getOutputFor(this.getInput(), false, false);
}
- public List[] getInput()
+ public List<?>[] getInput()
{
return new List[] {null,this.input.getItemStackList()};
}
@@ -226,11 +173,11 @@ public class DetonationSprayingMachineTileEntity extends TileEntityInventory imp public static void addRecipe(ItemStack input, ItemStack output)
{
- List<IRecipeInput> dsmInputs1 = new ArrayList();
- dsmInputs1.add(new RecipeInputItemStack(input));
- dsmInputs1.add(new RecipeInputOreDict("dustDiamond"));
- dsmInputs1.add(new RecipeInputOreDict("dustGunpowder"));
- recipeManager.addRecipe(new UniversalRecipeInput(null, dsmInputs1), new UniversalRecipeOutput(null,Arrays.asList(new ItemStack[] {output}),1));
+ IRecipeInput[] dsmInputs1 = new IRecipeInput[3];
+ dsmInputs1[0]=new RecipeInputItemStack(input);
+ dsmInputs1[1]=new RecipeInputOreDict("dustDiamond");
+ dsmInputs1[2]=new RecipeInputOreDict("dustGunpowder");
+ recipeManager.addRecipe(new UniversalRecipeInput(null, dsmInputs1), new UniversalRecipeOutput(null,new ItemStack[] {output},1));
}
public static void addRecipe(UniversalRecipeInput input, UniversalRecipeOutput output)
diff --git a/ihl/processing/metallurgy/DrawingDeskContainer.java b/ihl/processing/metallurgy/DrawingDeskContainer.java deleted file mode 100644 index ca570a1..0000000 --- a/ihl/processing/metallurgy/DrawingDeskContainer.java +++ /dev/null @@ -1,36 +0,0 @@ -package ihl.processing.metallurgy;
-
-import ic2.core.ContainerBase;
-import ic2.core.slot.SlotInvSlot;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-
-public class DrawingDeskContainer extends ContainerBase {
-
- public DrawingDeskTileEntity tileEntity;
- public int lastProgress = -1;
- private final static int height=166;
-
- public DrawingDeskContainer(EntityPlayer entityPlayer,
- DrawingDeskTileEntity tileEntity1) {
- super(tileEntity1);
- tileEntity=tileEntity1;
- int col;
-
- for (col = 0; col < 3; ++col)
- {
- for (int col1 = 0; col1 < 9; ++col1)
- {
- this.addSlotToContainer(new Slot(entityPlayer.inventory, col1 + col * 9 + 9, 8 + col1 * 18, height + -82 + col * 18));
- }
- }
-
- for (col = 0; col < 9; ++col)
- {
- this.addSlotToContainer(new Slot(entityPlayer.inventory, col, 8 + col * 18, height + -24));
- }
- this.addSlotToContainer(new SlotInvSlot(tileEntity1.input, 0, 8, 44));
- this.addSlotToContainer(new SlotInvSlot(tileEntity1.output, 0, 127, 44));
- }
-}
diff --git a/ihl/processing/metallurgy/DrawingDeskGui.java b/ihl/processing/metallurgy/DrawingDeskGui.java deleted file mode 100644 index 301e072..0000000 --- a/ihl/processing/metallurgy/DrawingDeskGui.java +++ /dev/null @@ -1,59 +0,0 @@ -package ihl.processing.metallurgy;
-
-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;
-
-public class DrawingDeskGui extends GuiContainer {
-
- private DrawingDeskContainer container;
- protected static final ResourceLocation tex = new ResourceLocation("ihl", "textures/gui/GUIDrawingDesk.png");
-
- public DrawingDeskGui(DrawingDeskContainer latheContainer) {
- super(latheContainer);
- container = latheContainer;
- }
-
-
- @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;
- if (this.container.tileEntity.progress > 0)
- {
- GL11.glEnable(GL11.GL_BLEND);
- GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.99F);
- i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(38),38);
- this.drawTexturedModalRect(68, 30, 176, 0, i1 + 1, 10);
- }
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2,
- int par3) {
- //draw your Gui here, only thing you need to change is the path
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
- this.mc.renderEngine.bindTexture(tex);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-
- @Override
- public void onGuiClosed()
- {
- super.onGuiClosed();
- this.container.tileEntity.isGuiScreenOpened=false;
- IC2.network.get().initiateClientTileEntityEvent(this.container.tileEntity, 0);
- }
-
-}
diff --git a/ihl/processing/metallurgy/DrawingDeskModel.java b/ihl/processing/metallurgy/DrawingDeskModel.java deleted file mode 100644 index 55f1c84..0000000 --- a/ihl/processing/metallurgy/DrawingDeskModel.java +++ /dev/null @@ -1,66 +0,0 @@ -package ihl.processing.metallurgy; - -import net.minecraft.client.model.ModelBase; -import net.minecraftforge.common.util.ForgeDirection; -import ihl.model.IHLModelRenderer; - -public class DrawingDeskModel extends ModelBase -{ - //fields - IHLModelRenderer RotatePart; - IHLModelRenderer Piece1; - - public DrawingDeskModel() - { - textureWidth = 64; - textureHeight = 32; - setTextureOffset("RotatePart.Shape1", 0, 14); - setTextureOffset("RotatePart.Pipe2", 0, 17); - setTextureOffset("RotatePart.Shape4", 3, 14); - setTextureOffset("RotatePart.Shape3", 0, 26); - setTextureOffset("RotatePart.Pipe5", 16, 20); - setTextureOffset("RotatePart.Pipe6", 0, 18); - setTextureOffset("RotatePart.Pipe11", 13, 22); - setTextureOffset("RotatePart.Pipe12", 13, 22); - setTextureOffset("RotatePart.Pipe13", 13, 22); - setTextureOffset("RotatePart.Pipe14", 13, 22); - setTextureOffset("RotatePart.Pipe15", 13, 22); - setTextureOffset("Piece1.Shape7", 0, 17); - setTextureOffset("Piece1.Shape8", 0, 17); - setTextureOffset("Piece1.PipeW9", 0, 18); - setTextureOffset("Piece1.PipeW10", 0, 20); - setTextureOffset("Piece1.Shape2", 0, 0); - - RotatePart = new IHLModelRenderer(this, "RotatePart"); - RotatePart.setRotationPoint(0F, 23F, -6F); - setRotation(RotatePart, 0.4F, 0F, 0F); - RotatePart.mirror = true; - RotatePart.addBox("Shape1", 7F, -1F, -1F, 1, 2, 16,false); - RotatePart.addTube("Pipe2", -7.5F, -3F, 0F, 1, 2, 1, 0F,1F,ForgeDirection.UP); - RotatePart.addBox("Shape4", -8F, -1F, -1F, 1, 2, 16,false); - RotatePart.addBox("Shape3", -7F, -1F, -1F, 14, 2, 2,false); - RotatePart.addTube("Pipe5", -5.5F, -3F, 0F, 1, 2, 1, 0F,1F,ForgeDirection.UP); - RotatePart.addTube("Pipe6", -3.5F, -3F, 0F, 1, 2, 1, 0F,1F,ForgeDirection.UP); - RotatePart.addTube("Pipe11", -1.5F, -3F, 0F, 1, 2, 1, 0F,1F,ForgeDirection.UP); - RotatePart.addTube("Pipe12", 0.5F, -3F, 0F, 1, 2, 1, 0F,1F,ForgeDirection.UP); - RotatePart.addTube("Pipe13", 2.5F, -3F, 0F, 1, 2, 1, 0F,1F,ForgeDirection.UP); - RotatePart.addTube("Pipe14", 4.5F, -3F, 0F, 1, 2, 1, 0F,1F,ForgeDirection.UP); - RotatePart.addTube("Pipe15", 6.5F, -3F, 0F, 1, 2, 1, 0F,1F,ForgeDirection.UP); - Piece1 = new IHLModelRenderer(this, "Piece1"); - Piece1.setRotationPoint(0F, 16F, 0F); - setRotation(Piece1, 0F, 0F, 0F); - Piece1.mirror = true; - Piece1.addBox("Shape7", 6F, -4F, 6F, 1, 12, 2,false); - Piece1.addBox("Shape8", -7F, -4F, 6F, 1, 12, 2,false); - Piece1.addTube("PipeW9", -6F, 7F, 7F, 12, 1, 1, 0F,1F,ForgeDirection.EAST); - Piece1.addTube("PipeW10", -6F, -4F, 6F, 12, 1, 1, 0F,1F,ForgeDirection.EAST); - Piece1.addBox("Shape2", 0F, 7F, 0F, 4, 1, 1,false); - } - - private void setRotation(IHLModelRenderer model, float x, float y, float z) - { - model.rotateAngleX = x; - model.rotateAngleY = y; - model.rotateAngleZ = z; - } -} diff --git a/ihl/processing/metallurgy/DrawingDeskTileEntity.java b/ihl/processing/metallurgy/DrawingDeskTileEntity.java deleted file mode 100644 index aed1a97..0000000 --- a/ihl/processing/metallurgy/DrawingDeskTileEntity.java +++ /dev/null @@ -1,173 +0,0 @@ -package ihl.processing.metallurgy;
-
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import ic2.api.network.INetworkClientTileEntityEventListener;
-import ic2.api.recipe.IRecipeInput;
-import ic2.core.ContainerBase;
-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;
-import ihl.recipes.UniversalRecipeInput;
-import ihl.recipes.UniversalRecipeManager;
-import ihl.recipes.UniversalRecipeOutput;
-import ihl.utils.IHLUtils;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-
-public class DrawingDeskTileEntity extends TileEntityInventory implements IHasGui, INetworkClientTileEntityEventListener
-{
- protected static UniversalRecipeManager recipeManager = new UniversalRecipeManager("DrawingDesk");
- public short progress;
- protected short operationLength=200;
- public final ApparatusProcessableInvSlot input;
- public final IHLInvSlotOutput output;
- boolean isGuiScreenOpened=false;
-
- public DrawingDeskTileEntity()
- {
- super();
- input = new ApparatusProcessableInvSlot(this, "input", 0, Access.IO, 1, 64);
- output = new IHLInvSlotOutput(this, "output", 1, 1);
- }
-
- public boolean enableUpdateEntity()
- {
- return IC2.platform.isSimulating();
- }
-
- @Override
- public void updateEntityServer()
- {
- super.updateEntityServer();
- if (this.canOperate() && this.isGuiScreenOpened)
- {
- this.setActive(true);
-
- if (this.progress == 0)
- {
- IC2.network.get().initiateTileEntityEvent(this, 0, true);
- }
- ++this.progress;
- if (this.progress >= this.operationLength)
- {
- this.operate();
- this.progress = 0;
- IC2.network.get().initiateTileEntityEvent(this, 2, true);
- }
- }
- else
- {
- if (this.progress != 0 && this.getActive())
- {
- IC2.network.get().initiateTileEntityEvent(this, 1, true);
- }
- if (!this.canOperate())
- {
- this.progress = 0;
- }
- this.setActive(false);
- }
- }
-
- @Override
- public String getInventoryName() {
- return "DrawingDesk";
- }
-
- @Override
- public ItemStack getWrenchDrop(EntityPlayer player)
- {
- return IHLUtils.getThisModItemStack("DrawingDesk");
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public GuiScreen getGui(EntityPlayer player, boolean arg1) {
- return new DrawingDeskGui(new DrawingDeskContainer(player, this));
- }
-
- @Override
- public ContainerBase<?> getGuiContainer(EntityPlayer player) {
- this.isGuiScreenOpened=true;
- return new DrawingDeskContainer(player, this);
- }
-
- public void operate()
- {
- List<IRecipeInput> input1 = DrawingDeskTileEntity.recipeManager.getRecipeInput(getInput()).getItemInputs();
- List output1 = DrawingDeskTileEntity.recipeManager.getOutputFor(getInput(), false, false).getItemOutputs();
- this.output.add(output1);
- if(input1.get(0) instanceof RecipeInputWire)
- {
- int fiberLength = input1.get(0).getAmount();
- boolean isFiberConsumed = IHLUtils.adjustWireLength(this.input.get(), -fiberLength);
- if(isFiberConsumed)
- {
- this.input.put(null);
- }
- }
- else
- {
- this.input.consume(0, input1.get(0).getAmount());
- }
- }
-
- public List[] getInput()
- {
- return new List[] {null,Arrays.asList(new ItemStack[] {input.get()})};
- }
-
- public boolean canOperate()
- {
- if(DrawingDeskTileEntity.recipeManager.getOutputFor(getInput(), false, false)==null) return false;
- List output1 = DrawingDeskTileEntity.recipeManager.getOutputFor(getInput(), false, false).getItemOutputs();
- return this.output.canAdd(output1);
- }
-
- @Override
- public void onGuiClosed(EntityPlayer arg0) {}
-
- 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));
- }
-
- public int gaugeProgressScaled(int i)
- {
- return this.progress * i / this.operationLength;
- }
-
- @Override
- public void onNetworkEvent(EntityPlayer player, int event)
- {
- switch(event)
- {
- case 0:
- this.isGuiScreenOpened=false;
- break;
- }
- }
-
- public static Map<UniversalRecipeInput, UniversalRecipeOutput> getRecipes() {
- return recipeManager.getRecipes();
- }
-
- @Override
- public boolean shouldRenderInPass(int pass)
- {
- return pass==0;
- }
-
-}
diff --git a/ihl/processing/metallurgy/ElectricEngineItem.java b/ihl/processing/metallurgy/ElectricEngineItem.java index ec1bdf6..59d6d07 100644 --- a/ihl/processing/metallurgy/ElectricEngineItem.java +++ b/ihl/processing/metallurgy/ElectricEngineItem.java @@ -18,8 +18,8 @@ import ihl.IHLModInfo; public class ElectricEngineItem extends Item{
public Type type;
- public static List<ElectricEngineItem> instances = new ArrayList();
- private static Map<Type, IIcon> iconMap = new HashMap();
+ public static List<ElectricEngineItem> instances = new ArrayList<ElectricEngineItem> ();
+ private static Map<Type, IIcon> iconMap = new HashMap<Type, IIcon>();
public ElectricEngineItem(Type type1)
diff --git a/ihl/processing/metallurgy/ExtruderContainer.java b/ihl/processing/metallurgy/ExtruderContainer.java index f4af0c0..77b92e6 100644 --- a/ihl/processing/metallurgy/ExtruderContainer.java +++ b/ihl/processing/metallurgy/ExtruderContainer.java @@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-public class ExtruderContainer extends ContainerBase {
+public class ExtruderContainer extends ContainerBase<ExtruderTileEntity> {
public ExtruderTileEntity tileEntity;
public int lastProgress = -1;
@@ -33,7 +33,7 @@ public class ExtruderContainer extends ContainerBase { }
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.input, 0, 39, 32));
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.input2, 0, 57, 32));
- this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.engine,0, 8, 32));
+ this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.dischargeSlot,0, 8, 32));
}
@Override
diff --git a/ihl/processing/metallurgy/ExtruderGui.java b/ihl/processing/metallurgy/ExtruderGui.java index 1c10b89..acf1a76 100644 --- a/ihl/processing/metallurgy/ExtruderGui.java +++ b/ihl/processing/metallurgy/ExtruderGui.java @@ -2,7 +2,6 @@ package ihl.processing.metallurgy; 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 ExtruderGui 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;
@@ -38,11 +34,6 @@ public class ExtruderGui extends GuiContainer { i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(18),18);
this.drawTexturedModalRect(74, 34, 198, 0, i1 + 1, 13);
}
- 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/metallurgy/ExtruderTileEntity.java b/ihl/processing/metallurgy/ExtruderTileEntity.java index de7a4c7..a654bfc 100644 --- a/ihl/processing/metallurgy/ExtruderTileEntity.java +++ b/ihl/processing/metallurgy/ExtruderTileEntity.java @@ -5,9 +5,7 @@ import java.util.List; import java.util.Map;
import ic2.core.ContainerBase;
-import ic2.core.IC2;
import ic2.core.block.invslot.InvSlot.Access;
-import ic2.core.network.NetworkManager;
import ihl.processing.chemistry.ApparatusProcessableInvSlot;
import ihl.recipes.UniversalRecipeInput;
import ihl.recipes.UniversalRecipeManager;
@@ -30,7 +28,6 @@ public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ public final ApparatusProcessableInvSlot input;
public final ApparatusProcessableInvSlot input2;
- public boolean hasEngine;
private int processTimer=0;
private FluidTank fluidTank = new FluidTank(1000);
protected static final UniversalRecipeManager recipeManager = new UniversalRecipeManager("extruder");
@@ -40,7 +37,6 @@ public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ super();
input = new ApparatusProcessableInvSlot(this, "input", 1, Access.IO, 1, 64);
input2 = new ApparatusProcessableInvSlot(this, "input2", 2, Access.IO, 1, 64);
- isGuiScreenOpened=true;
}
@@ -48,9 +44,7 @@ public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ @Override
public List<String> getNetworkedFields()
{
- List<String> fields = super.getNetworkedFields();
- fields.add("hasEngine");
- return fields;
+ return super.getNetworkedFields();
}
@@ -63,16 +57,6 @@ public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ public void updateEntityServer()
{
super.updateEntityServer();
- if(this.engine.isEmpty() && hasEngine==true)
- {
- this.hasEngine=false;
- IC2.network.get().updateTileEntityField(this, "hasEngine");
- }
- else if(this.engine.correctContent() && hasEngine==false)
- {
- this.hasEngine=true;
- IC2.network.get().updateTileEntityField(this, "hasEngine");
- }
ForgeDirection dir = ForgeDirection.getOrientation(getFacing());
TileEntity te = worldObj.getTileEntity(xCoord+dir.offsetX,yCoord+dir.offsetY,zCoord+dir.offsetZ);
if(checkCorrectAccembly() && this.fluidTank.getFluidAmount()>0 && this.processTimer++>20)
@@ -114,6 +98,7 @@ public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ return ExtruderTileEntity.recipeManager.getOutputFor(this.getInput(), false, false);
}
+ @SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public List[] getInput()
{
@@ -123,7 +108,7 @@ public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ @Override
public boolean canOperate()
{
- return this.fluidTank.getFluidAmount()<this.fluidTank.getCapacity() && this.engine.correctContent() && this.getOutput()!=null && checkCorrectAccembly();
+ return this.fluidTank.getFluidAmount()<this.fluidTank.getCapacity() && this.getOutput()!=null && checkCorrectAccembly();
}
private boolean checkCorrectAccembly()
@@ -153,7 +138,7 @@ public class ExtruderTileEntity extends BasicElectricMotorTileEntity{ public static void addRecipe(ItemStack input, ItemStack input2, FluidStack output)
{
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new ItemStack[] {input,input2})), new UniversalRecipeOutput(Arrays.asList(new FluidStack [] {output}),null,20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, new ItemStack[] {input,input2}), new UniversalRecipeOutput(new FluidStack [] {output},null,20));
}
diff --git a/ihl/processing/metallurgy/GasWeldingStationContainer.java b/ihl/processing/metallurgy/GasWeldingStationContainer.java index 2f9e160..e960edb 100644 --- a/ihl/processing/metallurgy/GasWeldingStationContainer.java +++ b/ihl/processing/metallurgy/GasWeldingStationContainer.java @@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class GasWeldingStationContainer extends ContainerBase {
+public class GasWeldingStationContainer extends ContainerBase<GasWeldingStationTileEntity> {
protected GasWeldingStationTileEntity tileEntity;
public short lastProgress2 = -1;
diff --git a/ihl/processing/metallurgy/GasWeldingStationGui.java b/ihl/processing/metallurgy/GasWeldingStationGui.java index 7a34fa6..6248159 100644 --- a/ihl/processing/metallurgy/GasWeldingStationGui.java +++ b/ihl/processing/metallurgy/GasWeldingStationGui.java @@ -8,7 +8,6 @@ import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.inventory.Slot;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
-import ic2.core.network.NetworkManager;
import ihl.utils.IHLRenderUtils;
@SideOnly(Side.CLIENT)
diff --git a/ihl/processing/metallurgy/GasWeldingStationTileEntity.java b/ihl/processing/metallurgy/GasWeldingStationTileEntity.java index 764b524..ff15f5a 100644 --- a/ihl/processing/metallurgy/GasWeldingStationTileEntity.java +++ b/ihl/processing/metallurgy/GasWeldingStationTileEntity.java @@ -127,57 +127,6 @@ public class GasWeldingStationTileEntity extends TileEntityInventory implements return "detonationSprayingMachine";
}
- 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
@SideOnly(Side.CLIENT)
public GuiScreen getGui(EntityPlayer player, boolean arg1) {
@@ -225,12 +174,12 @@ public class GasWeldingStationTileEntity extends TileEntityInventory implements public UniversalRecipeInput getInput()
{
- return new UniversalRecipeInput(Arrays.asList(new FluidStack[] {this.flammableGasTank.getLigthestFluid(), this.oxygenTank.getFluid()}), Arrays.asList(new ItemStack[]{this.input.get(0),this.input.get(1),this.input.get(2)}));
+ return new UniversalRecipeInput(new FluidStack[] {this.flammableGasTank.getLigthestFluid(), this.oxygenTank.getFluid()}, new ItemStack[]{this.input.get(0),this.input.get(1),this.input.get(2)});
}
public static void addGasRecipe(ItemStack input, FluidStack inputFluid, FluidStack output, FluidStack output2)
{
- acetyleneRecipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {inputFluid}), Arrays.asList(new ItemStack[] {input})), new UniversalRecipeOutput(Arrays.asList(new FluidStack [] {output, output2}),Arrays.asList(new ItemStack [] {}),20));
+ acetyleneRecipeManager.addRecipe(new UniversalRecipeInput(new FluidStack[] {inputFluid},new ItemStack[] {input}), new UniversalRecipeOutput(new FluidStack [] {output, output2},new ItemStack [] {}, 20));
}
public static Map<UniversalRecipeInput, UniversalRecipeOutput> getGasRecipes() {
diff --git a/ihl/processing/metallurgy/ImpregnatingMachineContainer.java b/ihl/processing/metallurgy/ImpregnatingMachineContainer.java index 4489af2..2a95dcb 100644 --- a/ihl/processing/metallurgy/ImpregnatingMachineContainer.java +++ b/ihl/processing/metallurgy/ImpregnatingMachineContainer.java @@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class ImpregnatingMachineContainer extends ContainerBase {
+public class ImpregnatingMachineContainer extends ContainerBase<ImpregnatingMachineTileEntity> {
protected ImpregnatingMachineTileEntity tileEntity;
public int lastFluidAmount = -1;
diff --git a/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java b/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java index 89a8a63..2ea5d2e 100644 --- a/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java +++ b/ihl/processing/metallurgy/ImpregnatingMachineTileEntity.java @@ -25,7 +25,6 @@ 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.interfaces.IHasTemperature;
import ihl.processing.chemistry.ApparatusProcessableInvSlot;
import ihl.processing.chemistry.ChemicalReactorTileEntity;
@@ -125,7 +124,6 @@ public class ImpregnatingMachineTileEntity extends TileEntityInventory implement }
temperature=(short) (this.fluidTank.getTemperature()-273);
IHLUtils.handleFluidSlotsBehaviour(fillInputSlot, drainInputSlot, emptyFluidItemsSlot, fluidTank);
- boolean needsInvUpdate = false;
if (this.canOperate())
{
this.setActive(true);
@@ -138,7 +136,6 @@ public class ImpregnatingMachineTileEntity extends TileEntityInventory implement if (this.progress >= this.operationLength)
{
this.operate();
- needsInvUpdate = true;
this.progress = 0;
IC2.network.get().initiateTileEntityEvent(this, 2, true);
}
@@ -181,57 +178,6 @@ public class ImpregnatingMachineTileEntity extends TileEntityInventory implement return "impregnatingMachine";
}
- 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.visibleFluidAmount/(float)this.fluidTank.getCapacity();
@@ -273,6 +219,7 @@ public class ImpregnatingMachineTileEntity extends TileEntityInventory implement return ImpregnatingMachineTileEntity.recipeManager.getOutputFor(this.getInput(), false, false);
}
+ @SuppressWarnings("rawtypes")
public List[] getInput()
{
for(int i=0;i<fluidTank.getNumberOfFluids();i++)
@@ -365,7 +312,7 @@ public class ImpregnatingMachineTileEntity extends TileEntityInventory implement public static void addQuenchingRecipe(String nameHot, String nameQuenched)
{
- addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {new FluidStack(FluidRegistry.WATER, 50)}), Arrays.asList(new ItemStack[] {IHLUtils.getThisModItemStack(nameHot)})), new UniversalRecipeOutput(null, Arrays.asList(new ItemStack[] {IHLUtils.getThisModItemStack(nameQuenched)}),2));
+ addRecipe(new UniversalRecipeInput((new FluidStack[] {new FluidStack(FluidRegistry.WATER, 50)}), (new ItemStack[] {IHLUtils.getThisModItemStack(nameHot)})), new UniversalRecipeOutput(null, (new ItemStack[] {IHLUtils.getThisModItemStack(nameQuenched)}),2));
}
public IHLFluidTank getFluidTank()
diff --git a/ihl/processing/metallurgy/InjectionMoldBlock.java b/ihl/processing/metallurgy/InjectionMoldBlock.java index 68a9ea9..1cd18d3 100644 --- a/ihl/processing/metallurgy/InjectionMoldBlock.java +++ b/ihl/processing/metallurgy/InjectionMoldBlock.java @@ -24,7 +24,6 @@ import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
-import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -34,8 +33,7 @@ public class InjectionMoldBlock extends Block implements ITileEntityProvider{ IIcon textureSide;
public static InjectionMoldBlock instance;
- public static int moldDamageForRecipe=0;
- public static String[] materials = new String[] {"Bronze","Steel","Gold","Magnesium", "Lithium", "TarPitch"};
+ public static String[] materials = new String[] {"Bronze","Steel","Gold","Magnesium", "Lithium", "TarPitch", "Potassium", "Sodium"};
public InjectionMoldBlock()
{
@@ -60,7 +58,8 @@ public class InjectionMoldBlock extends Block implements ITileEntityProvider{ }
- @Override
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ @Override
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList)
{
ItemStack result = new ItemStack(item);
@@ -183,7 +182,6 @@ public class InjectionMoldBlock extends Block implements ITileEntityProvider{ @SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int meta)
{
- IIcon sideIcon = this.blockIcon;
switch (side)
{
case 1:
@@ -225,29 +223,25 @@ public class InjectionMoldBlock extends Block implements ITileEntityProvider{ public static void registerRecipes(String result1,ItemStack stack1)
{
- if (Loader.isModLoaded("NotEnoughItems"))
+ for(int i=0;i<materials.length;i++)
{
- for(int i=0;i<materials.length;i++)
+ String material = InjectionMoldBlock.materials[i];
+ ItemStack stack = IHLUtils.getItemStackIfExist(result1+material);
+ if(stack!=null)
{
- String material = InjectionMoldBlock.materials[i];
- ItemStack stack = IHLUtils.getItemStackIfExist(result1+material);
- if(stack!=null)
+ material=material.toLowerCase(Locale.ROOT);
+ FluidStack fluidstack = IHLUtils.getFluidStackIfExist("molten."+material,Details.getMeltingFluidAmount(result1));
+ if(fluidstack!=null)
{
- material=material.toLowerCase(Locale.ROOT);
- FluidStack fluidstack = IHLUtils.getFluidStackIfExist("molten."+material,Details.getMeltingFluidAmount(result1));
- if(fluidstack!=null)
- {
- stack1.setItemDamage(++moldDamageForRecipe);
- InjectionMoldTileEntity.addRecipe(fluidstack,stack1,stack);
- //System.out.println("Recipe added for "+fluidstack.getLocalizedName() + " and "+ stack.getDisplayName());
- }
- else
- {
- //System.out.println("No such fluid: "+"molten."+material);
- }
+ // Cap hash to positive integer range.
+ stack1.setItemDamage(result1.hashCode() & Integer.MAX_VALUE);
+/* IHLMod.log.info("Setting damage for injection mold to: "
+ +result1.toLowerCase(Locale.ROOT).hashCode()
+ +" using hash code of "+result1
+ +" Result of lower case: "+result1.toLowerCase(Locale.ROOT));*/
+ InjectionMoldTileEntity.addRecipe(fluidstack,stack1,stack);
}
}
-
}
}
diff --git a/ihl/processing/metallurgy/InjectionMoldTileEntity.java b/ihl/processing/metallurgy/InjectionMoldTileEntity.java index ce3f339..e87acd8 100644 --- a/ihl/processing/metallurgy/InjectionMoldTileEntity.java +++ b/ihl/processing/metallurgy/InjectionMoldTileEntity.java @@ -2,6 +2,7 @@ package ihl.processing.metallurgy; import java.util.ArrayList;
import java.util.Arrays;
+import java.util.List;
import java.util.Map;
import net.minecraft.entity.item.EntityItem;
@@ -41,7 +42,7 @@ public class InjectionMoldTileEntity extends TileEntity implements IFluidHandler public static void addRecipe(FluidStack input, ItemStack input1, ItemStack output)
{
- recipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {input}),Arrays.asList(new ItemStack[] {input1})), new UniversalRecipeOutput(null,Arrays.asList(new ItemStack[]{output}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput((new FluidStack[] {input}),(new ItemStack[] {input1})), new UniversalRecipeOutput(null,(new ItemStack[]{output}),20));
}
@Override
@@ -66,7 +67,7 @@ public class InjectionMoldTileEntity extends TileEntity implements IFluidHandler {
return IC2.platform.isSimulating();
}
-
+
@Override
public void updateEntity()
{
@@ -78,13 +79,30 @@ public class InjectionMoldTileEntity extends TileEntity implements IFluidHandler if(formattedFluidName!="")
{
int fluidAmountPerItem = Details.getMeltingFluidAmount(this.resultSuffix);
- int fluidAmountPerItem2 = Details.getMeltingFluidAmount("nugget");
ArrayList<ItemStack> resultList = OreDictionary.getOres(this.resultSuffix+formattedFluidName);
- if(resultList.isEmpty())
+ if(resultList.isEmpty() || fluidAmountPerItem<=0)
{
- resultList=new ArrayList();
- if(IHLUtils.getItemStackIfExist(this.resultSuffix+formattedFluidName)!=null)resultList.add(IHLUtils.getItemStackIfExist(this.resultSuffix+formattedFluidName));
+// IHLMod.log.info("Injection mold: resultList.isEmpty() || fluidAmountPerItem<=0");
+ resultList=new ArrayList<ItemStack>();
+ List<FluidStack> fi = Arrays.asList(new FluidStack[] {this.fluidTank.getFluid()});
+ List<ItemStack> ii = Arrays.asList(new ItemStack[] {IHLUtils.getThisModItemStackWithDamage("injectionMold", this.resultSuffix.hashCode() & Integer.MAX_VALUE)});
+ UniversalRecipeOutput ro = recipeManager.getOutputFor(fi, ii, false, false);
+ if(ro!=null)
+ {
+ // IHLMod.log.info("Injection mold: ro not null");
+ ItemStack stack = ro.getItemOutputs().get(0).itemStack.copy();
+ stack.stackSize=Math.round(ro.getItemOutputs().get(0).quantity);
+ resultList.add(stack);
+ UniversalRecipeInput ri = recipeManager.getRecipeInput(fi, ii);
+ fluidAmountPerItem = ri.getFluidInputs().get(0).getAmount();
+ // IHLMod.log.info("fluidAmountPerItem="+fluidAmountPerItem);
+ }
+ else
+ {
+ // IHLMod.log.info("Injection mold: ro is null. Input stack: "+ii.get(0).toString());
+ }
}
+ int fluidAmountPerItem2 = Details.getMeltingFluidAmount("nugget");
ArrayList<ItemStack> resultList2 = OreDictionary.getOres("nugget"+formattedFluidName);
if(!resultList.isEmpty())
{
@@ -132,10 +150,6 @@ public class InjectionMoldTileEntity extends TileEntity implements IFluidHandler private String getFormattedMaterialName(String input)
{
- if(input.length()<8)
- {
- return "";
- }
String input2 = input.replace("molten.", "").replace(".molten", "");
String firstletter = String.valueOf(input2.charAt(0)).toUpperCase();
input2 = input2.replaceFirst(".", firstletter);
diff --git a/ihl/processing/metallurgy/LatheContainer.java b/ihl/processing/metallurgy/LatheContainer.java index c863f7b..5e79a2a 100644 --- a/ihl/processing/metallurgy/LatheContainer.java +++ b/ihl/processing/metallurgy/LatheContainer.java @@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-public class LatheContainer extends ContainerBase {
+public class LatheContainer extends ContainerBase<LathePart1TileEntity> {
public LathePart1TileEntity tileEntity;
public int lastProgress = -1;
@@ -30,7 +30,7 @@ public class LatheContainer extends ContainerBase { {
this.addSlotToContainer(new Slot(entityPlayer.inventory, col, 8 + col * 18, height + -24));
}
- this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.engine,0, 22, 55));
+ this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.dischargeSlot,0, 22, 55));
}
@Override
diff --git a/ihl/processing/metallurgy/LatheGui.java b/ihl/processing/metallurgy/LatheGui.java index e09f414..16f64c5 100644 --- a/ihl/processing/metallurgy/LatheGui.java +++ b/ihl/processing/metallurgy/LatheGui.java @@ -2,7 +2,6 @@ package ihl.processing.metallurgy; import org.lwjgl.opengl.GL11;
-import ihl.utils.IHLRenderUtils;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
@@ -20,9 +19,6 @@ public class LatheGui 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);
fontRendererObj.drawString(StatCollector.translateToLocal("ihl.gui.lathe"), 50, 10, 14722081);
this.mc.renderEngine.bindTexture(tex);
@@ -40,11 +36,6 @@ public class LatheGui extends GuiContainer { i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(50),50);
this.drawTexturedModalRect(64, 63, 197, 0, i1 + 1, 13);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(tex);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 47, 56, xOffset, yOffset);
- }
}
@Override
diff --git a/ihl/processing/metallurgy/LathePart1TileEntity.java b/ihl/processing/metallurgy/LathePart1TileEntity.java index 9241ba1..ddf834b 100644 --- a/ihl/processing/metallurgy/LathePart1TileEntity.java +++ b/ihl/processing/metallurgy/LathePart1TileEntity.java @@ -19,7 +19,6 @@ public class LathePart1TileEntity extends BasicElectricMotorTileEntity implement public LathePart1TileEntity()
{
super();
- this.isGuiScreenOpened=true;
}
@@ -52,6 +51,7 @@ public class LathePart1TileEntity extends BasicElectricMotorTileEntity implement }
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public List[] getInput()
{
diff --git a/ihl/processing/metallurgy/LathePart2TileEntity.java b/ihl/processing/metallurgy/LathePart2TileEntity.java index 4543afa..7d4dac7 100644 --- a/ihl/processing/metallurgy/LathePart2TileEntity.java +++ b/ihl/processing/metallurgy/LathePart2TileEntity.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;
diff --git a/ihl/processing/metallurgy/MachineBaseTileEntity.java b/ihl/processing/metallurgy/MachineBaseTileEntity.java index 51df187..de20f5a 100644 --- a/ihl/processing/metallurgy/MachineBaseTileEntity.java +++ b/ihl/processing/metallurgy/MachineBaseTileEntity.java @@ -6,10 +6,8 @@ import ic2.api.energy.tile.IEnergySink; import ic2.core.ContainerBase;
import ic2.core.IC2;
import ic2.core.IHasGui;
-import ic2.core.audio.AudioSource;
import ic2.core.block.TileEntityInventory;
import ic2.core.block.invslot.InvSlot.Access;
-import ic2.core.network.NetworkManager;
import ihl.processing.chemistry.ApparatusProcessableInvSlot;
import ihl.recipes.UniversalRecipeOutput;
import java.util.List;
@@ -26,9 +24,6 @@ public abstract class MachineBaseTileEntity extends TileEntityInventory implemen {
public short progress;
protected short operationLength=200;
- private AudioSource startAS;
- private AudioSource loopAS;
- private AudioSource stopAS;
protected double energy;
public int maxStorage;
public int energyConsume;
@@ -222,6 +217,7 @@ public abstract class MachineBaseTileEntity extends TileEntityInventory implemen public abstract UniversalRecipeOutput getOutput();
+ @SuppressWarnings("rawtypes")
public List[] getInput()
{
return new List[]{null, this.input.getItemStackList()};
diff --git a/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java b/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java index 73d12de..c5a54c7 100644 --- a/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java +++ b/ihl/processing/metallurgy/MuffleFurnanceTileEntity.java @@ -110,7 +110,7 @@ public class MuffleFurnanceTileEntity extends MachineBaseTileEntity{ public static void addRecipe(ItemStack input1, ItemStack output)
{
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new ItemStack [] {input1})),new UniversalRecipeOutput(null, Arrays.asList(new ItemStack [] {output}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, (new ItemStack [] {input1})),new UniversalRecipeOutput(null, (new ItemStack [] {output}),20));
}
@@ -130,6 +130,6 @@ public class MuffleFurnanceTileEntity extends MachineBaseTileEntity{ }
public static void addRecipe(ItemStack input1, ItemStack output, float f) {
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new ItemStack [] {input1})),new UniversalRecipeOutput(null, Arrays.asList(new RecipeOutputItemStack [] {new RecipeOutputItemStack(output,f)}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, (new ItemStack [] {input1})),new UniversalRecipeOutput(null, (new RecipeOutputItemStack [] {new RecipeOutputItemStack(output,f)}),20));
}
}
diff --git a/ihl/processing/metallurgy/RollingMachineContainer.java b/ihl/processing/metallurgy/RollingMachineContainer.java index c3bdb31..7a83d9d 100644 --- a/ihl/processing/metallurgy/RollingMachineContainer.java +++ b/ihl/processing/metallurgy/RollingMachineContainer.java @@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-public class RollingMachineContainer extends ContainerBase {
+public class RollingMachineContainer extends ContainerBase<RollingMachinePart1TileEntity> {
public RollingMachinePart1TileEntity tileEntity;
public int lastProgress = -1;
@@ -33,7 +33,7 @@ public class RollingMachineContainer extends ContainerBase { }
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.input, 0, 54, 25));
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.output, 0, 105, 25));
- this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.engine,0, 22, 55));
+ this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.dischargeSlot,0, 22, 55));
}
@Override
diff --git a/ihl/processing/metallurgy/RollingMachineGui.java b/ihl/processing/metallurgy/RollingMachineGui.java index 16ccdac..a792bd3 100644 --- a/ihl/processing/metallurgy/RollingMachineGui.java +++ b/ihl/processing/metallurgy/RollingMachineGui.java @@ -2,7 +2,6 @@ package ihl.processing.metallurgy; 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 RollingMachineGui 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 RollingMachineGui extends GuiContainer { i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(50),50);
this.drawTexturedModalRect(64, 63, 197, 0, i1 + 1, 13);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(tex);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 47, 56, xOffset, yOffset);
- }
}
@Override
diff --git a/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java b/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java index 9c02a47..a3d6ae6 100644 --- a/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java +++ b/ihl/processing/metallurgy/RollingMachinePart1TileEntity.java @@ -7,7 +7,6 @@ import java.util.Map; import ic2.core.ContainerBase;
import ic2.core.IC2;
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.RecipeOutputItemStack;
@@ -27,7 +26,6 @@ public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ public final ApparatusProcessableInvSlot input;
public final IHLInvSlotOutput output;
- public boolean hasEngine;
public boolean assembled;
protected static final UniversalRecipeManager recipeManager = new UniversalRecipeManager("rollingmachine");
@@ -36,7 +34,6 @@ public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ super();
input = new ApparatusProcessableInvSlot(this, "input", 1, Access.IO, 1, 64);
output = new IHLInvSlotOutput(this, "output", 2, 1);
- isGuiScreenOpened=true;
}
public UniversalRecipeOutput getOutput()
@@ -49,7 +46,6 @@ public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ {
List<String> fields = super.getNetworkedFields();
fields.add("assembled");
- fields.add("hasEngine");
return fields;
}
@@ -73,17 +69,6 @@ public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ assembled=true;
IC2.network.get().updateTileEntityField(this, "assembled");
}
- if(this.engine.isEmpty() && hasEngine==true)
- {
- this.hasEngine=false;
- IC2.network.get().updateTileEntityField(this, "hasEngine");
- }
- else if(this.engine.correctContent() && hasEngine==false)
- {
- this.hasEngine=true;
- IC2.network.get().updateTileEntityField(this, "hasEngine");
- }
-
if (this.getActive() && this.progress == 0 && !this.canOperate())
{
this.setActive(false);
@@ -121,6 +106,7 @@ public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ this.input.consume(0, 1);
}
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public List[] getInput()
{
@@ -130,7 +116,7 @@ public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ @Override
public boolean canOperate()
{
- return this.engine.correctContent() && this.getOutput()!=null && this.output.canAdd(this.getOutput().getItemOutputs()) && checkCorrectAccembly();
+ return this.getOutput()!=null && this.output.canAdd(this.getOutput().getItemOutputs()) && checkCorrectAccembly();
}
private boolean checkCorrectAccembly()
@@ -144,7 +130,7 @@ public class RollingMachinePart1TileEntity extends BasicElectricMotorTileEntity{ 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));
}
diff --git a/ihl/processing/metallurgy/RollingMachinePart2TileEntity.java b/ihl/processing/metallurgy/RollingMachinePart2TileEntity.java index 6bab8c4..13f4f6c 100644 --- a/ihl/processing/metallurgy/RollingMachinePart2TileEntity.java +++ b/ihl/processing/metallurgy/RollingMachinePart2TileEntity.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;
diff --git a/ihl/processing/metallurgy/RollingMachineRender.java b/ihl/processing/metallurgy/RollingMachineRender.java index ee8b567..1990769 100644 --- a/ihl/processing/metallurgy/RollingMachineRender.java +++ b/ihl/processing/metallurgy/RollingMachineRender.java @@ -72,11 +72,8 @@ private final float scale=1F/16F; model.RotatingPart1.render(scale);
model.RotatingPart2.render(scale);
}
- if(cte.hasEngine)
- {
- model.MotorPart1.render(scale);
- model.MotorPart2.render(scale);
- }
+ model.MotorPart1.render(scale);
+ model.MotorPart2.render(scale);
}
GL11.glPopMatrix(); //end
diff --git a/ihl/processing/metallurgy/VacuumInductionMeltingFurnaceGui.java b/ihl/processing/metallurgy/VacuumInductionMeltingFurnaceGui.java index 8b9ea9e..2f22a4d 100644 --- a/ihl/processing/metallurgy/VacuumInductionMeltingFurnaceGui.java +++ b/ihl/processing/metallurgy/VacuumInductionMeltingFurnaceGui.java @@ -1,7 +1,6 @@ package ihl.processing.metallurgy;
import ic2.core.IC2;
-import ic2.core.network.NetworkManager;
import ihl.collector.GuiMultiTextureButton;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
@@ -22,6 +21,7 @@ public class VacuumInductionMeltingFurnaceGui extends GuiContainer { this.container=vacuumInductionMeltingFurnaceContainer;
}
+ @SuppressWarnings("unchecked")
@Override
public void initGui()
{
@@ -46,8 +46,6 @@ public class VacuumInductionMeltingFurnaceGui 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);
fontRendererObj.drawString(StatCollector.translateToLocal("ihl.gui.muffleFurnace"), 40, 12, 14722081);
this.mc.renderEngine.bindTexture(background);
diff --git a/ihl/processing/metallurgy/VacuumInductionMeltingFurnaceTileEntity.java b/ihl/processing/metallurgy/VacuumInductionMeltingFurnaceTileEntity.java index 3fc85a8..e2867bc 100644 --- a/ihl/processing/metallurgy/VacuumInductionMeltingFurnaceTileEntity.java +++ b/ihl/processing/metallurgy/VacuumInductionMeltingFurnaceTileEntity.java @@ -4,14 +4,13 @@ import java.util.Arrays; import java.util.Map;
import ic2.api.network.INetworkClientTileEntityEventListener;
+import ic2.api.recipe.IRecipeInput;
+import ic2.api.recipe.RecipeInputOreDict;
import ic2.core.ContainerBase;
-import ihl.IHLMod;
import ihl.processing.chemistry.GaedesMercuryRotaryPumpTileEntity;
import ihl.recipes.UniversalRecipeInput;
import ihl.recipes.UniversalRecipeManager;
import ihl.recipes.UniversalRecipeOutput;
-import ihl.tunneling_shield.IMultiBlock;
-import ihl.tunneling_shield.MultiBlockSpacerBlock;
import ihl.utils.IHLFluidTank;
import ihl.utils.IHLUtils;
import net.minecraft.client.gui.GuiScreen;
@@ -24,13 +23,12 @@ import net.minecraftforge.fluids.FluidStack; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-public class VacuumInductionMeltingFurnaceTileEntity extends MachineBaseTileEntity implements INetworkClientTileEntityEventListener, IMultiBlock{
+public class VacuumInductionMeltingFurnaceTileEntity extends MachineBaseTileEntity implements INetworkClientTileEntityEventListener{
protected static UniversalRecipeManager recipeManager = new UniversalRecipeManager("vacuuminductionmeltingfurnace");
public final IHLFluidTank fluidTank = new IHLFluidTank(864);
public boolean vacuumPumpConnected=false;
private GaedesMercuryRotaryPumpTileEntity lastGMRP;
- private int minX,minY,minZ,maxX,maxY,maxZ;
public VacuumInductionMeltingFurnaceTileEntity()
{
@@ -42,27 +40,6 @@ public class VacuumInductionMeltingFurnaceTileEntity extends MachineBaseTileEnti {
short facing2 = (short) Math.max(facing1, 2);
super.setFacing(facing2);
- switch(facing2)
- {
- case 0:
- setupMultiblockStructure(-1,-2,0);
- break;
- case 1:
- setupMultiblockStructure(-1,0,0);
- break;
- case 2:
- setupMultiblockStructure(-1,0,-2);
- break;
- case 3:
- setupMultiblockStructure(-1,0,0);
- break;
- case 4:
- setupMultiblockStructure(-2,0,-1);
- break;
- case 5:
- setupMultiblockStructure(0,0,-1);
- break;
- }
}
@Override
@@ -159,9 +136,9 @@ public class VacuumInductionMeltingFurnaceTileEntity extends MachineBaseTileEnti return IHLUtils.getThisModItemStack("vacuumInductionMeltingFurnace");
}
- public static void addRecipe(ItemStack input, FluidStack output)
+ public static void addRecipe(String input, int amount, String input2, int amount2, FluidStack output)
{
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new ItemStack [] {input})),new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {output}),null,20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, (new IRecipeInput [] {new RecipeInputOreDict(input,amount),new RecipeInputOreDict(input2,amount2)})),new UniversalRecipeOutput((new FluidStack[] {output}),null,20));
}
@@ -220,41 +197,4 @@ public class VacuumInductionMeltingFurnaceTileEntity extends MachineBaseTileEnti this.fluidTank.writeToNBT(fluidTankTag);
nbttagcompound.setTag("fluidTank", fluidTankTag);
}
-
- private void setupMultiblockStructure(int x0,int y0,int z0)
- {
- minX=xCoord+x0;
- maxX=xCoord+x0+3;
- minY=yCoord+y0;
- maxY=yCoord+y0+3;
- minZ=zCoord+z0;
- maxZ=zCoord+z0+3;
- for(int ix=xCoord+x0;ix<xCoord+x0+3;ix++)
- {
- for(int iy=yCoord+y0;iy<yCoord+y0+3;iy++)
- {
- for(int iz=zCoord+z0;iz<zCoord+z0+3;iz++)
- {
- if(!(worldObj.getTileEntity(ix, iy, iz) instanceof VacuumInductionMeltingFurnaceTileEntity))
- {
- worldObj.setBlock(ix, iy, iz, IHLMod.multiBlockSpacerBlock);
- }
- }
- }
- }
- MultiBlockSpacerBlock.teList.add(this);
- }
-
- @Override
- public boolean isAPartOfStructure(int x, int y, int z, boolean onBlockBeak)
- {
- return x>=minX && x<=maxX && y>=minY && y<=maxY && z>=minZ && z<=maxZ;
- }
-
- @Override
- public boolean getIsInvalid()
- {
- return this.isInvalid();
- }
-
}
diff --git a/ihl/processing/metallurgy/VulcanizationExtrudingMoldTileEntity.java b/ihl/processing/metallurgy/VulcanizationExtrudingMoldTileEntity.java index 6feca57..40d44e4 100644 --- a/ihl/processing/metallurgy/VulcanizationExtrudingMoldTileEntity.java +++ b/ihl/processing/metallurgy/VulcanizationExtrudingMoldTileEntity.java @@ -11,7 +11,6 @@ import ic2.api.energy.tile.IEnergySink; import ic2.api.network.INetworkDataProvider;
import ic2.api.tile.IWrenchable;
import ic2.core.IC2;
-import ic2.core.network.NetworkManager;
import ihl.items_blocks.FlexibleCableItem;
import ihl.recipes.UniversalRecipeInput;
import ihl.recipes.UniversalRecipeManager;
@@ -47,7 +46,7 @@ public class VulcanizationExtrudingMoldTileEntity extends TileEntity implements public static void addRecipe(FluidStack inputFluid,ItemStack input,ItemStack output1)
{
- recipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new FluidStack[] {inputFluid}),Arrays.asList(new ItemStack[] {input})),new UniversalRecipeOutput(null,Arrays.asList(new ItemStack[] {output1}),200));
+ recipeManager.addRecipe(new UniversalRecipeInput((new FluidStack[] {inputFluid}),(new ItemStack[] {input})),new UniversalRecipeOutput(null,(new ItemStack[] {output1}),200));
}
public boolean enableUpdateEntity()
diff --git a/ihl/processing/metallurgy/WireMillContainer.java b/ihl/processing/metallurgy/WireMillContainer.java index ec1ddc0..34f79de 100644 --- a/ihl/processing/metallurgy/WireMillContainer.java +++ b/ihl/processing/metallurgy/WireMillContainer.java @@ -10,7 +10,7 @@ import net.minecraft.inventory.ICrafting; import net.minecraft.inventory.Slot;
import net.minecraftforge.fluids.FluidStack;
-public class WireMillContainer extends ContainerBase {
+public class WireMillContainer extends ContainerBase<WireMillTileEntity> {
public WireMillTileEntity tileEntity;
public int lastProgress = -1;
@@ -51,7 +51,7 @@ public class WireMillContainer extends ContainerBase { this.addSlotToContainer(new SlotInvSlot(tileEntity.drainInputSlot, 0, 26+18, 14));
this.addSlotToContainer(new SlotInvSlot(tileEntity.fillInputSlot, 0, 26+18, 50));
this.addSlotToContainer(new SlotInvSlot(tileEntity.emptyFluidItemsSlot, 0, 26+18, 32));
- this.addSlotToContainer(new SlotInvSlot(tileEntity.engine,0, 8, 14));
+ this.addSlotToContainer(new SlotInvSlot(tileEntity.dischargeSlot,0, 8, 14));
}
@Override
diff --git a/ihl/processing/metallurgy/WireMillGui.java b/ihl/processing/metallurgy/WireMillGui.java index e09b4ab..8a3d583 100644 --- a/ihl/processing/metallurgy/WireMillGui.java +++ b/ihl/processing/metallurgy/WireMillGui.java @@ -52,10 +52,6 @@ public class WireMillGui extends GuiContainer { }
this.mc.renderEngine.bindTexture(tex);
- if(!this.container.tileEntity.engine.correctContent())
- {
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 25, 14, xOffset, yOffset);
- }
IHLRenderUtils.instance.drawTooltip(par1,par2,9,11,xOffset,yOffset,StatCollector.translateToLocal("ihl.wiremill.tip"));
}
diff --git a/ihl/processing/metallurgy/WireMillTileEntity.java b/ihl/processing/metallurgy/WireMillTileEntity.java index 16eaa4b..4216960 100644 --- a/ihl/processing/metallurgy/WireMillTileEntity.java +++ b/ihl/processing/metallurgy/WireMillTileEntity.java @@ -4,17 +4,13 @@ import java.util.Arrays; import java.util.List;
import java.util.Map;
-import org.apache.commons.lang3.mutable.MutableObject;
-
import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeInputOreDict;
import ic2.core.ContainerBase;
import ic2.core.block.invslot.InvSlot;
-import ic2.core.block.invslot.InvSlotConsumableItemStack;
import ic2.core.block.invslot.InvSlotConsumableLiquid;
import ic2.core.block.invslot.InvSlotOutput;
import ic2.core.block.invslot.InvSlot.Access;
-import ic2.core.block.invslot.InvSlot.InvSide;
import ihl.IHLMod;
import ihl.items_blocks.IHLTool;
import ihl.processing.chemistry.ApparatusProcessableInvSlot;
@@ -23,7 +19,6 @@ import ihl.recipes.IRecipeInputFluid; import ihl.recipes.RecipeInputDie;
import ihl.recipes.RecipeInputFluidDictionary;
import ihl.recipes.RecipeInputFluidStack;
-import ihl.recipes.RecipeOutputItemStack;
import ihl.recipes.UniversalRecipeInput;
import ihl.recipes.UniversalRecipeManager;
import ihl.recipes.UniversalRecipeOutput;
@@ -36,7 +31,6 @@ 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.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.FluidTankInfo;
import net.minecraftforge.fluids.IFluidHandler;
@@ -62,7 +56,6 @@ public class WireMillTileEntity extends BasicElectricMotorTileEntity implements fillInputSlot = new InvSlotConsumableLiquidIHL(this, "fillInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Fill);
drainInputSlot = new InvSlotConsumableLiquidIHL(this, "drainInput", -1, InvSlot.Access.I, 1, InvSlot.InvSide.BOTTOM, InvSlotConsumableLiquid.OpType.Drain, "ingot");
dice = new ApparatusProcessableInvSlot(this, "dice", 3, Access.IO, 1, 64);
- this.isGuiScreenOpened=true;
this.operationLength=600;
}
@@ -142,7 +135,6 @@ public class WireMillTileEntity extends BasicElectricMotorTileEntity implements {
this.metalFluidTank.fill(rOutput.getFluidOutputs().get(0), true);
}
- ForgeDirection dir = ForgeDirection.getOrientation(getFacing()).getRotation(ForgeDirection.DOWN);
TileEntity te = worldObj.getTileEntity(xCoord+ForgeDirection.getOrientation(getFacing()).offsetX,yCoord+ForgeDirection.getOrientation(getFacing()).offsetY,zCoord+ForgeDirection.getOrientation(getFacing()).offsetZ);
if(rOutputItemStack!=null && te instanceof IProductionLine)
{
@@ -156,6 +148,7 @@ public class WireMillTileEntity extends BasicElectricMotorTileEntity implements }
}
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public List[] getInput()
{
@@ -169,12 +162,12 @@ public class WireMillTileEntity extends BasicElectricMotorTileEntity implements public static void addRecipe(FluidStack moltenMetal, IRecipeInput inputDice,ItemStack output1)
{
- recipeManager.addRecipe(new UniversalRecipeInput(Arrays.asList(new IRecipeInputFluid[] {new RecipeInputFluidDictionary("lubricant", 1),new RecipeInputFluidDictionary("water", 1),new RecipeInputFluidStack(moltenMetal)}),Arrays.asList(new IRecipeInput[] {inputDice})),new UniversalRecipeOutput(null,Arrays.asList(new ItemStack[] {output1}),200));
+ recipeManager.addRecipe(new UniversalRecipeInput((new IRecipeInputFluid[] {new RecipeInputFluidDictionary("lubricant", 1),new RecipeInputFluidDictionary("water", 1),new RecipeInputFluidStack(moltenMetal)}),(new IRecipeInput[] {inputDice})),new UniversalRecipeOutput(null,(new ItemStack[] {output1}),200));
}
public static void addRecipe(String string, FluidStack fluidStack)
{
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new IRecipeInput [] {new RecipeInputOreDict(string)})),new UniversalRecipeOutput(Arrays.asList(new FluidStack[] {fluidStack}),null,200));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, (new IRecipeInput [] {new RecipeInputOreDict(string)})),new UniversalRecipeOutput((new FluidStack[] {fluidStack}),null,200));
}
diff --git a/ihl/processing/metallurgy/WoodenRollingMachineContainer.java b/ihl/processing/metallurgy/WoodenRollingMachineContainer.java index 100da1b..ba191f8 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachineContainer.java +++ b/ihl/processing/metallurgy/WoodenRollingMachineContainer.java @@ -6,7 +6,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
-public class WoodenRollingMachineContainer extends ContainerBase {
+public class WoodenRollingMachineContainer extends ContainerBase<WoodenRollingMachinePart1TileEntity> {
public WoodenRollingMachinePart1TileEntity tileEntity;
public int lastProgress = -1;
@@ -35,7 +35,7 @@ public class WoodenRollingMachineContainer extends ContainerBase { this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.input, 0, 123, 15));
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.input, 1, 123, 34));
this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.input, 2, 123, 53));
- this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.engine,0, 22, 55));
+ this.addSlotToContainer(new SlotInvSlot(lathePart1TileEntity.dischargeSlot,0, 22, 55));
}
@Override
diff --git a/ihl/processing/metallurgy/WoodenRollingMachineGui.java b/ihl/processing/metallurgy/WoodenRollingMachineGui.java index d7b3456..085dae5 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachineGui.java +++ b/ihl/processing/metallurgy/WoodenRollingMachineGui.java @@ -2,7 +2,6 @@ package ihl.processing.metallurgy; 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 WoodenRollingMachineGui 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 WoodenRollingMachineGui extends GuiContainer { i1 = Math.min(this.container.tileEntity.gaugeProgressScaled(27),27);
this.drawTexturedModalRect(18, 22, getFrameX(i1), getFrameY(i1),24,24);
}
- if(!this.container.tileEntity.engine.correctContent())
- {
- this.mc.renderEngine.bindTexture(tex);
- IHLRenderUtils.instance.drawMissingEngineTooltip(this, par1, par2, 47, 56, xOffset, yOffset);
- }
}
@Override
diff --git a/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java b/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java index eb40389..31b6386 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java +++ b/ihl/processing/metallurgy/WoodenRollingMachinePart1TileEntity.java @@ -1,6 +1,5 @@ package ihl.processing.metallurgy;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -8,7 +7,6 @@ import ic2.api.recipe.IRecipeInput; import ic2.core.ContainerBase;
import ic2.core.IC2;
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.RecipeOutputItemStack;
@@ -28,7 +26,6 @@ public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileE public final ApparatusProcessableInvSlot input;
public final IHLInvSlotOutput output;
- public boolean hasEngine;
public boolean assembled;
protected static final UniversalRecipeManager recipeManager = new UniversalRecipeManager("woodenrollingmachine");
@@ -37,7 +34,6 @@ public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileE super();
input = new ApparatusProcessableInvSlot(this, "input", 1, Access.IO, 3, 64);
output = new IHLInvSlotOutput(this, "output", 2, 1);
- isGuiScreenOpened=true;
}
public UniversalRecipeOutput getOutput()
@@ -50,7 +46,6 @@ public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileE {
List<String> fields = super.getNetworkedFields();
fields.add("assembled");
- fields.add("hasEngine");
return fields;
}
@@ -74,17 +69,6 @@ public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileE assembled=true;
IC2.network.get().updateTileEntityField(this, "assembled");
}
- if(this.engine.isEmpty() && hasEngine==true)
- {
- this.hasEngine=false;
- IC2.network.get().updateTileEntityField(this, "hasEngine");
- }
- else if(this.engine.correctContent() && hasEngine==false)
- {
- this.hasEngine=true;
- IC2.network.get().updateTileEntityField(this, "hasEngine");
- }
-
if (this.getActive() && this.progress == 0 && !this.canOperate())
{
this.setActive(false);
@@ -126,6 +110,7 @@ public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileE }
}
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public List[] getInput()
{
@@ -135,7 +120,7 @@ public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileE @Override
public boolean canOperate()
{
- return this.engine.correctContent() && this.getOutput()!=null && this.output.canAdd(this.getOutput().getItemOutputs()) && checkCorrectAccembly();
+ return this.getOutput()!=null && this.output.canAdd(this.getOutput().getItemOutputs()) && checkCorrectAccembly();
}
private boolean checkCorrectAccembly()
@@ -149,7 +134,7 @@ public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileE public static void addRecipe(ItemStack input, ItemStack input2, ItemStack input3, ItemStack output)
{
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new ItemStack[] {input,input2,input3})), new UniversalRecipeOutput(null,Arrays.asList(new ItemStack[] {output}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, (new ItemStack[] {input,input2,input3})), new UniversalRecipeOutput(null,(new ItemStack[] {output}),20));
}
@@ -159,7 +144,7 @@ public class WoodenRollingMachinePart1TileEntity extends BasicElectricMotorTileE public static void addRecipe(ItemStack input, ItemStack input3, ItemStack output)
{
- recipeManager.addRecipe(new UniversalRecipeInput(null, Arrays.asList(new ItemStack[] {input,input3})), new UniversalRecipeOutput(null,Arrays.asList(new ItemStack[] {output}),20));
+ recipeManager.addRecipe(new UniversalRecipeInput(null, (new ItemStack[] {input,input3})), new UniversalRecipeOutput(null,(new ItemStack[] {output}),20));
}
@Override
diff --git a/ihl/processing/metallurgy/WoodenRollingMachinePart2TileEntity.java b/ihl/processing/metallurgy/WoodenRollingMachinePart2TileEntity.java index 165d84b..9aec41b 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachinePart2TileEntity.java +++ b/ihl/processing/metallurgy/WoodenRollingMachinePart2TileEntity.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;
diff --git a/ihl/processing/metallurgy/WoodenRollingMachineRender.java b/ihl/processing/metallurgy/WoodenRollingMachineRender.java index 84fbcd6..f5fd12a 100644 --- a/ihl/processing/metallurgy/WoodenRollingMachineRender.java +++ b/ihl/processing/metallurgy/WoodenRollingMachineRender.java @@ -80,13 +80,10 @@ private final float scale=1F/16F; model.RotatingPart3.render(scale);
model.RotatingPart4.render(scale);
}
- if(cte.hasEngine)
- {
- model.MotorPart1.render(scale);
- model.MotorPart2.render(scale);
- model.Belt1.render(scale);
- model.Belt2.render(scale);
- }
+ model.MotorPart1.render(scale);
+ model.MotorPart2.render(scale);
+ model.Belt1.render(scale);
+ model.Belt2.render(scale);
}
GL11.glPopMatrix(); //end
|
