Rewrite to use new RebornCore Power API. Texture fixes.

This commit is contained in:
Dragon2488 2016-07-21 22:22:56 +07:00
parent 6f54e3801f
commit b292fdd352
77 changed files with 1342 additions and 3008 deletions

View file

@ -42,15 +42,13 @@ public class GuiAlloySmelter extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = alloysmelter.getProgressScaled(24);
if (j > 0)
{
int j = alloysmelter.getProgressScaled(24);
if (j > 0) {
this.drawTexturedModalRect(k + 79, l + 34, 176, 14, j + 1, 16);
}
j = alloysmelter.getEnergyScaled(12);
j = (int)(alloysmelter.getEnergy() * 24f / alloysmelter.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);

View file

@ -45,15 +45,12 @@ public class GuiAssemblingMachine extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = assemblingmachine.getProgressScaled(20);
if (j > 0)
{
int j = assemblingmachine.getProgressScaled(20);
if (j > 0) {
this.drawTexturedModalRect(k + 86, l + 34, 176, 14, j + 1, 16);
}
j = assemblingmachine.getEnergyScaled(12);
j = (int)(assemblingmachine.getEnergy() * 12f / assemblingmachine.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 56, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);

View file

@ -42,9 +42,7 @@ public class GuiBatbox extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = generator.getEnergyScaled(24);
int j = (int)(generator.getEnergy() * 24f / generator.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);

View file

@ -78,17 +78,15 @@ public class GuiBlastFurnace extends GuiContainer
l + 52 + 12 - 0, -1);
}
int j = 0;
this.mc.getTextureManager().bindTexture(texture);
j = blastfurnace.getProgressScaled(24);
int j = blastfurnace.getProgressScaled(24);
if (j > 0)
{
this.drawTexturedModalRect(k + 64, l + 37, 176, 14, j + 1, 16);
}
j = blastfurnace.getEnergyScaled(12);
if (j > 0)
{
j = (int)(blastfurnace.getEnergy() * 12f / blastfurnace.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 9, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
}

View file

@ -43,9 +43,7 @@ public class GuiCentrifuge extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = centrifuge.getProgressScaled(11);
int j = centrifuge.getProgressScaled(11);
if (j > 0)
{
this.drawTexturedModalRect(k + 83, l + 23 + 10 - j, 177, 15 + 10 - j, 10, j);
@ -54,10 +52,8 @@ public class GuiCentrifuge extends GuiContainer
this.drawTexturedModalRect(k + 68 + 10 - j, l + 38, 177 + 10 - j, 27, j, 10);
}
j = centrifuge.getEnergyScaled(12);
if (j > 0)
{
j = (int)(centrifuge.getEnergy() * 12f / centrifuge.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
}
}

View file

@ -42,9 +42,8 @@ public class GuiChargeBench extends GuiContainer
int j = 0;
j = chargebench.getEnergyScaled(12);
if (j > 0)
{
j = (int)(chargebench.getEnergy() * 12f / chargebench.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 10, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
}
}

View file

@ -51,9 +51,8 @@ public class GuiChemicalReactor extends GuiContainer
this.drawTexturedModalRect(k + 73, l + 39, 177, 15, 30, j);
}
j = chemicalReactor.getEnergyScaled(12);
if (j > 0)
{
j = (int)(chemicalReactor.getEnergy() * 12f / chemicalReactor.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2);
}

View file

@ -34,19 +34,16 @@ public class GuiCompressor extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = compressor.getProgressScaled(24);
if (j > 0)
{
int j = compressor.getProgressScaled(24);
if (j > 0) {
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
}
j = compressor.getEnergyScaled(12);
if (j > 0)
{
j = (int)(compressor.getEnergy() * 12f / compressor.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
}
}
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)

View file

@ -34,19 +34,16 @@ public class GuiElectricFurnace extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = furnace.gaugeProgressScaled(24);
if (j > 0)
{
int j = furnace.gaugeProgressScaled(24);
if (j > 0) {
this.drawTexturedModalRect(k + 78, l + 34, 176, 14, j + 1, 16);
}
j = furnace.getEnergyScaled(12);
if (j > 0)
{
j = (int)(furnace.getEnergy() * 12f / furnace.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
}
}
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_)

View file

