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:
modmuss50 2019-01-12 12:08:28 +00:00
commit 4422fc7dc0
11 changed files with 35 additions and 104 deletions

View file

@ -110,7 +110,7 @@ public class GuiAutoCrafting extends GuiBase {
@Override
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));
return;
}

View file

@ -74,6 +74,9 @@ public class GuiBlastFurnace extends GuiBase {
drawOutputSlotBar(92, 36, 2, layer);
builder.drawJEIButton(this, 158, 5, layer);
if (hasMultiBlock) {
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
}
}
@Override
@ -86,8 +89,7 @@ public class GuiBlastFurnace extends GuiBase {
builder.drawBigHeatBar(this, 31, 71, tile.getCachedHeat(), 3230, layer);
if (hasMultiBlock) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
addHologramButton(4, 4, 212, layer);
} else {
builder.drawMultiblockMissingBar(this, 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);
}
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
public void actionPerformed(final GuiButton button) throws IOException {
super.actionPerformed(button);

View file

@ -37,7 +37,6 @@ import reborncore.client.multiblock.Multiblock;
import reborncore.client.multiblock.MultiblockRenderEvent;
import reborncore.client.multiblock.MultiblockSet;
import techreborn.blocks.BlockMachineCasing;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileDistillationTower;
@ -81,7 +80,6 @@ public class GuiDistillationTower extends GuiBase {
final GuiBase.Layer layer = Layer.FOREGROUND;
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()) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
@ -90,18 +88,10 @@ public class GuiDistillationTower extends GuiBase {
addHologramButton(76, 56, 212, 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
public void actionPerformed(final GuiButton button) throws IOException {
super.actionPerformed(button);

View file

@ -38,6 +38,7 @@ import reborncore.client.multiblock.MultiblockSet;
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileFluidReplicator;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import techreborn.blocks.BlockMachineCasing;
import java.io.IOException;
@ -54,16 +55,6 @@ public class GuiFluidReplicator extends GuiBase {
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) {
multiblock.addComponent(new BlockPos(x, y, z), blockState);
}
@ -89,6 +80,9 @@ public class GuiFluidReplicator extends GuiBase {
drawSlot(124, 55, layer);
// JEI button
builder.drawJEIButton(this, 158, 5, layer);
if (tile.getMultiBlock()) {
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
}
}
@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.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()) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
} else {
builder.drawMultiblockMissingBar(this, layer);
addHologramButton(76, 56, 212, 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

View file

@ -38,7 +38,6 @@ import reborncore.client.multiblock.MultiblockSet;
import reborncore.common.network.NetworkManager;
import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.util.Torus;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import reborncore.client.gui.builder.widget.GuiButtonUpDown;
import techreborn.init.TRContent;
import techreborn.packets.PacketFusionControlSize;
@ -67,6 +66,9 @@ public class GuiFusionReactor extends GuiBase {
drawOutputSlot(80, 47, 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);
if (tile.getCoilStatus() > 0) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
drawCentredString(tile.getStateString(), 20, Color.BLUE.darker().getRGB(), layer);
if(tile.state == 2){
drawCentredString( PowerSystem.getLocaliszedPowerFormatted((int) tile.getPowerChange()) + "/t", 30, Color.GREEN.darker().getRGB(), layer);
@ -110,17 +111,7 @@ public class GuiFusionReactor extends GuiBase {
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
public void actionPerformed(final GuiButton button) throws IOException {
super.actionPerformed(button);

View file

@ -84,7 +84,6 @@ public class GuiImplosionCompressor extends GuiBase {
final GuiBase.Layer layer = Layer.FOREGROUND;
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()) {
addHologramButton(6, 4, 212, layer);
} else {
@ -92,16 +91,8 @@ public class GuiImplosionCompressor extends GuiBase {
addHologramButton(76, 56, 212, 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

View file

@ -78,6 +78,9 @@ public class GuiIndustrialGrinder extends GuiBase {
drawSlot(126, 72, layer);
builder.drawJEIButton(this, 158, 5, layer);
if (tile.getMultiBlock()) {
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
}
}
@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.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.getMultiBlock()) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
} else {
builder.drawMultiblockMissingBar(this, layer);
addHologramButton(76, 56, 212, layer);
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, 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));
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
@Override

View file

@ -37,7 +37,6 @@ import reborncore.client.multiblock.Multiblock;
import reborncore.client.multiblock.MultiblockRenderEvent;
import reborncore.client.multiblock.MultiblockSet;
import techreborn.blocks.BlockMachineCasing;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileIndustrialSawmill;
@ -77,6 +76,9 @@ public class GuiIndustrialSawmill extends GuiBase {
drawSlot(126, 61, layer);
builder.drawJEIButton(this, 158, 5, layer);
if (tile.getMutliBlock()) {
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
}
}
@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.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()) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
} else {
builder.drawMultiblockMissingBar(this, layer);
addHologramButton(76, 56, 212, layer);
builder.drawHologramButton(this, 76, 56, mouseX, mouseY, 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));
builder.drawMultiEnergyBar(this, 9, 19, (int) tile.getEnergy(), (int) tile.getMaxPower(), mouseX, mouseY, 0, layer);
}
@Override

View file

@ -76,7 +76,7 @@ public class GuiRollingMachine extends GuiBase {
@Override
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));
return;
}

View file

@ -35,7 +35,6 @@ import reborncore.client.multiblock.Multiblock;
import reborncore.client.multiblock.MultiblockRenderEvent;
import reborncore.client.multiblock.MultiblockSet;
import techreborn.blocks.BlockMachineCasing;
import reborncore.client.gui.builder.widget.GuiButtonHologram;
import techreborn.init.TRContent;
import techreborn.tiles.machine.multiblock.TileVacuumFreezer;
@ -70,6 +69,9 @@ public class GuiVacuumFreezer extends GuiBase {
drawOutputSlot(101, 45, layer);
builder.drawJEIButton(this, 158, 5, layer);
if (tile.getMultiBlock()) {
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
}
}
@Override
@ -78,27 +80,16 @@ public class GuiVacuumFreezer extends GuiBase {
final GuiBase.Layer layer = GuiBase.Layer.FOREGROUND;
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()) {
addHologramButton(6, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
} else {
builder.drawMultiblockMissingBar(this, layer);
addHologramButton(76, 56, 212, 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
public void actionPerformed(final GuiButton button) throws IOException {
super.actionPerformed(button);

View file

@ -76,7 +76,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
this.ticksSinceLastChange = 0;
}
public boolean getMutliBlock() {
public boolean getMultiBlock() {
if (multiblockChecker == null) {
return false;
}
@ -117,7 +117,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
ticksSinceLastChange = 0;
}
if (!world.isRemote && getMutliBlock()) {
if (!world.isRemote && getMultiBlock()) {
super.update();
}
@ -157,7 +157,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
// ITileRecipeHandler
@Override
public boolean canCraft(final TileEntity tile, final IndustrialGrinderRecipe recipe) {
if (!getMutliBlock()) {
if (!getMultiBlock()) {
return false;
}
final FluidStack recipeFluid = recipe.fluidStack;