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.

Furkan_S

Members
  • Joined

  • Last visited

Everything posted by Furkan_S

  1. I'm trying to make a TileEntity which will open a GUI that will have a GuiTextBox. I've managed to make packets that send the TextBox' data back to the server, but there is something weird. Code works perfectly in singleplayer, but packet handler is not even called when using a remote server. GUI code: @Override public void onGuiClosed() { System.out.println("onGuiClosed 1"); PacketHandler.INSTANCE.sendToServer(new UpdateTileFilter(tileEntity.getPos(), FilterInput.getText())); System.out.println("onGuiClosed 2"); super.onGuiClosed(); Keyboard.enableRepeatEvents(false); } Packet Handler: public IMessage onMessage(UpdateTileFilter message, MessageContext ctx) { System.out.println("is this even called?"); // this is not printed when using remote server EntityPlayerMP serverPlayer = ctx.getServerHandler().player; BlockPos pos = message.getBlockPos(); serverPlayer.getServerWorld().addScheduledTask(() -> { WorldServer sWorld = serverPlayer.getServerWorld(); if (sWorld == null || !sWorld.isBlockLoaded(pos)) { return; } TileEntity tile = sWorld.getTileEntity(pos); if (tile != null && tile instanceof TileEntityFilteredHopper) { TileEntityFilteredHopper customTile = (TileEntityFilteredHopper)tile; customTile.setFilters(message.filter); } }); return null; } Packet, block and tile are correctly registered. My tile is marked dirty whenever the "filter" changes. That's why everything works perfectly in singleplayer world, but NBT tag never changes on multiplayer (checking it out via commands)

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.