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.

glassManMCID20

Members
  • Joined

  • Last visited

Everything posted by glassManMCID20

  1. You beautiful bastard you That has probably been my problem the whole time Changed it to use the message provided players reference to the world, final TileEntityDuplicationTable entity =((TileEntityDuplicationTable) player.world.getTileEntity(message.blockPosition)); passed from the message context It seems to be duplicating without issue now, i can relog, pick it up everything! Robetusxd, I hope this helped, or that Draco18s helps you too.
  2. Actually, that was the point i got to that is beyond me. I can debug, i can get console messages, i can check locals and function returns... and while the message context says its on the server, but forge documentation says you can't use the in-code like Side or world.isRemote methods to double check that, and when i do use them they say its on the client And i have made sure the message is being registered to execute on the server, and its only called in one place on the client //registration INSTANCE.registerMessage(MessageCustomButtonPressed.MessageCustonButtonPressedHandler.class, MessageCustomButtonPressed.class, 0, Side.SERVER); //only on button press ModNetworkHandler.sendToServer(new MessageCustomButtonPressed(GUIHandler.GuiIDs.DUPLICATIONTABLE.ordinal(), myTable.getPos())); //message handling @Override public IMessage onMessage(MessageCustomButtonPressed message, MessageContext ctx) { EntityPlayerMP serverPlayer = ctx.getServerHandler().playerEntity; if(ctx.side == Side.SERVER) { handleServerSide(message, serverPlayer); } return null; } public void handleServerSide(MessageCustomButtonPressed message, EntityPlayer player) { switch(GUIHandler.GuiIDs.values()[message.guiID]){ case DUPLICATIONTABLE: System.out.println("You pressed the dupe button"); final TileEntityDuplicationTable entity =((TileEntityDuplicationTable) Minecraft.getMinecraft().world.getTileEntity(message.blockPosition)); player.getServer().addScheduledTask(new Runnable() { @Override public void run() { entity.duplicate(); } }); break; default: break; } } The entity duplicate function IS being called once, but like i said the methods i know of think its on the client side, while the message context ctx say its server side
  3. Are you me? I have been struggling with this for a week now everything gets registered fine, the game loads fine, the console prints out fine, the functions get called fine, the new item even stacks on itself fine, the new item just evaporates when i try to move it, or when i reload the gui.

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.