Posted July 12, 201510 yr Right now I am working on a small HUD that for some of the elements use events to set a boolean to true, they work fine on single player, but when I'm on a server, they don't work. What I'm wondering is how to handle this. (Events I use are PlayerPickupXpEvent and EntityItemPickupEvent)
July 12, 201510 yr Both are server/client sided. Post your code and registration. What is "server" for you? Is this logical thread or dedicated server? 1.7.10 is no longer supported by forge, you are on your own.
July 12, 201510 yr Author The server is an online server such as something like hypixel/mineplex stuff like that. This my code: http://pastebin.com/7Bd7Vs29
July 12, 201510 yr Learn how to use proxies. Client proxy will fire only on client.jar. Server only for dedicated.jar (your server). You did event registration in ClientProxy - that's why it doesn't exist on server. You need to separate Client events (such as HUD, gui, render) and all other (pickup events) to 2 separate classes and register them accordingly. 1.7.10 is no longer supported by forge, you are on your own.
July 12, 201510 yr Author I have tried registering it in the client proxy, server proxy, and common proxy, but it still only works on the client
July 12, 201510 yr Only if you need it. I told you - learn what a proxy is. There are 2 possible ways of launching minecraft - with client.jar and server.jar (refered to as dedic). In your mod you can define 2 classes - server and client proxy. Say you have: @SidedProxy(clientSide = "client.ClientProxy", serverSide = "server.ServerProxy") public static CommonProxy proxy; ServerProxy and ClientProxy would extend abstract CommonProxy. Now - you can call abstract method proxy.somethingAbstract(); That will be overriden by client/server proxy. When you are on client.jar - ClientProxy would be called. When on dedic.jar - server one. Ideally - ALL events that should work for server and client should be in CommonProxy (SP is ALSO a server, but only in mea of logical side, not actual "dedic"). All stuff that is client side goes to ClientProxy. ServerProxy on the other had (since SP also needs server events that are placed in CommonProxy) would be used only for server.jar exclusive features - e.g when you are coding special config files for server only. 1.7.10 is no longer supported by forge, you are on your own.
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.