Jump to content

Recommended Posts

Posted (edited)

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 by Flemmli97
Posted

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

Posted

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))

Posted
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 WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.