This commit is contained in:
Gig 2015-06-14 19:41:45 +01:00
commit f5e0e4bd87
17 changed files with 148 additions and 46 deletions

View file

@ -40,12 +40,12 @@ public class GuiAlloySmelter extends GuiContainer {
int j = 0; int j = 0;
if(alloysmelter.crafter.currentTickTime != 0) { j = alloysmelter.getProgressScaled(24);
j = this.alloysmelter.crafter.currentTickTime * 24 / this.alloysmelter.crafter.currentNeededTicks; if(j > 0) {
} this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16); }
j = (int)this.alloysmelter.energy.getEnergyStored() * 12 / this.alloysmelter.energy.getCapacity(); j = alloysmelter.getEnergyScaled(12);
if(j > 0) { if(j > 0) {
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2); this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
} }

View file

@ -42,14 +42,14 @@ public class GuiAssemblingMachine extends GuiContainer {
int j = 0; int j = 0;
if(this.assemblingmachine.crafter.currentTickTime != 0){ j = assemblingmachine.getProgressScaled(20);
j = this.assemblingmachine.crafter.currentTickTime * 20 / this.assemblingmachine.crafter.currentNeededTicks;
}
this.drawTexturedModalRect(k + 86, l + 34, 176, 14, j + 1, 16);
j = (int) (this.assemblingmachine.energy.getEnergyStored() * 12 / this.assemblingmachine.energy.getCapacity());
if(j > 0) { if(j > 0) {
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2); this.drawTexturedModalRect(k + 86, l + 34, 176, 14, j + 1, 16);
}
j = assemblingmachine.getEnergyScaled(12);
if(j > 0) {
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
} }
} }

View file

@ -40,15 +40,15 @@ public class GuiCentrifuge extends GuiContainer {
int j = 0; int j = 0;
if(centrifuge.crafter.currentRecipe != null) { j = centrifuge.getProgressScaled(11);
j = this.centrifuge.crafter.currentTickTime * 11 / this.centrifuge.crafter.currentNeededTicks; if(j > 0) {
this.drawTexturedModalRect(k + 83, l + 23 + 10 - j, 177, 15 + 10 - j, 10, j);
this.drawTexturedModalRect(k + 98, l + 38, 177, 51, j, 10);
this.drawTexturedModalRect(k + 83, l + 53, 177, 39, 10, j);
this.drawTexturedModalRect(k + 68 + 10 - j, l + 38, 177 + 10 - j, 27, j, 10);
} }
this.drawTexturedModalRect(k + 83, l + 23 + 10 - j, 177, 15 + 10 - j, 10, j);
this.drawTexturedModalRect(k + 98, l + 38, 177, 51, j, 10);
this.drawTexturedModalRect(k + 83, l + 53, 177, 39, 10, j);
this.drawTexturedModalRect(k + 68 + 10 - j, l + 38, 177 + 10 - j, 27, j, 10);
j = (int)this.centrifuge.energy.getEnergyStored() * 12 / this.centrifuge.energy.getCapacity(); j = centrifuge.getEnergyScaled(12);
if(j > 0) { if(j > 0) {
this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2); this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
} }

View file

@ -42,12 +42,12 @@ public class GuiChemicalReactor extends GuiContainer {
int j = 0; int j = 0;
if(this.chemicalReactor.crafter.currentTickTime != 0){ j = chemicalReactor.getProgressScaled(11);
j = this.chemicalReactor.crafter.currentTickTime * 20 / this.chemicalReactor.crafter.currentNeededTicks; if(j > 0) {
} this.drawTexturedModalRect(k + 73, l + 39, 177, 15, 30, j);
this.drawTexturedModalRect(k + 73, l + 39, 177, 15, 30, j); }
j = (int) (this.chemicalReactor.crafter.energy.getEnergyStored() * 12 / this.chemicalReactor.energy.getCapacity()); j = chemicalReactor.getEnergyScaled(12);
if(j > 0) { if(j > 0) {
this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2); this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
} }

View file

