Changes in GUI for Freezer multiblock. Closes #1672

This commit is contained in:
drcrazy 2019-04-01 15:57:08 +03:00
parent 080e305efe
commit 67c9c8721e
2 changed files with 32 additions and 12 deletions

View file

@ -93,17 +93,37 @@ public class GuiVacuumFreezer extends GuiBase {
{
// This code here makes a basic multiblock and then sets to the selected one.
final Multiblock multiblock = new Multiblock();
IBlockState reinforcedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
IBlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState();
IBlockState industrialCasing = TRContent.MachineBlocks.INDUSTRIAL.getCasing().getDefaultState();
addComponent(0, -1, 0, reinforcedCasing, multiblock);
addComponent(1, -1, 0, reinforcedCasing, multiblock);
addComponent(0, -1, 1, reinforcedCasing, multiblock);
addComponent(-1, -1, 0, reinforcedCasing, multiblock);
addComponent(0, -1, -1, reinforcedCasing, multiblock);
addComponent(-1, -1, -1, reinforcedCasing, multiblock);
addComponent(-1, -1, 1, reinforcedCasing, multiblock);
addComponent(1, -1, -1, reinforcedCasing, multiblock);
addComponent(1, -1, 1, reinforcedCasing, 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(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, -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);

View file

@ -62,8 +62,8 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP
return false;
}
final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET);
final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 2, 0));
final boolean chamber = multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, 1, 0));
final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, -2, 0));
final boolean chamber = multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, -1, 0));
return down && chamber && up;
}