@ -35,17 +35,13 @@ public class GuiExtractor extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = extractor.getProgressScaled(24);
if (j > 0)
{
int j = extractor.getProgressScaled(24);
if (j > 0) {
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
}
j = extractor.getEnergyScaled(12);
if (j > 0)
{
j = (int)(extractor.getEnergy() * 12f / extractor.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
}
}

View file

@ -42,11 +42,8 @@ public class GuiGenerator extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = generator.getEnergyScaled(24);
if (j > 0)
{
int j = (int)(generator.getEnergy() * 24f / generator.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
}

View file

@ -43,9 +43,8 @@ public class GuiGrinder extends GuiContainer
this.drawTexturedModalRect(k + 80, l + 36, 176, 14, j + 1, 16);
}
j = grinder.getEnergyScaled(12);
if (j > 0)
{
j = (int)(grinder.getEnergy() * 12f / grinder.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);
}
}

View file

@ -58,7 +58,7 @@ public class GuiImplosionCompressor extends GuiContainer
this.drawTexturedModalRect(k + 60, l + 37, 176, 14, j + 1, 16);
}
j = compresser.getEnergyScaled(12);
j = (int)(compresser.getEnergy() * 12f / compresser.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 14, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);

View file

@ -52,7 +52,7 @@ public class GuiIndustrialElectrolyzer extends GuiContainer
this.drawTexturedModalRect(k + 72, l + 38, 176, 14, j + 1, 16);
}
j = eletrolyzer.getEnergyScaled(12);
j = (int)(eletrolyzer.getEnergy() * 12f / eletrolyzer.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 134, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);

View file

@ -55,7 +55,7 @@ public class GuiIndustrialGrinder extends GuiContainer
this.drawTexturedModalRect(k + 50, l + 36, 176, 14, j + 1, 16);
}
j = grinder.getEnergyScaled(12);
j = (int)(grinder.getEnergy() * 12f / grinder.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 132, l + 63 + 12 - j, 176, 12 - j, 14, j + 2);

View file

@ -50,9 +50,8 @@ public class GuiIndustrialSawmill extends GuiContainer
this.drawTexturedModalRect(k + 56, l + 38, 176, 14, j - 1, 11);
}
j = sawmill.getEnergyScaled(12);
if (j > 0)
{
j = (int)(sawmill.getEnergy() * 12f / sawmill.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 33, l + 65 + 12 - j, 176, 12 - j, 14, j + 2);
}
// TODO 1.8

View file

@ -45,11 +45,8 @@ public class GuiMFE extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = generator.getEnergyScaled(24);
if (j > 0)
{
int j = (int)(generator.getEnergy() * 24f / generator.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
}
//

View file

@ -45,11 +45,8 @@ public class GuiMFSU extends GuiContainer
int l = (this.height - this.ySize) / 2;
this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
int j = 0;
j = generator.getEnergyScaled(24);
if (j > 0)
{
int j = (int)(generator.getEnergy() * 24f / generator.getMaxPower());
if (j > 0) {
this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
}
//

View file

@ -42,7 +42,7 @@ public class GuiRecycler extends GuiContainer
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
}
j = compressor.getEnergyScaled(12);
j = (int)(compressor.getEnergy() * 12f / compressor.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);

View file

@ -38,7 +38,7 @@ public class GuiRollingMachine extends GuiContainer
int j = this.containerRollingMachine.getBurnTimeRemainingScaled(24);
this.drawTexturedModalRect(k + 91, l + 34, 176, 14, j + 1, 19);
j = this.rollingMachine.getEnergyScaled(12);
j = (int)(rollingMachine.getEnergy() * 12f / rollingMachine.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 7, l + 33 + 12 - j, 176, 12 - j, 14, j + 2);

View file

@ -44,7 +44,7 @@ public class GuiScrapboxinator extends GuiContainer
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
}
j = tile.getEnergyScaled(12);
j = (int)(tile.getEnergy() * 12f / tile.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 24, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);

View file

@ -72,7 +72,7 @@ public class GuiVacuumFreezer extends GuiContainer
this.drawTexturedModalRect(k + 79, l + 37, 176, 14, j + 1, 16);
}
j = crafter.getEnergyScaled(12);
j = (int)(crafter.getEnergy() * 12f / crafter.getMaxPower());
if (j > 0)
{
this.drawTexturedModalRect(k + 26, l + 36 + 12 - j, 176, 12 - j, 14, j + 2);