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

Leaderboard

Popular Content

Showing content with the highest reputation on 09/28/21 in all areas

  1. 1. Not afaik. 2. The entity is was already added and deferred to load at the correct time already. Follow the event call and you'll see that entities are loaded at a very specific point when processing. Trying to add your own entity at any point in this process would mean you could be loading a chunk that's already loading. 3. No, that is much more difficult.
    1 point
  2. Both are perfectly valid options. In fact DeferredRegister uses registry events behind the scenes. DeferredRegister makes it easier to not "mess up" and do things incorrectly, so it is usually the recommended way.
    1 point
  3. Reading the javadoc on the event tells you: "Note: This event may be called before the underlying Chunk is promoted to ChunkStatus#FULL. You will cause chunk loading deadlocks if you don't delay your world interactions." As such, you should probably keep a queue of entities added along with the world and position you would like it to spawn at. Then, on the next tick in probably WorldTickEvent, check if the chunk is loaded at the position of spawning and if so spawn the entity. Otherwise, recycle into the queue until next tick.
    1 point
×
×
  • Create New...

Important Information

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