Posted July 7, 20187 yr Hi, I'm trying to make a global world winter. Basically I change biome values in the registries using reflection to make it snow everywhere. I've almost made it work as intended. But there's one issue: If I quit the world during winter (when biome values are changed), and create a new world - then new world will be generated with snow everywhere (cause I never changed back the registry values). I've fixed this issue in singleplayer scenario by subscribing to onServerStopping event and restoring default registry values there, but when dealing with the dedicated server idk to what event I should subscribe. I've tried onPlayerLoggedOut event, but it never runs on the client side, and packets from server do not reach client (cause the player already logged out). I was thinking about onWorldUnload - but it seems that this event can fire during the game (when dimensions switches), and idk how to determine if the world unloads "for the last time". Is there an event for me to subscribe to? Edited July 7, 20187 yr by moonlyer
July 7, 20187 yr 6 minutes ago, moonlyer said: Is there an event for me to subscribe to? FMLNetworkEvent.ClientDisconnectionFromServerEvent VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
July 7, 20187 yr Author 27 minutes ago, Animefan8888 said: FMLNetworkEvent.ClientDisconnectionFromServerEvent Thanks, it works.
July 7, 20187 yr Or save the data to the world. .. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
July 7, 20187 yr Author 8 minutes ago, Draco18s said: Or save the data to the world. .. I do save data to the world and i change registry values on world startup if data differs from default state. I just undo this changes every time client disconnects. It is probably unnecessary, but I feel comfortable to know that when no world is loaded - the registries have default values.
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.