Jump to content

Immediately forceloading chunks? [1.18.2]


Recommended Posts

Posted

Hey all,

I'm wondering if there's a way to forceload a chunk instantly in 1.18.2.  I'm updating an older mod from 1.16, and in that version of the game I was able to do so just by calling

serverWorld.forceChunk(chunkPos.x, chunkPos.z, false);

which would then enable me to access the Chunk at that location and get a list of the entities inside it (which is my end goal here as well).  However, although in 1.18 I still have the ability to call

serverLevel.setChunkForced(chunkPos.x, chunkPos.z, false);

it no longer seems to load the chunk immediately, but instead (from my understanding) submits a ticket to load it on the next tick.  This is problematic for my use case, as my goal is to load the chunk, access an entity within it, and then deload the chunk on completion, which I can no longer do in a single tick with this method.  LevelChunks also don't seem to contain a list of entities anymore in 1.18, and seem to have less automated functions connected to them, which could I suppose also be the source of my issue.

Is there a way to load a chunk instantaneously from its coordinates and immediately access the entities within it?

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.