Fixed some progress bars
This commit is contained in:
parent
ab19d71ede
commit
5ea4dedcb2
5 changed files with 30 additions and 24 deletions
|
@ -51,13 +51,4 @@ public class ContainerCompressor extends ContainerCrafting {
|
||||||
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
public boolean canInteractWith(EntityPlayer p_75145_1_) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
@Override
|
|
||||||
public void updateProgressBar(int id, int value) {
|
|
||||||
if (id == 10) {
|
|
||||||
this.connectionStatus = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package techreborn.client.container;
|
package techreborn.client.container;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.ICrafting;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
@ -52,12 +53,30 @@ public class ContainerExtractor extends ContainerCrafting {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
// @Override
|
||||||
@Override
|
// public void onCraftGuiOpened(ICrafting crafting) {
|
||||||
public void updateProgressBar(int id, int value) {
|
// super.onCraftGuiOpened(crafting);
|
||||||
if (id == 10) {
|
// crafting.sendProgressBarUpdate(this, 0, (int) tile.getProgressScaled(0));
|
||||||
this.connectionStatus = value;
|
// 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;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,9 +34,8 @@ public class GuiCompressor extends GuiContainer {
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
||||||
j = compressor.getProgressScaled(24);
|
j = compressor.getProgressScaled(24);
|
||||||
// System.out.println("" + j);
|
|
||||||
if (j > 0) {
|
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);
|
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(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);
|
this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class GuiExtractor extends GuiContainer {
|
||||||
|
|
||||||
j = extractor.getProgressScaled(24);
|
j = extractor.getProgressScaled(24);
|
||||||
if (j > 0) {
|
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);
|
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(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);
|
this.fontRendererObj.drawString(I18n.translateToLocalFormatted("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,6 @@ public class GuiRecycler extends GuiContainer {
|
||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
||||||
j = compressor.gaugeProgressScaled(24);
|
j = compressor.gaugeProgressScaled(24);
|
||||||
// System.out.println(compressor.gaugeProgressScaled(10));
|
|
||||||
if (j > 0) {
|
if (j > 0) {
|
||||||
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
|
this.drawTexturedModalRect(k + 78, l + 35, 176, 14, j + 1, 16);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue