Draw hologram button on background

This commit is contained in:
drcrazy 2018-12-30 22:31:52 +03:00
parent 03fdbe49a6
commit 3df454789f
7 changed files with 22 additions and 10 deletions

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
@ -87,7 +90,6 @@ public class GuiBlastFurnace extends GuiBase {
builder.drawBigHeatBar(this, 31, 71, tile.getCachedHeat(), 3230, layer);
if (hasMultiBlock) {
addHologramButton(4, 4, 212, layer);
builder.drawHologramButton(this, 6, 4, mouseX, mouseY, layer);
} else {
builder.drawMultiblockMissingBar(this, layer);
addHologramButton(76, 56, 212, layer);

View file

@ -90,6 +90,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
@ -101,7 +104,6 @@ public class GuiFluidReplicator extends GuiBase {
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, 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);

View file

@ -73,6 +73,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);
}
}
@ -85,7 +88,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);

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,9 +90,8 @@ 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);
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);

View file

@ -77,6 +77,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
@ -88,7 +91,6 @@ public class GuiIndustrialSawmill extends GuiBase {
builder.drawTank(this, 53, 25, mouseX, mouseY, tile.tank.getFluid(), tile.tank.getCapacity(), tile.tank.isEmpty(), 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);

View file

@ -70,6 +70,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
@ -80,7 +83,6 @@ public class GuiVacuumFreezer extends GuiBase {
builder.drawProgressBar(this, tile.getProgressScaled(100), 100, 76, 48, mouseX, mouseY, GuiBuilder.ProgressDirection.RIGHT, 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);

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;
}
@ -108,7 +108,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
ticksSinceLastChange = 0;
}
if (!world.isRemote && getMutliBlock()) {
if (!world.isRemote && getMultiBlock()) {
super.update();
}
@ -155,7 +155,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;