Fixed some progress bars

This commit is contained in:
gigabit101 2016-03-22 23:27:35 +00:00
parent ab19d71ede
commit 5ea4dedcb2
5 changed files with 30 additions and 24 deletions

View file

@ -51,13 +51,4 @@ public class ContainerCompressor extends ContainerCrafting {
public boolean canInteractWith(EntityPlayer p_75145_1_) {
return true;
}
@SideOnly(Side.CLIENT)
@Override
public void updateProgressBar(int id, int value) {
if (id == 10) {
this.connectionStatus = value;
}
}
}

View file

@ -1,6 +1,7 @@
package techreborn.client.container;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.inventory.Slot;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -52,12 +53,30 @@ public class ContainerExtractor extends ContainerCrafting {
return true;
}
@SideOnly(Side.CLIENT)
@Override
public void updateProgressBar(int id, int value) {
if (id == 10) {
this.connectionStatus = value;
}
}
// @Override
// public void onCraftGuiOpened(ICrafting crafting) {
// super.onCraftGuiOpened(crafting);
// crafting.sendProgressBarUpdate(this, 0, (int) tile.getProgressScaled(0));
// crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
// }
//
// @SideOnly(Side.CLIENT)
// @Override
// public void updateProgressBar(int id, int value) {
// if (id == 0) {
// this.progress = value;
// }
// else if (id == 2) {
// this.energy = value;
// }
// this.tile.setEnergy(energy);
// }
// @SideOnly(Side.CLIENT)
// @Override
// public void updateProgressBar(int id, int value) {
// if (id == 10) {
// this.connectionStatus = value;
// }
// }
}

View file

@ -34,9 +34,8 @@ public class GuiCompressor extends GuiContainer {
int j = 0;
j = compressor.getProgressScaled(24);
// System.out.println("" + j);
if (j > 0) {
this.drawTexturedModalRect(k + 80, l + 35, 176, 14, j + 2, 16);
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
}
j = compressor.getEnergyScaled(12);
@ -50,5 +49,4 @@ public class GuiCompressor extends GuiContainer {
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
}
}

View file

@ -35,7 +35,7 @@ public class GuiExtractor extends GuiContainer {
j = extractor.getProgressScaled(24);
if (j > 0) {
this.drawTexturedModalRect(k + 50, l + 36, 176, 14, j + 1, 16);
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
}
j = extractor.getEnergyScaled(12);
@ -49,5 +49,4 @@ public class GuiExtractor extends GuiContainer {
this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752);
this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
}
}

View file

@ -34,7 +34,6 @@ public class GuiRecycler extends GuiContainer {
int j = 0;
j = compressor.gaugeProgressScaled(24);
// System.out.println(compressor.gaugeProgressScaled(10));
if (j > 0) {
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
}