Jump to content

Recommended Posts

Posted

Hi,

I have been trying to find out how to dynamically create more dimensions at runtime in 1.18 (1.16+ actually), i.e. not using json files.

In my case the types of custom dimension that gets created is completely static, but the number of dimensions needs to be able to change at runtime.

I was looking at the code by McJty for his RFTools Dimensions mod, but it seems to use MinecraftServer properties that now (?) are private.

Any guidance on what should / could be used to accomplish this would be greatly appreciated.

Are there any plans to reintroduce the Forge DimensionManager that used to exist? Thanks.

Posted

you can not create Dimensions at runtime, they need to be create all at registry
the only way you could use is you create all dimensions and enable and disable them at runtime
via disabling the teleportation in these dimensions

Posted
1 hour ago, Luis_ST said:

you can not create Dimensions at runtime, they need to be create all at registry
the only way you could use is you create all dimensions and enable and disable them at runtime
via disabling the teleportation in these dimensions

Thanks for your response. However, it does seem to be possible, since this is what RFTools Dimensions is doing, also in 1.18.

I haven't been able to use that method though (instantiating ServerLevel + some other setup / bookkeeping), due to class access restrictions. I was trying to find workarounds for that, but suspect I'm going about it the wrong (not recommended) way.

Posted
3 hours ago, diesieben07 said:

Have you looked at what RFTools Dimensions does?

Yes, it creates a ServerLevel instance to create a new dimension. However, it does so using e.g. executor and storageSource in the MinecraftServer class, which are private. I'm not sure where or how that visibility is changed.

I can create a new executor same as is used internally in MinecraftServer, but I'm uncertain of the consequences of having a separate one running at the same time. I then got stuck at trying to duplicate storageSource and basically thought I should check here if there were any new guidelines / recommendations on how this should be done.

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.