@SideOnly(Side.CLIENT) @Override public IIcon getIcon(IBlockAccess ba, int x, int y, int z, int side) { TileEntity tile = ba.getTileEntity(x, y, z); if (tile != null && tile instanceof TileFissionReactor) { TileFissionReactor tf = (TileFissionReactor) tile; if (tf.hasMaster()) { return active; } } return super.getIcon(ba, x, y, z, side); }
@Override public boolean onBlockActivated( World w, int x, int y, int z, EntityPlayer p, int meta, float cx, float cy, float cz) { TileEntity tile = w.getTileEntity(x, y, z); if (tile != null && tile instanceof TileFissionReactor) { TileFissionReactor cl = (TileFissionReactor) tile; if (cl.hasMaster() && cl.checkForMaster()) { int mX = cl.getMasterX(), mY = cl.getMasterY(), mZ = cl.getMasterZ(); TileFissionReactor mas = (TileFissionReactor) w.getTileEntity(mX, mY, mZ); p.openGui(MineRad.ins, MachineReference.FISSION_REACTOR_ID, w, mX, mY, mZ); return true; } } return false; }