Posted July 1, 20178 yr Hey MinecraftForge i have question, with something i have been trying to fix for the past hours, so i have created a beacon replica, shamelessly taken all the BlockBeacon, ContainerBeacon, etc. and copied them over, changed the referrals and registrered all the classes but it still dont work as planned. So when i put in the payment item (iron, diamond..) and clicks okay in the gui the item pops out and nothing happens. But i think i found the flaw, when you click that button in the gui, it executes this code, where it sends the primary and secondary potion effect to the server as the gui code on executes on the client. Well my question in basically how to i intercept that message so i can run the appropriate code on the server
July 1, 20178 yr Unfortunately i was not able to see your image, (It is corrupted or something), but the simple answer is: You don't intercept the packet, but create a new one and run your code in it's handler. Here is a tutorial to how to make your own packets: https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/
July 1, 20178 yr Author Thanks, will look into it immedietly (https://gyazo.com/abcf0101a604874117497e0d79dabfc0) <-- picture for the curious
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.