use of me.desht.pneumaticcraft.common.tileentity.TileEntityRefinery in project pnc-repressurized by TeamPneumatic.
the class GuiRefinery method initGui.
@Override
public void initGui() {
super.initGui();
addWidget(new WidgetTemperature(-1, guiLeft + 32, guiTop + 20, 273, 673, te.getHeatExchangerLogic(null), 373));
addWidget(new WidgetTank(-1, guiLeft + 8, guiTop + 13, te.getInputTank()));
int x = guiLeft + 95;
int y = guiTop + 17;
addWidget(new WidgetTank(-1, x, y, te.getOutputTank()));
refineries = new ArrayList<>();
refineries.add(te);
TileEntityRefinery refinery = te;
while (refinery.getTileCache()[EnumFacing.UP.ordinal()].getTileEntity() instanceof TileEntityRefinery) {
refinery = (TileEntityRefinery) refinery.getTileCache()[EnumFacing.UP.ordinal()].getTileEntity();
x += 20;
y -= 4;
if (refineries.size() < 4)
addWidget(new WidgetTank(-1, x, y, refinery.getOutputTank()));
refineries.add(refinery);
}
if (refineries.size() < 2 || refineries.size() > 4) {
problemTab.openWindow();
}
}
use of me.desht.pneumaticcraft.common.tileentity.TileEntityRefinery in project pnc-repressurized by TeamPneumatic.
the class BlockRefinery method onBlockActivated.
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing side, float par7, float par8, float par9) {
TileEntityRefinery refinery = (TileEntityRefinery) world.getTileEntity(pos);
refinery = refinery.getMasterRefinery();
return super.onBlockActivated(world, refinery.getPos(), state, player, hand, side, par7, par8, par9);
}
Aggregations