Everything posted by OuiOuiCroissant
OuiOuiCroissant posted a topic in Modder SupportHello! Title. The Forge Documentation page doesn't show examples of how to save/load data from other classes (like MyEventHandler), it kind of explains which methods to use, but I'm still unsure how to do it properly and I want to do it properly. Both the MyWorldSavedData#write/readNBTTagCompounds() are run, and MyEventHandler#countFullMoons() is run properly. MyWorldSavedData: MyEventHandler:
Hello! I followed SimpleImpl as closely as I could, but my ServerMessageHandler is being run on the client side! It is printing out "Remote = true" after I add this to it: System.out.println("Remote = " + Minecraft.getMinecraft().world.isRemote); Here is everything: Registering my ServerMessageHandler: My ServerMessage: And my ServerMessageHandler (ignore all the "!= null"s, I've had... issues): Packet is sent from WorkerGUI Class (WorkerGUI is opened when interacting with EntityCitizen) in #mouseReleased() Thanks!
Ahhh thank you. What's the easiest way to call a specific entity using an entity ID on the server? I'm using this. ctx is the MessageContext parameter in #onMessage(). ctx.getServerHandler().player.world.getEntityByID(message.peasant_id);