Removed excessive this-es. WIP

This commit is contained in:
drcrazy 2018-12-17 15:53:35 +03:00
parent 15cf0d49ad
commit 6e237a4fcb
13 changed files with 171 additions and 175 deletions

View file

@ -50,11 +50,11 @@ public class GuiAESU extends GuiBase {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final Layer layer = Layer.BACKGROUND;
this.drawSlot(62, 45, layer);
this.drawSlot(98, 45, layer);
this.drawArmourSlots(8, 18, layer);
this.builder.drawEnergyOutput(this, 171, 61, this.tile.getCurrentOutput(), layer);
this.builder.drawUpDownButtons(this, 121, 79, layer);
drawSlot(62, 45, layer);
drawSlot(98, 45, layer);
drawArmourSlots(8, 18, layer);
builder.drawEnergyOutput(this, 171, 61, tile.getCurrentOutput(), layer);
builder.drawUpDownButtons(this, 121, 79, layer);
}
@Override
@ -65,13 +65,13 @@ public class GuiAESU extends GuiBase {
if(GuiBase.slotConfigType == SlotConfigType.NONE){
GlStateManager.pushMatrix();
GlStateManager.scale(0.6, 0.6, 1);
this.drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) this.tile.getEnergy()) + "/"
+ PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) this.tile.getMaxPower()) + " "
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getEnergy()) + "/"
+ PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getMaxPower()) + " "
+ PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
GlStateManager.popMatrix();
}
this.builder.drawMultiEnergyBar(this, 81, 28, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
buttonList.add(new GuiButtonUpDown(300, 121, 79, this, layer));
buttonList.add(new GuiButtonUpDown(301, 121 + 12, 79, this, layer));

View file

@ -44,13 +44,13 @@ public class GuiAlloySmelter extends GuiBase {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
this.drawSlot(8, 72, layer);
drawSlot(8, 72, layer);
this.drawSlot(34, 47, layer);
this.drawSlot(126, 47, layer);
this.drawOutputSlot(80, 47, layer);
drawSlot(34, 47, layer);
drawSlot(126, 47, layer);
drawOutputSlot(80, 47, layer);
this.builder.drawJEIButton(this, 158, 5, layer);
builder.drawJEIButton(this, 158, 5, layer);
}
@Override
@ -58,8 +58,8 @@ public class GuiAlloySmelter extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, TRBuilder.ProgressDirection.LEFT, layer);
this.builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, TRBuilder.ProgressDirection.LEFT, layer);
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
}

View file

@ -44,15 +44,15 @@ public class GuiAssemblingMachine extends GuiBase {
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
// Battery slot
this.drawSlot(8, 72, layer);
drawSlot(8, 72, layer);
// Input slots
this.drawSlot(55, 35, layer);
this.drawSlot(55, 55, layer);
drawSlot(55, 35, layer);
drawSlot(55, 55, layer);
this.drawOutputSlot(101, 45, layer);
drawOutputSlot(101, 45, layer);
this.builder.drawJEIButton(this, 158, 5, layer);
builder.drawJEIButton(this, 158, 5, layer);
}
@Override
@ -60,7 +60,7 @@ public class GuiAssemblingMachine extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
}

View file

