Posted May 8, 20187 yr I have a WorldSavedData which I have a static field for that gets initialized during the WorldEvent.Load. This saves me for example stuff like client-server sync. Is there a downside to this or something else i am missing if i do it this way? Edited September 7, 20187 yr by Flemmli97
May 8, 20187 yr You should almost never make anything in MC static. This thing that saves you 'client-server sync'... what happens on dedicated servers? or lan play where there are multiple clients? Things should be logically separated by the sides/world they are in. Also, what happens when multiple worlds load? you say it gets initalized in WorldEvent.Load? Well you do know that is called for all dimensions right? And it can be called multiple times for the same world as they are loaded/unloaded. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
May 8, 20187 yr Author ok. what about this then? i have a list of blockpos that i update daily (so i dont have to use ticking tiles). its not a woldsaveddata and since the client doesnt know about it it should be fine? (one instance of the list is created for each world(dimension))
May 10, 20187 yr On 09/05/2018 at 8:04 AM, Flemmli97 said: ok. what about this then? i have a list of blockpos that i update daily (so i dont have to use ticking tiles). its not a woldsaveddata and since the client doesnt know about it it should be fine? (one instance of the list is created for each world(dimension)) it seems you are trying to improve performance. Why don't you make tickable TileEntities with something like if (getWorld().getWorldTime() % 200 != 0) return; in their update() methods? them? this makes them only update every 10 seconds (world time is in ticks, 20 ticks per second) About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
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.