Jump to content

Is this thread-safe?


thebest108

Recommended Posts

So one of the things I've done to get interaction with multiple worlds is I've been quickly changing the position of player before running interactions on other worlds.

 

Using a rotation matrix I've been able to transform the player pos before things like block placement, tile entities, etc.

 

I know this is terrible on client side because the rendering thread can start a frame between these translations, but its fine on server right? I havent seen any problems with it so far, but would the net thread be sending packets on a different schedule than a tick (ie would the net thread send player position between ticks or only before/after )

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

Link to comment
Share on other sites

More or less single-threaded*

 

In this case, yes, only one thread is involved.  The way Minecraft is multithreaded right now is limited to chunk loading/unloading, although I believe I found another place recently involving sounds.  All I know is that it is probably my code and that whatever it is causes a concurrent modification on the

tickingSounds

list.

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.

Link to comment
Share on other sites

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.