Merge remote-tracking branch 'remotes/origin/1.12' into 1.13-prep
# Conflicts: # build.gradle # src/main/java/techreborn/client/gui/GuiBlastFurnace.java # src/main/java/techreborn/client/gui/GuiDistillationTower.java # src/main/java/techreborn/client/gui/GuiFluidReplicator.java # src/main/java/techreborn/client/gui/GuiImplosionCompressor.java # src/main/java/techreborn/client/gui/GuiIndustrialGrinder.java # src/main/java/techreborn/client/gui/GuiIndustrialSawmill.java # src/main/java/techreborn/client/gui/GuiVacuumFreezer.java # src/main/java/techreborn/compat/CompatManager.java
This commit is contained in:
commit
4422fc7dc0
11 changed files with 35 additions and 104 deletions
|
@ -110,7 +110,7 @@ public class GuiAutoCrafting extends GuiBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
|
||||||
if (isPointInRect(145 + getGuiLeft(), 4 + getGuiTop(), 20, 12, mouseX, mouseY)) {
|
if (isPointInRect(145, 4, 20, 12, mouseX, mouseY)) {
|
||||||
NetworkManager.sendToServer(new PacketAutoCraftingTableLock(tileAutoCraftingTable, !tileAutoCraftingTable.locked));
|
NetworkManager.sendToServer(new PacketAutoCraftingTableLock(tileAutoCraftingTable, !tileAutoCraftingTable.locked));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,6 +74,9 @@ public class GuiBlastFurnace extends GuiBase {
|
||||||
drawOutputSlotBar(92, 36, 2, layer);
|
drawOutputSlotBar(92, 36, 2, layer);
|
||||||
|
|
||||||
builder.drawJEIButton(this, 158, 5, layer);
|
builder.drawJEIButton(this, 158, 5, layer);
|
||||||
|
if (hasMultiBlock) {
|
||||||
|
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -86,8 +89,7 @@ public class GuiBlastFurnace extends GuiBase {
|
||||||
|
|
||||||
builder.drawBigHeatBar(this, 31, 71, tile.getCachedHeat(), 3230, layer);
|
builder.drawBigHeatBar(this, 31, 71, tile.getCachedHeat(), 3230, layer);
|
||||||
if (hasMultiBlock) {
|
if (hasMultiBlock) {
|
||||||
addHologramButton(6, 4, 212, layer);
|
addHologramButton(4, 4, 212, layer);
|
||||||
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
|
||||||
} else {
|
} else {
|
||||||
builder.drawMultiblockMissingBar(this, layer);
|
builder.drawMultiblockMissingBar(this, layer);
|
||||||
addHologramButton(76, 56, 212, layer);
|
addHologramButton(76, 56, 212, layer);
|
||||||
|
@ -96,16 +98,6 @@ public class GuiBlastFurnace extends GuiBase {
|
||||||
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) 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) {
|
|
||||||
int factorX = 0;
|
|
||||||
int factorY = 0;
|
|
||||||
if (layer == Layer.BACKGROUND) {
|
|
||||||
factorX = guiLeft;
|
|
||||||
factorY = guiTop;
|
|
||||||
}
|
|
||||||
buttonList.add(new GuiButtonHologram(id, x + factorX, y + factorY, this, layer));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final GuiButton button) throws IOException {
|
public void actionPerformed(final GuiButton button) throws IOException {
|
||||||
super.actionPerformed(button);
|
super.actionPerformed(button);
|
||||||
|
|
|
@ -37,7 +37,6 @@ import reborncore.client.multiblock.Multiblock;
|
||||||
import reborncore.client.multiblock.MultiblockRenderEvent;
|
import reborncore.client.multiblock.MultiblockRenderEvent;
|
||||||
import reborncore.client.multiblock.MultiblockSet;
|
import reborncore.client.multiblock.MultiblockSet;
|
||||||
import techreborn.blocks.BlockMachineCasing;
|
import techreborn.blocks.BlockMachineCasing;
|
||||||
import reborncore.client.gui.builder.widget.GuiButtonHologram;
|
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
import techreborn.tiles.machine.multiblock.TileDistillationTower;
|
import techreborn.tiles.machine.multiblock.TileDistillationTower;
|
||||||
|
|
||||||
|
@ -81,7 +80,6 @@ public class GuiDistillationTower extends GuiBase {
|
||||||
final GuiBase.Layer layer = Layer.FOREGROUND;
|
final GuiBase.Layer layer = Layer.FOREGROUND;
|
||||||
|
|
||||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 55, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||||
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
|
||||||
if (tile.getMutliBlock()) {
|
if (tile.getMutliBlock()) {
|
||||||
addHologramButton(6, 4, 212, layer);
|
addHologramButton(6, 4, 212, layer);
|
||||||
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
||||||
|
@ -90,16 +88,8 @@ public class GuiDistillationTower extends GuiBase {
|
||||||
addHologramButton(76, 56, 212, layer);
|
addHologramButton(76, 56, 212, layer);
|
||||||
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
|
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, 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) {
|
|
||||||
int factorX = 0;
|
|
||||||
int factorY = 0;
|
|
||||||
if (layer == Layer.BACKGROUND) {
|
|
||||||
factorX = guiLeft;
|
|
||||||
factorY = guiTop;
|
|
||||||
}
|
|
||||||
buttonList.add(new GuiButtonHologram(id, x + factorX, y + factorY, this, layer));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -38,6 +38,7 @@ import reborncore.client.multiblock.MultiblockSet;
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
import techreborn.tiles.machine.multiblock.TileFluidReplicator;
|
import techreborn.tiles.machine.multiblock.TileFluidReplicator;
|
||||||
import reborncore.client.gui.builder.widget.GuiButtonHologram;
|
import reborncore.client.gui.builder.widget.GuiButtonHologram;
|
||||||
|
import techreborn.blocks.BlockMachineCasing;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@ -54,16 +55,6 @@ public class GuiFluidReplicator extends GuiBase {
|
||||||
this.tile = tile;
|
this.tile = tile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addHologramButton(int x, int y, int id, Layer layer) {
|
|
||||||
int factorX = 0;
|
|
||||||
int factorY = 0;
|
|
||||||
if (layer == Layer.BACKGROUND) {
|
|
||||||
factorX = guiLeft;
|
|
||||||
factorY = guiTop;
|
|
||||||
}
|
|
||||||
buttonList.add(new GuiButtonHologram(id, x + factorX, y + factorY, this, layer));
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
public void addComponent(final int x, final int y, final int z, final IBlockState blockState, final Multiblock multiblock) {
|
||||||
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
multiblock.addComponent(new BlockPos(x, y, z), blockState);
|
||||||
}
|
}
|
||||||
|
@ -89,6 +80,9 @@ public class GuiFluidReplicator extends GuiBase {
|
||||||
drawSlot(124, 55, layer);
|
drawSlot(124, 55, layer);
|
||||||
// JEI button
|
// JEI button
|
||||||
builder.drawJEIButton(this, 158, 5, layer);
|
builder.drawJEIButton(this, 158, 5, layer);
|
||||||
|
if (tile.getMultiBlock()) {
|
||||||
|
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -98,15 +92,14 @@ public class GuiFluidReplicator extends GuiBase {
|
||||||
|
|
||||||
builder.drawTank(this, 99, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer);
|
builder.drawTank(this, 99, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer);
|
||||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||||
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
|
||||||
if (tile.getMultiBlock()) {
|
if (tile.getMultiBlock()) {
|
||||||
addHologramButton(6, 4, 212, layer);
|
addHologramButton(6, 4, 212, layer);
|
||||||
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
|
||||||
} else {
|
} else {
|
||||||
builder.drawMultiblockMissingBar(this, layer);
|
builder.drawMultiblockMissingBar(this, layer);
|
||||||
addHologramButton(76, 56, 212, layer);
|
addHologramButton(76, 56, 212, layer);
|
||||||
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
|
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
|
||||||
}
|
}
|
||||||
|
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GuiScreen
|
// GuiScreen
|
||||||
|
|
|
@ -38,7 +38,6 @@ import reborncore.client.multiblock.MultiblockSet;
|
||||||
import reborncore.common.network.NetworkManager;
|
import reborncore.common.network.NetworkManager;
|
||||||
import reborncore.common.powerSystem.PowerSystem;
|
import reborncore.common.powerSystem.PowerSystem;
|
||||||
import reborncore.common.util.Torus;
|
import reborncore.common.util.Torus;
|
||||||
import reborncore.client.gui.builder.widget.GuiButtonHologram;
|
|
||||||
import reborncore.client.gui.builder.widget.GuiButtonUpDown;
|
import reborncore.client.gui.builder.widget.GuiButtonUpDown;
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
import techreborn.packets.PacketFusionControlSize;
|
import techreborn.packets.PacketFusionControlSize;
|
||||||
|
@ -67,6 +66,9 @@ public class GuiFusionReactor extends GuiBase {
|
||||||
drawOutputSlot(80, 47, layer);
|
drawOutputSlot(80, 47, layer);
|
||||||
|
|
||||||
builder.drawJEIButton(this, 158, 5, layer);
|
builder.drawJEIButton(this, 158, 5, layer);
|
||||||
|
if (tile.getCoilStatus() > 0) {
|
||||||
|
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -79,7 +81,6 @@ public class GuiFusionReactor extends GuiBase {
|
||||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer);
|
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 51, mouseX, mouseY, GuiBuilder.ProgressDirection.LEFT, layer);
|
||||||
if (tile.getCoilStatus() > 0) {
|
if (tile.getCoilStatus() > 0) {
|
||||||
addHologramButton(6, 4, 212, layer);
|
addHologramButton(6, 4, 212, layer);
|
||||||
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
|
||||||
drawCentredString(tile.getStateString(), 20, Color.BLUE.darker().getRGB(), layer);
|
drawCentredString(tile.getStateString(), 20, Color.BLUE.darker().getRGB(), layer);
|
||||||
if(tile.state == 2){
|
if(tile.state == 2){
|
||||||
drawCentredString( PowerSystem.getLocaliszedPowerFormatted((int) tile.getPowerChange()) + "/t", 30, Color.GREEN.darker().getRGB(), layer);
|
drawCentredString( PowerSystem.getLocaliszedPowerFormatted((int) tile.getPowerChange()) + "/t", 30, Color.GREEN.darker().getRGB(), layer);
|
||||||
|
@ -111,16 +112,6 @@ public class GuiFusionReactor extends GuiBase {
|
||||||
builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
builder.drawMultiEnergyBar(this, 9, 19, (int) this.tile.getEnergy(), (int) this.tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addHologramButton(int x, int y, int id, Layer layer) {
|
|
||||||
int factorX = 0;
|
|
||||||
int factorY = 0;
|
|
||||||
if (layer == Layer.BACKGROUND) {
|
|
||||||
factorX = guiLeft;
|
|
||||||
factorY = guiTop;
|
|
||||||
}
|
|
||||||
buttonList.add(new GuiButtonHologram(id, x + factorX, y + factorY, this, layer));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(final GuiButton button) throws IOException {
|
public void actionPerformed(final GuiButton button) throws IOException {
|
||||||
super.actionPerformed(button);
|
super.actionPerformed(button);
|
||||||
|
|
|
@ -84,7 +84,6 @@ public class GuiImplosionCompressor extends GuiBase {
|
||||||
final GuiBase.Layer layer = Layer.FOREGROUND;
|
final GuiBase.Layer layer = Layer.FOREGROUND;
|
||||||
|
|
||||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 71, 40, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||||
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
|
||||||
if (tile.getMutliBlock()) {
|
if (tile.getMutliBlock()) {
|
||||||
addHologramButton(6, 4, 212, layer);
|
addHologramButton(6, 4, 212, layer);
|
||||||
} else {
|
} else {
|
||||||
|
@ -92,16 +91,8 @@ public class GuiImplosionCompressor extends GuiBase {
|
||||||
addHologramButton(76, 56, 212, layer);
|
addHologramButton(76, 56, 212, layer);
|
||||||
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
|
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, 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) {
|
|
||||||
int factorX = 0;
|
|
||||||
int factorY = 0;
|
|
||||||
if (layer == Layer.BACKGROUND) {
|
|
||||||
factorX = guiLeft;
|
|
||||||
factorY = guiTop;
|
|
||||||
}
|
|
||||||
buttonList.add(new GuiButtonHologram(id, x + factorX, y + factorY, this, layer));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -78,6 +78,9 @@ public class GuiIndustrialGrinder extends GuiBase {
|
||||||
drawSlot(126, 72, layer);
|
drawSlot(126, 72, layer);
|
||||||
|
|
||||||
builder.drawJEIButton(this, 158, 5, layer);
|
builder.drawJEIButton(this, 158, 5, layer);
|
||||||
|
if (tile.getMultiBlock()) {
|
||||||
|
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -87,25 +90,14 @@ public class GuiIndustrialGrinder extends GuiBase {
|
||||||
|
|
||||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||||
builder.drawTank(this, 53, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer);
|
builder.drawTank(this, 53, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer);
|
||||||
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
if (tile.getMultiBlock()) {
|
||||||
if (tile.getMutliBlock()) {
|
|
||||||
addHologramButton(6, 4, 212, layer);
|
addHologramButton(6, 4, 212, layer);
|
||||||
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
|
||||||
} else {
|
} else {
|
||||||
builder.drawMultiblockMissingBar(this, layer);
|
builder.drawMultiblockMissingBar(this, layer);
|
||||||
addHologramButton(76, 56, 212, layer);
|
addHologramButton(76, 56, 212, layer);
|
||||||
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
|
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, 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) {
|
|
||||||
int factorX = 0;
|
|
||||||
int factorY = 0;
|
|
||||||
if (layer == Layer.BACKGROUND) {
|
|
||||||
factorX = guiLeft;
|
|
||||||
factorY = guiTop;
|
|
||||||
}
|
|
||||||
buttonList.add(new GuiButtonHologram(id, x + factorX, y + factorY, this, layer));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -37,7 +37,6 @@ import reborncore.client.multiblock.Multiblock;
|
||||||
import reborncore.client.multiblock.MultiblockRenderEvent;
|
import reborncore.client.multiblock.MultiblockRenderEvent;
|
||||||
import reborncore.client.multiblock.MultiblockSet;
|
import reborncore.client.multiblock.MultiblockSet;
|
||||||
import techreborn.blocks.BlockMachineCasing;
|
import techreborn.blocks.BlockMachineCasing;
|
||||||
import reborncore.client.gui.builder.widget.GuiButtonHologram;
|
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
import techreborn.tiles.machine.multiblock.TileIndustrialSawmill;
|
import techreborn.tiles.machine.multiblock.TileIndustrialSawmill;
|
||||||
|
|
||||||
|
@ -77,6 +76,9 @@ public class GuiIndustrialSawmill extends GuiBase {
|
||||||
drawSlot(126, 61, layer);
|
drawSlot(126, 61, layer);
|
||||||
|
|
||||||
builder.drawJEIButton(this, 158, 5, layer);
|
builder.drawJEIButton(this, 158, 5, layer);
|
||||||
|
if (tile.getMutliBlock()) {
|
||||||
|
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -86,25 +88,14 @@ public class GuiIndustrialSawmill extends GuiBase {
|
||||||
|
|
||||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 105, 47, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||||
builder.drawTank(this, 53, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer);
|
builder.drawTank(this, 53, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), layer);
|
||||||
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
|
||||||
if (tile.getMutliBlock()) {
|
if (tile.getMutliBlock()) {
|
||||||
addHologramButton(6, 4, 212, layer);
|
addHologramButton(6, 4, 212, layer);
|
||||||
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
|
||||||
} else {
|
} else {
|
||||||
builder.drawMultiblockMissingBar(this, layer);
|
builder.drawMultiblockMissingBar(this, layer);
|
||||||
addHologramButton(76, 56, 212, layer);
|
addHologramButton(76, 56, 212, layer);
|
||||||
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
|
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, 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) {
|
|
||||||
int factorX = 0;
|
|
||||||
int factorY = 0;
|
|
||||||
if (layer == Layer.BACKGROUND) {
|
|
||||||
factorX = guiLeft;
|
|
||||||
factorY = guiTop;
|
|
||||||
}
|
|
||||||
buttonList.add(new GuiButtonHologram(id, x + factorX, y + factorY, this, layer));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class GuiRollingMachine extends GuiBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
|
||||||
if(isPointInRect(130 + getGuiLeft(), 4 + getGuiTop(), 20, 12, mouseX, mouseY)){
|
if(isPointInRect(130, 4, 20, 12, mouseX, mouseY)){
|
||||||
NetworkManager.sendToServer(new PacketRollingMachineLock(rollingMachine, !rollingMachine.locked));
|
NetworkManager.sendToServer(new PacketRollingMachineLock(rollingMachine, !rollingMachine.locked));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,6 @@ import reborncore.client.multiblock.Multiblock;
|
||||||
import reborncore.client.multiblock.MultiblockRenderEvent;
|
import reborncore.client.multiblock.MultiblockRenderEvent;
|
||||||
import reborncore.client.multiblock.MultiblockSet;
|
import reborncore.client.multiblock.MultiblockSet;
|
||||||
import techreborn.blocks.BlockMachineCasing;
|
import techreborn.blocks.BlockMachineCasing;
|
||||||
import reborncore.client.gui.builder.widget.GuiButtonHologram;
|
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
import techreborn.tiles.machine.multiblock.TileVacuumFreezer;
|
import techreborn.tiles.machine.multiblock.TileVacuumFreezer;
|
||||||
|
|
||||||
|
@ -70,6 +69,9 @@ public class GuiVacuumFreezer extends GuiBase {
|
||||||
drawOutputSlot(101, 45, layer);
|
drawOutputSlot(101, 45, layer);
|
||||||
|
|
||||||
builder.drawJEIButton(this, 158, 5, layer);
|
builder.drawJEIButton(this, 158, 5, layer);
|
||||||
|
if (tile.getMultiBlock()) {
|
||||||
|
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -78,25 +80,14 @@ public class GuiVacuumFreezer extends GuiBase {
|
||||||
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
|
||||||
|
|
||||||
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, layer);
|
||||||
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
|
|
||||||
if (tile.getMultiBlock()) {
|
if (tile.getMultiBlock()) {
|
||||||
addHologramButton(6, 4, 212, layer);
|
addHologramButton(6, 4, 212, layer);
|
||||||
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
|
|
||||||
} else {
|
} else {
|
||||||
builder.drawMultiblockMissingBar(this, layer);
|
builder.drawMultiblockMissingBar(this, layer);
|
||||||
addHologramButton(76, 56, 212, layer);
|
addHologramButton(76, 56, 212, layer);
|
||||||
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, layer);
|
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, 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) {
|
|
||||||
int factorX = 0;
|
|
||||||
int factorY = 0;
|
|
||||||
if (layer == Layer.BACKGROUND) {
|
|
||||||
factorX = guiLeft;
|
|
||||||
factorY = guiTop;
|
|
||||||
}
|
|
||||||
buttonList.add(new GuiButtonHologram(id, x + factorX, y + factorY, this, layer));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -76,7 +76,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
|
||||||
this.ticksSinceLastChange = 0;
|
this.ticksSinceLastChange = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean getMutliBlock() {
|
public boolean getMultiBlock() {
|
||||||
if (multiblockChecker == null) {
|
if (multiblockChecker == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
|
||||||
ticksSinceLastChange = 0;
|
ticksSinceLastChange = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!world.isRemote && getMutliBlock()) {
|
if (!world.isRemote && getMultiBlock()) {
|
||||||
super.update();
|
super.update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
|
||||||
// ITileRecipeHandler
|
// ITileRecipeHandler
|
||||||
@Override
|
@Override
|
||||||
public boolean canCraft(final TileEntity tile, final IndustrialGrinderRecipe recipe) {
|
public boolean canCraft(final TileEntity tile, final IndustrialGrinderRecipe recipe) {
|
||||||
if (!getMutliBlock()) {
|
if (!getMultiBlock()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
final FluidStack recipeFluid = recipe.fluidStack;
|
final FluidStack recipeFluid = recipe.fluidStack;
|
||||||
|
|
Loading…
Reference in a new issue