public void drawScreen(int par1, int par2, float par3) { super.drawScreen(par1, par2, par3); boolean op = false; // TODO: Check if player is OP if (Keyboard.isKeyDown(Keyboard.KEY_O) && op) { player.openGui(ModUncrafting.instance, 1, worldObj, x, y, z); } }
@Override public boolean onBlockActivated( World world, int x, int y, int z, EntityPlayer entityplayer, int side, float hitX, float hitY, float hitZ) { super.onBlockActivated(world, x, y, z, entityplayer, side, hitX, hitY, hitZ); TileEntityQuern te = (TileEntityQuern) world.getBlockTileEntity(x, y, z); if (!world.isRemote) { if (!te.shouldRotate && hitX >= 0.65 && hitZ >= 0.65 && te.storage[2] != null) { te.shouldRotate = true; world.playSoundEffect(x, y, z, TFC_Sounds.STONEDRAG, 1, 1); } else if ((!te.shouldRotate && (hitX < 0.65 || hitZ < 0.65)) || te.storage[2] == null) { entityplayer.openGui(TerraFirmaCraft.instance, 33, world, x, y, z); } } else if (!te.shouldRotate && hitX >= 0.65 && hitZ >= 0.65 && te.hasQuern) { te.shouldRotate = true; } return true; }