Guis for batbox, mfe, mfsu
This commit is contained in:
parent
cb42f452c4
commit
1acdc13e2d
2 changed files with 22 additions and 34 deletions
|
@ -32,11 +32,6 @@ public class ContainerBatbox extends RebornContainer {
|
|||
this.tile = tile;
|
||||
this.player = player;
|
||||
|
||||
// fuel
|
||||
// this.addSlotToContainer(new Slot(tile.inventory, 0, 80, 53));
|
||||
// // charge
|
||||
// this.addSlotToContainer(new SlotFurnaceFuel(tile.inventory, 1, 80, 17));
|
||||
|
||||
|
||||
int i;
|
||||
|
||||
|
@ -53,30 +48,22 @@ public class ContainerBatbox extends RebornContainer {
|
|||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void detectAndSendChanges() {
|
||||
// super.detectAndSendChanges();
|
||||
// for (int i = 0; i < this.crafters.size(); i++) {
|
||||
// ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
// if (this.burnTime != tile.burnTime) {
|
||||
// icrafting.sendProgressBarUpdate(this, 0, tile.burnTime);
|
||||
// }
|
||||
// if (this.totalBurnTime != tile.totalBurnTime) {
|
||||
// icrafting.sendProgressBarUpdate(this, 1, tile.totalBurnTime);
|
||||
// }
|
||||
// if (this.energy != (int) tile.getEnergy()) {
|
||||
// icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
for (int i = 0; i < this.crafters.size(); i++) {
|
||||
ICrafting icrafting = (ICrafting) this.crafters.get(i);
|
||||
if (this.energy != (int) tile.getEnergy()) {
|
||||
icrafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onCraftGuiOpened(ICrafting crafting) {
|
||||
// super.onCraftGuiOpened(crafting);
|
||||
// crafting.sendProgressBarUpdate(this, 0, tile.burnTime);
|
||||
// crafting.sendProgressBarUpdate(this, 1, tile.totalBurnTime);
|
||||
// crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
|
||||
// }
|
||||
@Override
|
||||
public void onCraftGuiOpened(ICrafting crafting) {
|
||||
super.onCraftGuiOpened(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 2, (int) tile.getEnergy());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
|
@ -94,5 +81,4 @@ public class ContainerBatbox extends RebornContainer {
|
|||
public int getScaledBurnTime(int i) {
|
||||
return (int) (((float) burnTime / (float) totalBurnTime) * i);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,10 +42,10 @@ public class GuiBatbox extends GuiContainer {
|
|||
|
||||
int j = 0;
|
||||
|
||||
// j = generator.getEnergyScaled(24);
|
||||
// if (j > 0) {
|
||||
// this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
|
||||
// }
|
||||
j = generator.getEnergyScaled(24);
|
||||
if (j > 0) {
|
||||
this.drawTexturedModalRect(k + 109, l + 21 + 12, 176, 0, j + 1, 16);
|
||||
}
|
||||
//
|
||||
// if (containerGenerator.burnTime != 0)
|
||||
// {
|
||||
|
@ -57,7 +57,9 @@ public class GuiBatbox extends GuiContainer {
|
|||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
||||
String name = I18n.translateToLocal("tile.techreborn.batbox.name");
|
||||
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(PowerSystem.getLocaliszedPower(containerGenerator.energy), 25, this.ySize- 150, 4210752);
|
||||
this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(generator.getMaxPower()), 25, this.ySize- 140, 4210752);
|
||||
this.fontRendererObj.drawString(PowerSystem.getLocaliszedPower(containerGenerator.energy), 25, this.ySize- 150, 4210752);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue