Minecraft制作GUI怪异的错误

我正在为Minecraft 1.8写一个Forge mod。 当我按下“Z”键时,3×3制作网格应该打开。 在我调用的KeyInputHandler中

@SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { if(KeyBindings.hackInv.isPressed()) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; World world = player.getEntityWorld(); BlockPos pos = player.getPosition(); player.openGui(CobaltCraft.instance, 0,world, (int) player.posX,(int) player.posY,(int) player.posZ); } } 

GuiHandler的代码是:

 @SubscribeEvent public void onKeyInput(InputEvent.KeyInputEvent event) throws NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { if(KeyBindings.hackInv.isPressed()) { EntityPlayer player = Minecraft.getMinecraft().thePlayer; World world = player.getEntityWorld(); BlockPos pos = player.getPosition(); player.openGui(CobaltCraft.instance, 0,world, (int) player.posX,(int) player.posY,(int) player.posZ); } } 

当我按下“z”键时,会出现Gui的显示。 但项目小故障。 我无法select它们(通过左键单击),有时项目只是改变地方。 如果我右键单击一个块上的制作物品,它会消失。 请帮助我,我不知道该怎么做,诺瓦