the4naves Posted July 4, 2019 Share Posted July 4, 2019 (edited) Long story short, for a project I'm currently working on, I need a forge event (or something similar) that I can hook into, that fires when a world is loaded, specifically after the "world" variable in net.minecraft.client.Minecraft has been set to something other than null. Note that because of that last requirement, WorldEvent.Load doesn't work, as "world" hasn't been set yet. The same problem exists with WorldEvent.CreateSpawnPosition. Does anyone know of some sort of event I can utilize? Edited July 5, 2019 by the4naves Solved Quote Link to comment Share on other sites More sharing options...
the4naves Posted July 5, 2019 Author Share Posted July 5, 2019 It was actually for the other post I made a little while ago, basically I needed to replace the instance of WorldClient with my own, to change which chunks Minecraft tries to load, and where it displays them (While keeping most compatibility with any mods that used WorldClient or the classes it itself uses). You hadn't replied in a while, which I thought might have been since I worded my last post in a way that from a glance, made it sound as if I had found a solution, so I thought I'd open a thread with the new specific problem I was having, simplified, so that people might more easily understand it. Quote Link to comment Share on other sites More sharing options...
the4naves Posted July 5, 2019 Author Share Posted July 5, 2019 Oh, I don't need something specific for that, I just need any event that occurs just after the world has been loaded, it's okay if there isn't one though, I can probably just use onChunkLoad and just check if I've already run my code, it's just a bit messy. Quote Link to comment Share on other sites More sharing options...
the4naves Posted July 5, 2019 Author Share Posted July 5, 2019 Ok, at least for now, I've found a solution that seems to work pretty well; I'm using EntityJoinWorldEvent, then checking if the entity is an instance of EntityPlayer, and if the event's world is remote, it's a bit messy, but it works. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.