Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MisterGamer _

Members
  • Joined

  • Last visited

Everything posted by MisterGamer _

  1. You mean this? public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { BlockPos pos = new BlockPos(x, y, z); TileEntity te = world.getTileEntity(pos); if (te instanceof CompactorTileEntity) { return new CompactorContainer(player.inventory, (CompactorTileEntity) te); } return null; } public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { BlockPos pos = new BlockPos(x, y, z); TileEntity te = world.getTileEntity(pos); if (te instanceof CompactorTileEntity) { CompactorTileEntity containerTileEntity = (CompactorTileEntity) te; return new CompactorGui(containerTileEntity, new CompactorContainer(player.inventory, containerTileEntity)); } return null; }
  2. Hi everyone! I'm developing a Mod for Minecraft 1.12.2 and I have a block that needs a GUI, so i created it. The code is correct, but when i right-click a block to show the GUI, the GUI doesn't appear and in the Eclipse console i got the error "The client has sent too many requests within a certain amount of time". I have an idea of what cause this error: I think that it's caused by the onBlockActivated event of the block. Here's the onBlockActivated event code: @Override public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {{ if (worldIn.isRemote) { return true; } TileEntity te = worldIn.getTileEntity(pos); if (!(te instanceof CompactorTileEntity)) { return false; } playerIn.openGui(Main.instance, GUI_ID, worldIn, pos.getX(), pos.getY(), pos.getZ()); return true; } } Thanks to everyone will help me!

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.