Gui tabs cleanup
This commit is contained in:
parent
30a9aa2324
commit
3ca34f79a5
13 changed files with 273 additions and 284 deletions
|
@ -70,7 +70,7 @@ public class GuiAESU extends GuiBase<BuiltContainer> {
|
|||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
if(GuiBase.slotConfigType == SlotConfigType.NONE){
|
||||
if(!isTabOpen()){
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.scaled(0.6, 0.6, 1);
|
||||
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()) + "/"
|
||||
|
|
|
@ -54,7 +54,7 @@ public class GuiBatbox extends GuiBase<BuiltContainer> {
|
|||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
if(GuiBase.slotConfigType == SlotConfigType.NONE){
|
||||
if(!isTabOpen()){
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.scaled(0.6, 0.6, 5);
|
||||
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) blockEntity.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
|
||||
|
|
|
@ -34,8 +34,8 @@ import reborncore.client.gui.builder.GuiBase;
|
|||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.blockentity.machine.multiblock.IndustrialBlastFurnaceBlockEntity;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class GuiBlastFurnace extends GuiBase<BuiltContainer> {
|
||||
|
||||
|
@ -93,55 +93,54 @@ public class GuiBlastFurnace extends GuiBase<BuiltContainer> {
|
|||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double x, Double y){
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
this.addComponent(1, 1, 0, standardCasing, multiblock);
|
||||
this.addComponent(0, 1, 1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 1, 0, standardCasing, multiblock);
|
||||
this.addComponent(0, 1, -1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 1, -1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 1, 1, standardCasing, multiblock);
|
||||
this.addComponent(1, 1, -1, standardCasing, multiblock);
|
||||
this.addComponent(1, 1, 1, standardCasing, multiblock);
|
||||
this.addComponent(1, 1, 0, standardCasing, multiblock);
|
||||
this.addComponent(0, 1, 1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 1, 0, standardCasing, multiblock);
|
||||
this.addComponent(0, 1, -1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 1, -1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 1, 1, standardCasing, multiblock);
|
||||
this.addComponent(1, 1, -1, standardCasing, multiblock);
|
||||
this.addComponent(1, 1, 1, standardCasing, 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);
|
||||
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);
|
||||
|
||||
this.addComponent(0, 3, 0, standardCasing, multiblock);
|
||||
this.addComponent(1, 3, 0, standardCasing, multiblock);
|
||||
this.addComponent(0, 3, 1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 3, 0, standardCasing, multiblock);
|
||||
this.addComponent(0, 3, -1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 3, -1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 3, 1, standardCasing, multiblock);
|
||||
this.addComponent(1, 3, -1, standardCasing, multiblock);
|
||||
this.addComponent(1, 3, 1, standardCasing, multiblock);
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
this.addComponent(0, 3, 0, standardCasing, multiblock);
|
||||
this.addComponent(1, 3, 0, standardCasing, multiblock);
|
||||
this.addComponent(0, 3, 1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 3, 0, standardCasing, multiblock);
|
||||
this.addComponent(0, 3, -1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 3, -1, standardCasing, multiblock);
|
||||
this.addComponent(-1, 3, 1, standardCasing, multiblock);
|
||||
this.addComponent(1, 3, -1, standardCasing, multiblock);
|
||||
this.addComponent(1, 3, 1, standardCasing, multiblock);
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -59,9 +59,8 @@ public class GuiChunkLoader extends GuiBase<BuiltContainer> {
|
|||
super.drawBackground(partialTicks, mouseX, mouseY);
|
||||
final Layer layer = Layer.BACKGROUND;
|
||||
|
||||
if (GuiBase.slotConfigType != GuiBase.SlotConfigType.NONE) {
|
||||
return;
|
||||
}
|
||||
if (isTabOpen()) return;
|
||||
|
||||
String text = "Radius: " + blockEntity.getRadius();
|
||||
drawCentredString(text, 25, 4210752, layer);
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ import reborncore.client.gui.builder.GuiBase;
|
|||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.blockentity.machine.multiblock.DistillationTowerBlockEntity;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class GuiDistillationTower extends GuiBase<BuiltContainer> {
|
||||
|
||||
|
@ -82,57 +82,56 @@ public class GuiDistillationTower extends GuiBase<BuiltContainer> {
|
|||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double x, Double y){
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
|
||||
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);
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
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);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
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);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import reborncore.client.gui.builder.GuiBase;
|
|||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.blockentity.machine.multiblock.FluidReplicatorBlockEntity;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
/**
|
||||
* @author drcrazy
|
||||
|
@ -87,27 +87,26 @@ public class GuiFluidReplicator extends GuiBase<BuiltContainer> {
|
|||
|
||||
// GuiScreen
|
||||
public void onClick(GuiButtonExtended button, Double x, Double y){
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
final BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
final BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
|
||||
addComponent(1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, 1, reinforcedCasing, multiblock);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,12 +115,11 @@ public class GuiFusionReactor extends GuiBase<BuiltContainer> {
|
|||
}
|
||||
|
||||
public void hologramToggle(GuiButtonExtended button, double x, double y){
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
updateMultiBlockRender();
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
updateMultiBlockRender();
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,32 +101,31 @@ public class GuiGreenhouseController extends GuiBase<BuiltContainer> {
|
|||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double x, Double y) {
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState lamp = TRContent.Machine.LAMP_INCANDESCENT.block.getDefaultState().with(Properties.FACING, Direction.DOWN);
|
||||
BlockState crop = Blocks.CACTUS.getDefaultState();
|
||||
|
||||
this.addComponent(-3, 3, -3, lamp, multiblock);
|
||||
this.addComponent(-3, 3, 0, lamp, multiblock);
|
||||
this.addComponent(-3, 3, 3, lamp, multiblock);
|
||||
this.addComponent(0, 3, -3, lamp, multiblock);
|
||||
this.addComponent(0, 3, 0, lamp, multiblock);
|
||||
this.addComponent(0, 3, 3, lamp, multiblock);
|
||||
this.addComponent(3, 3, -3, lamp, multiblock);
|
||||
this.addComponent(3, 3, 0, lamp, multiblock);
|
||||
this.addComponent(3, 3, 3, lamp, multiblock);
|
||||
|
||||
for (int i = -4; i <= 4; i++) {
|
||||
for (int j = -4; j <= 4; j++) {
|
||||
this.addComponent(i, 0, j, crop, multiblock);
|
||||
}
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState lamp = TRContent.Machine.LAMP_INCANDESCENT.block.getDefaultState().with(Properties.FACING, Direction.DOWN);
|
||||
BlockState crop = Blocks.CACTUS.getDefaultState();
|
||||
|
||||
this.addComponent(-3, 3, -3, lamp, multiblock);
|
||||
this.addComponent(-3, 3, 0, lamp, multiblock);
|
||||
this.addComponent(-3, 3, 3, lamp, multiblock);
|
||||
this.addComponent(0, 3, -3, lamp, multiblock);
|
||||
this.addComponent(0, 3, 0, lamp, multiblock);
|
||||
this.addComponent(0, 3, 3, lamp, multiblock);
|
||||
this.addComponent(3, 3, -3, lamp, multiblock);
|
||||
this.addComponent(3, 3, 0, lamp, multiblock);
|
||||
this.addComponent(3, 3, 3, lamp, multiblock);
|
||||
|
||||
for (int i = -4; i <= 4; i++) {
|
||||
for (int j = -4; j <= 4; j++) {
|
||||
this.addComponent(i, 0, j, crop, multiblock);
|
||||
}
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ import reborncore.client.gui.builder.GuiBase;
|
|||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.blockentity.machine.multiblock.ImplosionCompressorBlockEntity;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class GuiImplosionCompressor extends GuiBase<BuiltContainer> {
|
||||
|
||||
|
@ -84,26 +84,25 @@ public class GuiImplosionCompressor extends GuiBase<BuiltContainer> {
|
|||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
for (int x = -1; x <= 1; x++) {
|
||||
for (int y = -4; y <= -2; y++) {
|
||||
for (int z = -1; z <= 1; z++) {
|
||||
if (!((x == 0) && (y == -3) && (z == 0))) {
|
||||
this.addComponent(x, y + 1, z, TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState(), multiblock);
|
||||
}
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
for (int x = -1; x <= 1; x++) {
|
||||
for (int y = -4; y <= -2; y++) {
|
||||
for (int z = -1; z <= 1; z++) {
|
||||
if (!((x == 0) && (y == -3) && (z == 0))) {
|
||||
this.addComponent(x, y + 1, z, TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState(), multiblock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ import reborncore.client.gui.builder.GuiBase;
|
|||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.blockentity.machine.multiblock.IndustrialGrinderBlockEntity;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class GuiIndustrialGrinder extends GuiBase<BuiltContainer> {
|
||||
|
||||
|
@ -89,50 +89,49 @@ public class GuiIndustrialGrinder extends GuiBase<BuiltContainer> {
|
|||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, double mouseX, double mouseY){
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, -1, 0, standardCasing, multiblock);
|
||||
addComponent(1, -1, 0, standardCasing, multiblock);
|
||||
addComponent(0, -1, 1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, 0, standardCasing, multiblock);
|
||||
addComponent(0, -1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, 1, standardCasing, multiblock);
|
||||
addComponent(1, -1, -1, standardCasing, multiblock);
|
||||
addComponent(1, -1, 1, standardCasing, multiblock);
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, 0, 0, Blocks.WATER.getDefaultState(), multiblock);
|
||||
addComponent(1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(0, -1, 0, standardCasing, multiblock);
|
||||
addComponent(1, -1, 0, standardCasing, multiblock);
|
||||
addComponent(0, -1, 1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, 0, standardCasing, multiblock);
|
||||
addComponent(0, -1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, 1, standardCasing, multiblock);
|
||||
addComponent(1, -1, -1, standardCasing, multiblock);
|
||||
addComponent(1, -1, 1, standardCasing, multiblock);
|
||||
|
||||
addComponent(0, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, 0, standardCasing, multiblock);
|
||||
addComponent(1, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, 1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, 1, standardCasing, multiblock);
|
||||
addComponent(1, 1, -1, standardCasing, multiblock);
|
||||
addComponent(1, 1, 1, standardCasing, multiblock);
|
||||
addComponent(0, 0, 0, Blocks.WATER.getDefaultState(), multiblock);
|
||||
addComponent(1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, 1, reinforcedCasing, multiblock);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
addComponent(0, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, 0, standardCasing, multiblock);
|
||||
addComponent(1, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, 1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, 1, standardCasing, multiblock);
|
||||
addComponent(1, 1, -1, standardCasing, multiblock);
|
||||
addComponent(1, 1, 1, standardCasing, multiblock);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -94,50 +94,49 @@ public class GuiIndustrialSawmill extends GuiBase<BuiltContainer> {
|
|||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, -1, 0, standardCasing, multiblock);
|
||||
addComponent(1, -1, 0, standardCasing, multiblock);
|
||||
addComponent(0, -1, 1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, 0, standardCasing, multiblock);
|
||||
addComponent(0, -1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, 1, standardCasing, multiblock);
|
||||
addComponent(1, -1, -1, standardCasing, multiblock);
|
||||
addComponent(1, -1, 1, standardCasing, multiblock);
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState();
|
||||
BlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, 0, 0, Blocks.WATER.getDefaultState(), multiblock);
|
||||
addComponent(1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(0, -1, 0, standardCasing, multiblock);
|
||||
addComponent(1, -1, 0, standardCasing, multiblock);
|
||||
addComponent(0, -1, 1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, 0, standardCasing, multiblock);
|
||||
addComponent(0, -1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, -1, 1, standardCasing, multiblock);
|
||||
addComponent(1, -1, -1, standardCasing, multiblock);
|
||||
addComponent(1, -1, 1, standardCasing, multiblock);
|
||||
|
||||
addComponent(0, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, 0, standardCasing, multiblock);
|
||||
addComponent(1, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, 1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, 1, standardCasing, multiblock);
|
||||
addComponent(1, 1, -1, standardCasing, multiblock);
|
||||
addComponent(1, 1, 1, standardCasing, multiblock);
|
||||
addComponent(0, 0, 0, Blocks.WATER.getDefaultState(), multiblock);
|
||||
addComponent(1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 0, reinforcedCasing, multiblock);
|
||||
addComponent(0, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(-1, 0, 1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, -1, reinforcedCasing, multiblock);
|
||||
addComponent(1, 0, 1, reinforcedCasing, multiblock);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
addComponent(0, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, 0, standardCasing, multiblock);
|
||||
addComponent(1, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, 1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, 0, standardCasing, multiblock);
|
||||
addComponent(0, 1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, -1, standardCasing, multiblock);
|
||||
addComponent(-1, 1, 1, standardCasing, multiblock);
|
||||
addComponent(1, 1, -1, standardCasing, multiblock);
|
||||
addComponent(1, 1, 1, standardCasing, multiblock);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class GuiMFE extends GuiBase<BuiltContainer> {
|
|||
super.drawForeground(mouseX, mouseY);
|
||||
final Layer layer = Layer.FOREGROUND;
|
||||
|
||||
if(GuiBase.slotConfigType == SlotConfigType.NONE){
|
||||
if(!isTabOpen()){
|
||||
RenderSystem.pushMatrix();
|
||||
RenderSystem.scaled(0.6, 0.6, 1);
|
||||
drawCentredString(PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getEnergy()) + "/" + PowerSystem.getLocaliszedPowerFormattedNoSuffix((int) mfe.getMaxPower()) + " " + PowerSystem.getDisplayPower().abbreviation, 35, 0, 58, layer);
|
||||
|
|
|
@ -27,14 +27,13 @@ package techreborn.client.gui;
|
|||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import reborncore.client.containerBuilder.builder.BuiltContainer;
|
||||
import reborncore.client.gui.builder.GuiBase;
|
||||
import reborncore.client.gui.builder.widget.GuiButtonExtended;
|
||||
import reborncore.client.gui.guibuilder.GuiBuilder;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.blockentity.machine.multiblock.VacuumFreezerBlockEntity;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
public class GuiVacuumFreezer extends GuiBase<BuiltContainer> {
|
||||
|
||||
|
@ -81,48 +80,47 @@ public class GuiVacuumFreezer extends GuiBase<BuiltContainer> {
|
|||
}
|
||||
|
||||
public void onClick(GuiButtonExtended button, Double mouseX, Double mouseY){
|
||||
if (GuiBase.slotConfigType == SlotConfigType.NONE) {
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
BlockState industrialCasing = TRContent.MachineBlocks.INDUSTRIAL.getCasing().getDefaultState();
|
||||
if (isTabOpen()) return;
|
||||
if (blockEntity.renderMultiblock == null) {
|
||||
{
|
||||
// This code here makes a basic multiblock and then sets to the selected one.
|
||||
final Multiblock multiblock = new Multiblock();
|
||||
BlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
|
||||
BlockState industrialCasing = TRContent.MachineBlocks.INDUSTRIAL.getCasing().getDefaultState();
|
||||
|
||||
addComponent(0, -1, 0, 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);
|
||||
|
||||
addComponent(1, -2, 0, industrialCasing, multiblock);
|
||||
addComponent(0, -2, 1, industrialCasing, multiblock);
|
||||
addComponent(-1, -2, 0, industrialCasing, multiblock);
|
||||
addComponent(0, -2, -1, industrialCasing, multiblock);
|
||||
addComponent(-1, -2, -1, industrialCasing, multiblock);
|
||||
addComponent(-1, -2, 1, industrialCasing, multiblock);
|
||||
addComponent(1, -2, -1, industrialCasing, multiblock);
|
||||
addComponent(1, -2, 1, industrialCasing, multiblock);
|
||||
addComponent(0, -1, 0, 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);
|
||||
|
||||
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);
|
||||
addComponent(1, -2, 0, industrialCasing, multiblock);
|
||||
addComponent(0, -2, 1, industrialCasing, multiblock);
|
||||
addComponent(-1, -2, 0, industrialCasing, multiblock);
|
||||
addComponent(0, -2, -1, industrialCasing, multiblock);
|
||||
addComponent(-1, -2, -1, industrialCasing, multiblock);
|
||||
addComponent(-1, -2, 1, industrialCasing, multiblock);
|
||||
addComponent(1, -2, -1, industrialCasing, multiblock);
|
||||
addComponent(1, -2, 1, industrialCasing, multiblock);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
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);
|
||||
|
||||
blockEntity.renderMultiblock = multiblock;
|
||||
}
|
||||
} else {
|
||||
blockEntity.renderMultiblock = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue