Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.12] Clearing entities on a separate thread


Recommended Posts

Hi all, I'm working on a little mod akin to the ClearLagg plugin that will automatically clear out entities from time to time. I have seen a couple plugins boasting that they do this on a separate thread to reduce lag, but I'm wondering how this would be possible. It seems like it'd be subject to some hella race conditions.

- Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.

Link to post
Share on other sites

If the command runs on the main thread--where entities are also run--then it can't cause a race condition.

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 post
Share on other sites

Yeah I understand this, but I was just wondering if it was possible cause I've seen plugins claiming they do it - I've already got it working fine on the main thread, but I'm just thinking if it's possible it'd be nice in the case that there are a LOT of entities I need to clear. However, from what I've found in testing it doesn't seem like the amount of time it takes to run is really going to matter. Seems to run just fine.

- Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.

Link to post
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.

Guest
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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.