@ -33,12 +33,12 @@ public class GuiGrinder extends GuiContainer{
int j = 0; int j = 0;
if(grinder.crafter.currentRecipe != null) { j = grinder.getProgressScaled(24);
j = this.grinder.crafter.currentTickTime * 24 / this.grinder.crafter.currentNeededTicks; if(j > 0) {
this.drawTexturedModalRect(k + 56, l + 38, 176, 14, j + 1, 16);
} }
this.drawTexturedModalRect(k + 51, l + 35, 176, 14, j + 1, 16);
j = (int)this.grinder.energy.getEnergyStored() * 12 / this.grinder.energy.getCapacity(); j = grinder.getEnergyScaled(12);
if(j > 0) { if(j > 0) {
this.drawTexturedModalRect(k + 132, l + 63 + 12 - j, 176, 12 - j, 14, j + 2); this.drawTexturedModalRect(k + 132, l + 63 + 12 - j, 176, 12 - j, 14, j + 2);
} }

View file

@ -46,15 +46,17 @@ public class GuiIndustrialSawmill extends GuiContainer {
int j = 0; int j = 0;
if(sawmill.crafter.currentTickTime != 0) { j = sawmill.getProgressScaled(24);
j = this.sawmill.crafter.currentTickTime * 24 / this.sawmill.crafter.currentNeededTicks;
}
this.drawTexturedModalRect(k + 57, l + 36, 176, 11, j - 1, 13);
j = (int)this.sawmill.energy.getEnergyStored() * 12 / this.sawmill.energy.getCapacity();
if(j > 0) { if(j > 0) {
this.drawTexturedModalRect(k + 36, l + 66 + 12 - j, 176, 12 - j, 14, j + 2); this.drawTexturedModalRect(k + 56, l + 38, 176, 14, j - 1, 11);
} }
j = sawmill.getEnergyScaled(12);
if(j > 0) {
this.drawTexturedModalRect(k + 33, l + 65 + 12 - j, 176, 12 - j, 14, j + 2);
}
} }
protected void drawGuiContainerForegroundLayer(int p_146979_1_, protected void drawGuiContainerForegroundLayer(int p_146979_1_,

View file

@ -42,12 +42,12 @@ public class GuiLathe extends GuiContainer {
int j = 0; int j = 0;
if(this.lathe.crafter.currentTickTime != 0){ j = lathe.getProgressScaled(20);
j = this.lathe.crafter.currentTickTime * 20 / this.lathe.crafter.currentNeededTicks; if(j > 0) {
} this.drawTexturedModalRect(k + 80, l + 34, 176, 14, j, 16);
this.drawTexturedModalRect(k + 80, l + 34, 176, 14, j, 16); }
j = (int) (this.lathe.energy.getEnergyStored() * 12 / this.lathe.energy.getCapacity()); j = lathe.getEnergyScaled(12);
if(j > 0) { if(j > 0) {
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2); this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
} }

View file

@ -43,12 +43,12 @@ public class GuiPlateCuttingMachine extends GuiContainer {
int j = 0; int j = 0;
if(this.platecuttingmachine.crafter.currentTickTime != 0){ j = platecuttingmachine.getProgressScaled(20);
j = this.platecuttingmachine.crafter.currentTickTime * 20 / this.platecuttingmachine.crafter.currentNeededTicks; if(j > 0) {
} this.drawTexturedModalRect(k + 83, l + 34, 176, 14, j, 16);
this.drawTexturedModalRect(k + 83, l + 34, 176, 14, j, 16); }
j = (int) (this.platecuttingmachine.energy.getEnergyStored() * 12 / this.platecuttingmachine.energy.getCapacity()); j = platecuttingmachine.getEnergyScaled(12);
if(j > 0) { if(j > 0) {
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2); this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
} }

View file

@ -200,4 +200,15 @@ public class TileAlloySmelter extends TileMachineBase implements IWrenchable, IE
{ {
return slotIndex == 2; return slotIndex == 2;
} }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }

View file

@ -209,4 +209,15 @@ public class TileAssemblingMachine extends TileMachineBase implements IWrenchabl
// } // }
// } // }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }

View file

@ -216,4 +216,15 @@ public class TileCentrifuge extends TileMachineBase implements IWrenchable, IEn
{ {
return slotIndex == 2 || slotIndex == 3 || slotIndex == 4 || slotIndex == 5; return slotIndex == 2 || slotIndex == 3 || slotIndex == 4 || slotIndex == 5;
} }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }

View file

@ -209,4 +209,15 @@ public class TileChemicalReactor extends TileMachineBase implements IWrenchable,
// } // }
// } // }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }

View file

@ -241,4 +241,15 @@ public class TileGrinder extends TileMachineBase implements IWrenchable, IEnergy
{ {
return slotIndex == 2 || slotIndex == 3 || slotIndex == 4 || slotIndex == 5; return slotIndex == 2 || slotIndex == 3 || slotIndex == 4 || slotIndex == 5;
} }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }

View file

@ -202,4 +202,16 @@ public class TileImplosionCompressor extends TileMachineBase implements IWrencha
{ {
return slotIndex == 2 || slotIndex == 3; return slotIndex == 2 || slotIndex == 3;
} }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }

View file

@ -130,7 +130,7 @@ public class TileIndustrialSawmill extends TileMachineBase implements IWrenchabl
public void addWailaInfo(List<String> info) public void addWailaInfo(List<String> info)
{ {
super.addWailaInfo(info); super.addWailaInfo(info);
info.add("Power Stored " + energy.getEnergyStored() +" EU"); info.add("Power Stored " + energy.getEnergyStored() + " EU");
if(crafter.currentRecipe !=null){ if(crafter.currentRecipe !=null){
info.add("Power Usage " + crafter.currentRecipe.euPerTick() + " EU/t"); info.add("Power Usage " + crafter.currentRecipe.euPerTick() + " EU/t");
} }
@ -263,4 +263,15 @@ public class TileIndustrialSawmill extends TileMachineBase implements IWrenchabl
return slotIndex == 2 || slotIndex == 3 || slotIndex == 4; return slotIndex == 2 || slotIndex == 3 || slotIndex == 4;
} }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }

View file

@ -208,4 +208,15 @@ public class TileLathe extends TileMachineBase implements IWrenchable, IEnergyTi
// } // }
// } // }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }

View file

@ -208,5 +208,16 @@ public class TilePlateCuttingMachine extends TileMachineBase implements IWrencha
return slotIndex == 1; return slotIndex == 1;
} }
public int getProgressScaled(int scale) {
if(crafter.currentTickTime != 0) {
return crafter.currentTickTime * scale / crafter.currentNeededTicks;
}
return 0;
}
public int getEnergyScaled(int scale) {
return (int)energy.getEnergyStored() * scale / energy.getCapacity();
}
} }