@ -87,8 +87,8 @@ public class GuiAutoCrafting extends GuiBase {
renderItemStack(recipe.getRecipeOutput(), 95, 42);
}
final Layer layer = Layer.FOREGROUND;
this.builder.drawMultiEnergyBar(this, 9, 26, (int) this.tileAutoCraftingTable.getEnergy(), (int) this.tileAutoCraftingTable.getMaxPower(), mouseX, mouseY, 0, layer);
this.builder.drawProgressBar(this, tileAutoCraftingTable.getProgress(), tileAutoCraftingTable.getMaxProgress(), 120, 44, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
builder.drawMultiEnergyBar(this, 9, 26, (int) tileAutoCraftingTable.getEnergy(), (int) tileAutoCraftingTable.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawProgressBar(this, tileAutoCraftingTable.getProgress(), tileAutoCraftingTable.getMaxProgress(), 120, 44, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
}
@Override
@ -104,12 +104,12 @@ public class GuiAutoCrafting extends GuiBase {
drawOutputSlot(95, 42, layer);
drawString("Inventory", 8, 82, 4210752, layer);
this.builder.drawLockButton(this, 145, 4, mouseX, mouseY, layer, tileAutoCraftingTable.locked);
builder.drawLockButton(this, 145, 4, mouseX, mouseY, layer, tileAutoCraftingTable.locked);
}
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
if (this.builder.isInRect(145 + getGuiLeft(), 4 + getGuiTop(), 20, 12, mouseX, mouseY)) {
if (builder.isInRect(145 + getGuiLeft(), 4 + getGuiTop(), 20, 12, mouseX, mouseY)) {
NetworkManager.sendToServer(new PacketAutoCraftingTableLock(tileAutoCraftingTable, !tileAutoCraftingTable.locked));
return;
}

View file

@ -44,8 +44,8 @@ public class GuiBatbox extends GuiBase {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final Layer layer = Layer.BACKGROUND;
this.drawSlot(62, 45, layer);
this.drawSlot(98, 45, layer);
drawSlot(62, 45, layer);
drawSlot(98, 45, layer);
}
@Override
@ -56,10 +56,10 @@ public class GuiBatbox extends GuiBase {
if(GuiBase.slotConfigType == SlotConfigType.NONE){
GlStateManager.pushMatrix();
GlStateManager.scale(0.6, 0.6, 5);
this.drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) this.tile.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) this.tile.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) tile.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
GlStateManager.popMatrix();
}
this.builder.drawMultiEnergyBar(this, 81, 28, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
}

View file

@ -67,24 +67,24 @@ public class GuiBlastFurnace extends GuiBase {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
final GuiBase.Layer layer = Layer.BACKGROUND;
this.drawSlot(8, 72, layer);
drawSlot(8, 72, layer);
this.drawSlot(50, 27, layer);
this.drawSlot(50, 47, layer);
this.drawOutputSlotBar(92, 36, 2, layer);
drawSlot(50, 27, layer);
drawSlot(50, 47, layer);
drawOutputSlotBar(92, 36, 2, layer);
this.builder.drawJEIButton(this, 158, 5, layer);
builder.drawJEIButton(this, 158, 5, layer);
}
@Override
protected void drawGuiContainerForegroundLayer(final int mouseX, final int mouseY) {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
this.hasMultiBlock = this.tile.getCachedHeat() != 0;
this.hasMultiBlock = tile.getCachedHeat() != 0;
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawBigHeatBar(this, 31, 71, tile.getCachedHeat(), 3230, layer);
builder.drawBigHeatBar(this, 31, 71, tile.getCachedHeat(), 3230, layer);
if (hasMultiBlock) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
@ -93,7 +93,7 @@ public class GuiBlastFurnace extends GuiBase {
addHologramButton(76, 56, 212, layer);
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
}
this.builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
public void addHologramButton(int x, int y, int id, Layer layer) {
@ -114,54 +114,51 @@ public class GuiBlastFurnace extends GuiBase {
{
// This code here makes a basic multiblock and then sets to the selected one.
final Multiblock multiblock = new Multiblock();
this.addComponent(0, 0, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 0, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 0, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 0, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 0, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 0, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 0, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 0, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 0, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 0, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 0, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 0, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 0, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 0, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 0, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 0, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 0, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 0, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 1, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 1, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 1, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 1, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 1, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 1, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 1, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 1, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 1, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 1, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 1, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 1, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 1, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 1, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 1, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 1, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 2, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 2, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 2, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 2, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 2, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 2, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 2, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 2, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 2, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 2, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 2, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 2, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 2, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 2, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 2, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 2, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 3, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 3, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 3, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 3, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(0, 3, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 3, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(-1, 3, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 3, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
this.addComponent(1, 3, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 3, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 3, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 3, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 3, 0, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(0, 3, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 3, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(-1, 3, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 3, -1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
addComponent(1, 3, 1, ModBlocks.MACHINE_CASINGS.getDefaultState(), multiblock);
final MultiblockSet set = new MultiblockSet(multiblock);
ClientProxy.multiblockRenderEvent.setMultiblock(set);
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
// new Location(this.tile.getPos().getX(),
// this.tile.getPos().getY(), this.tile.getPos().getZ(), this.tile.getWorld());
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
MultiblockRenderEvent.anchor = new BlockPos(
this.tile.getPos().getX()
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
tile.getPos().getX() - EnumFacing.getFront(tile.getFacingInt()).getFrontOffsetX() * 2,
tile.getPos().getY() - 1,
tile.getPos().getZ() - EnumFacing.getFront(tile.getFacingInt()).getFrontOffsetZ() * 2);
}
} else {
ClientProxy.multiblockRenderEvent.setMultiblock(null);

View file

@ -43,17 +43,17 @@ public class GuiCentrifuge extends GuiBase {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final Layer layer = Layer.BACKGROUND;
this.drawSlot(8, 72, layer);
drawSlot(8, 72, layer);
this.drawSlot(40, 34, layer);
this.drawSlot(40, 54, layer);
drawSlot(40, 34, layer);
drawSlot(40, 54, layer);
this.drawSlot(82, 44, layer);
this.drawSlot(101, 25, layer);
this.drawSlot(120, 44, layer);
this.drawSlot(101, 63, layer);
drawSlot(82, 44, layer);
drawSlot(101, 25, layer);
drawSlot(120, 44, layer);
drawSlot(101, 63, layer);
this.builder.drawJEIButton(this, 158, 5, layer);
builder.drawJEIButton(this, 158, 5, layer);
}
@Override
@ -61,7 +61,7 @@ public class GuiCentrifuge extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 61, 47, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 61, 47, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
}

View file

@ -42,12 +42,12 @@ public class GuiChargeBench extends GuiBase {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final Layer layer = Layer.BACKGROUND;
this.drawSlot(62, 25, layer);
this.drawSlot(98, 25, layer);
this.drawSlot(62, 45, layer);
this.drawSlot(98, 45, layer);
this.drawSlot(62, 65, layer);
this.drawSlot(98, 65, layer);
drawSlot(62, 25, layer);
drawSlot(98, 25, layer);
drawSlot(62, 45, layer);
drawSlot(98, 45, layer);
drawSlot(62, 65, layer);
drawSlot(98, 65, layer);
}
@Override
@ -55,6 +55,6 @@ public class GuiChargeBench extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
this.builder.drawMultiEnergyBar(this, 81, 28, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawMultiEnergyBar(this, 81, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
}

View file

@ -43,13 +43,13 @@ public class GuiChemicalReactor extends GuiBase {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
this.drawSlot(8, 72, layer);
drawSlot(8, 72, layer);
this.drawSlot(34, 47, layer);
this.drawSlot(126, 47, layer);
this.drawOutputSlot(80, 47, layer);
drawSlot(34, 47, layer);
drawSlot(126, 47, layer);
drawOutputSlot(80, 47, layer);
this.builder.drawJEIButton(this, 158, 5, layer);
builder.drawJEIButton(this, 158, 5, layer);
}
@Override
@ -57,8 +57,8 @@ public class GuiChemicalReactor extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, TRBuilder.ProgressDirection.LEFT, layer);
this.builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 51, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, TRBuilder.ProgressDirection.LEFT, layer);
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
}

View file

@ -43,12 +43,12 @@ public class GuiCompressor extends GuiBase {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
this.drawSlot(8, 72, layer);
drawSlot(8, 72, layer);
this.drawSlot(55, 45, layer);
this.drawOutputSlot(101, 45, layer);
drawSlot(55, 45, layer);
drawOutputSlot(101, 45, layer);
this.builder.drawJEIButton(this, 158, 5, layer);
builder.drawJEIButton(this, 158, 5, layer);
}
@Override
@ -56,7 +56,7 @@ public class GuiCompressor extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
this.builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
}

View file

@ -47,7 +47,7 @@ public class GuiDieselGenerator extends GuiBase {
final GuiBase.Layer layer = GuiBase.Layer.BACKGROUND;
drawSlot(25, 35, layer);
drawSlot(25, 55, layer);
this.builder.drawJEIButton(this, 158, 5, layer);
builder.drawJEIButton(this, 158, 5, layer);
}
@ -56,9 +56,9 @@ public class GuiDieselGenerator extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
this.builder.drawProgressBar(this, this.tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawMultiEnergyBar(this, 130, 28, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
this.builder.drawTank(this, 44, 25, mouseX, mouseY, this.tile.tank.getFluid(), this.tile.tank.getCapacity(), this.tile.tank.isEmpty(), layer);
builder.drawProgressBar(this, tile.getProgressScaled(10), 100, 83, 48, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
builder.drawMultiEnergyBar(this, 130, 28, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawTank(this, 44, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer);
}

View file

@ -30,11 +30,11 @@ import techreborn.tiles.TileDigitalChest;
public class GuiDigitalChest extends GuiBase {
TileDigitalChest digitalChest;
TileDigitalChest tile;
public GuiDigitalChest(final EntityPlayer player, final TileDigitalChest digitalChest) {
super(player, digitalChest, digitalChest.createContainer(player));
this.digitalChest = digitalChest;
public GuiDigitalChest(final EntityPlayer player, final TileDigitalChest tile) {
super(player, tile, tile.createContainer(player));
this.tile = tile;
}
@Override
@ -42,8 +42,8 @@ public class GuiDigitalChest extends GuiBase {
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
final Layer layer = Layer.BACKGROUND;
this.drawSlot(80, 24, layer);
this.drawSlot(80, 64, layer);
drawSlot(80, 24, layer);
drawSlot(80, 64, layer);
}
@Override
@ -51,14 +51,14 @@ public class GuiDigitalChest extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final Layer layer = Layer.FOREGROUND;
if (!this.digitalChest.storedItem.isEmpty() && this.digitalChest.getStackInSlot(1) != null) {
this.builder.drawBigBlueBar(this, 31, 43,
this.digitalChest.storedItem.getCount() + this.digitalChest.getStackInSlot(1).getCount(),
this.digitalChest.maxCapacity, mouseX - this.guiLeft, mouseY - this.guiTop, "Stored", layer);
if (!tile.storedItem.isEmpty() && tile.getStackInSlot(1) != null) {
builder.drawBigBlueBar(this, 31, 43,
tile.storedItem.getCount() + tile.getStackInSlot(1).getCount(),
tile.maxCapacity, mouseX - guiLeft, mouseY - guiTop, "Stored", layer);
}
if (this.digitalChest.storedItem.isEmpty() && this.digitalChest.getStackInSlot(1) != null) {
this.builder.drawBigBlueBar(this, 31, 43, this.digitalChest.getStackInSlot(1).getCount(),
this.digitalChest.maxCapacity, mouseX - this.guiLeft, mouseY - this.guiTop, "Stored", layer);
if (tile.storedItem.isEmpty() && tile.getStackInSlot(1) != null) {
builder.drawBigBlueBar(this, 31, 43, tile.getStackInSlot(1).getCount(),
tile.maxCapacity, mouseX - guiLeft, mouseY - guiTop, "Stored", layer);
}
}
}

View file

@ -65,14 +65,14 @@ public class GuiDistillationTower extends GuiBase {
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
final GuiBase.Layer layer = Layer.BACKGROUND;
// Battery slot
this.drawSlot(8, 72, layer);
drawSlot(8, 72, layer);
// Input slots
this.drawSlot(35, 27, layer);
this.drawSlot(35, 47, layer);
drawSlot(35, 27, layer);
drawSlot(35, 47, layer);
// Four output slots
this.drawOutputSlotBar(78, 36, 4, layer);
drawOutputSlotBar(78, 36, 4, layer);
// JEI Button
this.builder.drawJEIButton(this, 158, 5, layer);
builder.drawJEIButton(this, 158, 5, layer);
}
@Override
@ -80,8 +80,8 @@ public class GuiDistillationTower extends GuiBase {
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
final GuiBase.Layer layer = Layer.FOREGROUND;
this.builder.drawProgressBar(this, this.tile.getProgressScaled(100), 100, 55, 40, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
this.builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 40, mouseX, mouseY, TRBuilder.ProgressDirection.RIGHT, layer);
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
if (tile.getMutliBlock()) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
@ -113,52 +113,51 @@ public class GuiDistillationTower extends GuiBase {
IBlockState advancedCasing = ModBlocks.MACHINE_CASINGS.getDefaultState().withProperty(BlockMachineCasing.TYPE, "advanced");
IBlockState standardCasing = ModBlocks.MACHINE_CASINGS.getDefaultState().withProperty(BlockMachineCasing.TYPE, "standard");
this.addComponent(0, 0, 0, standardCasing, multiblock);
this.addComponent(1, 0, 0, standardCasing, multiblock);
this.addComponent(0, 0, 1, standardCasing, multiblock);
this.addComponent(-1, 0, 0, standardCasing, multiblock);
this.addComponent(0, 0, -1, standardCasing, multiblock);
this.addComponent(-1, 0, -1, standardCasing, multiblock);
this.addComponent(-1, 0, 1, standardCasing, multiblock);
this.addComponent(1, 0, -1, standardCasing, multiblock);
this.addComponent(1, 0, 1, standardCasing, multiblock);
addComponent(0, 0, 0, standardCasing, multiblock);
addComponent(1, 0, 0, standardCasing, multiblock);
addComponent(0, 0, 1, standardCasing, multiblock);
addComponent(-1, 0, 0, standardCasing, multiblock);
addComponent(0, 0, -1, standardCasing, multiblock);
addComponent(-1, 0, -1, standardCasing, multiblock);
addComponent(-1, 0, 1, standardCasing, multiblock);
addComponent(1, 0, -1, standardCasing, multiblock);
addComponent(1, 0, 1, standardCasing, multiblock);
this.addComponent(1, 1, 0, advancedCasing, multiblock);
this.addComponent(0, 1, 1, advancedCasing, multiblock);
this.addComponent(-1, 1, 0, advancedCasing, multiblock);
this.addComponent(0, 1, -1, advancedCasing, multiblock);
this.addComponent(-1, 1, -1, advancedCasing, multiblock);
this.addComponent(-1, 1, 1, advancedCasing, multiblock);
this.addComponent(1, 1, -1, advancedCasing, multiblock);
this.addComponent(1, 1, 1, advancedCasing, multiblock);
addComponent(1, 1, 0, advancedCasing, multiblock);
addComponent(0, 1, 1, advancedCasing, multiblock);
addComponent(-1, 1, 0, advancedCasing, multiblock);
addComponent(0, 1, -1, advancedCasing, multiblock);
addComponent(-1, 1, -1, advancedCasing, multiblock);
addComponent(-1, 1, 1, advancedCasing, multiblock);
addComponent(1, 1, -1, advancedCasing, multiblock);
addComponent(1, 1, 1, advancedCasing, multiblock);
this.addComponent(1, 2, 0, standardCasing, multiblock);
this.addComponent(0, 2, 1, standardCasing, multiblock);
this.addComponent(-1, 2, 0, standardCasing, multiblock);
this.addComponent(0, 2, -1, standardCasing, multiblock);
this.addComponent(-1, 2, -1, standardCasing, multiblock);
this.addComponent(-1, 2, 1, standardCasing, multiblock);
this.addComponent(1, 2, -1, standardCasing, multiblock);
this.addComponent(1, 2, 1, standardCasing, multiblock);
addComponent(1, 2, 0, standardCasing, multiblock);
addComponent(0, 2, 1, standardCasing, multiblock);
addComponent(-1, 2, 0, standardCasing, multiblock);
addComponent(0, 2, -1, standardCasing, multiblock);
addComponent(-1, 2, -1, standardCasing, multiblock);
addComponent(-1, 2, 1, standardCasing, multiblock);
addComponent(1, 2, -1, standardCasing, multiblock);
addComponent(1, 2, 1, standardCasing, multiblock);
this.addComponent(0, 3, 0, advancedCasing, multiblock);
this.addComponent(1, 3, 0, advancedCasing, multiblock);
this.addComponent(0, 3, 1, advancedCasing, multiblock);
this.addComponent(-1, 3, 0, advancedCasing, multiblock);
this.addComponent(0, 3, -1, advancedCasing, multiblock);
this.addComponent(-1, 3, -1, advancedCasing, multiblock);
this.addComponent(-1, 3, 1, advancedCasing, multiblock);
this.addComponent(1, 3, -1, advancedCasing, multiblock);
this.addComponent(1, 3, 1, advancedCasing, multiblock);
addComponent(0, 3, 0, advancedCasing, multiblock);
addComponent(1, 3, 0, advancedCasing, multiblock);
addComponent(0, 3, 1, advancedCasing, multiblock);
addComponent(-1, 3, 0, advancedCasing, multiblock);
addComponent(0, 3, -1, advancedCasing, multiblock);
addComponent(-1, 3, -1, advancedCasing, multiblock);
addComponent(-1, 3, 1, advancedCasing, multiblock);
addComponent(1, 3, -1, advancedCasing, multiblock);
addComponent(1, 3, 1, advancedCasing, multiblock);
final MultiblockSet set = new MultiblockSet(multiblock);
ClientProxy.multiblockRenderEvent.setMultiblock(set);
ClientProxy.multiblockRenderEvent.parent = this.tile.getPos();
ClientProxy.multiblockRenderEvent.parent = tile.getPos();
MultiblockRenderEvent.anchor = new BlockPos(
this.tile.getPos().getX()
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetX() * 2,
this.tile.getPos().getY() - 1, this.tile.getPos().getZ()
- EnumFacing.getFront(this.tile.getFacingInt()).getFrontOffsetZ() * 2);
tile.getPos().getX() - EnumFacing.getFront(tile.getFacingInt()).getFrontOffsetX() * 2,
tile.getPos().getY() - 1,
tile.getPos().getZ() - EnumFacing.getFront(tile.getFacingInt()).getFrontOffsetZ() * 2);
}
} else {
ClientProxy.multiblockRenderEvent.setMultiblock(null);