Posted May 16, 201510 yr Hey everyone i have been trying to make an RF powered tile entity with a gui but i cant get the gui to open. I think this may be a problem with my gui handler but i am not sure. My handler: http://pastebin.com/BjDRD1NV BioWarfare Mod: http://goo.gl/BYWQty
May 16, 201510 yr Hey Could you post your block.class and tileEntity.class? There are more things that can cause this problem. Also did you register your guiHandler? As for now, the guiHandler seems oke to me. Projects: Discontinued: - N2ConfigAPI - Meachanical Crafting Table Latest: - CollectionUtils Coöperations: - InGameConfigManager
May 16, 201510 yr Author Block Class: http://pastebin.com/y0qLGf30 TileEntity Class: http://pastebin.com/y0qLGf30 BioWarfare Mod: http://goo.gl/BYWQty
May 18, 201510 yr Author Opps Sorry Block File: http://pastebin.com/f6W7CUiJ TileEntity: http://pastebin.com/0ZgEEEns Gui: http://pastebin.com/eehwwED3 BioWarfare Mod: http://goo.gl/BYWQty
May 18, 201510 yr Author The container base: http://pastebin.com/1uGinLtq The container: http://pastebin.com/LrKS2p0e BioWarfare Mod: http://goo.gl/BYWQty
May 18, 201510 yr Author It seems that: public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) { super.onBlockActivated(world, pos, state, player, side, hitX, hitY, hitZ); if (world.isRemote) return true; else { TileEntity tile = world.getTileEntity(pos); if (tile != null) { player.openGui(BioWarfare.instance, BioWarfareGuiHandler.MICROBE_EXTRACTOR_GUI_ID, world, pos.getX(), pos.getY(), pos.getZ()); System.out.println("Block Activated"); } } return true; } Gets called fine but when we get to the guihandler: @Override public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { BlockPos pos = BlockPos.ORIGIN; if (id == MICROBE_EXTRACTOR_GUI_ID) { TileEntity tileEntity = world.getTileEntity(new BlockPos(x, y, z)); if (tileEntity instanceof TileEntityMicrobeExtractor) { System.out.println("Debugger Server Container"); return new ContainerMicrobeExtractor(player.inventory, (TileEntityMicrobeExtractor) tileEntity); } } return null; } @Override public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z) { if (id == MICROBE_EXTRACTOR_GUI_ID) { TileEntity tileEntity = world.getTileEntity(new BlockPos(x, y, z)); if (tileEntity instanceof TileEntityMicrobeExtractor) { System.out.println("Debugger Client Gui"); return new GuiMicrobeExtractor(player.inventory, (TileEntityMicrobeExtractor) tileEntity); } } return null; } Neither of these get called. Does anyone know why this might be? BioWarfare Mod: http://goo.gl/BYWQty
May 18, 201510 yr Author As you can see here is register it in the Init were you are meant to. http://pastebin.com/TNAq4yad BioWarfare Mod: http://goo.gl/BYWQty
May 18, 201510 yr Author Referance Class: http://pastebin.com/UinsbTyn BioWarfare Mod: http://goo.gl/BYWQty
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.