Posted May 7, 20223 yr 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.
May 7, 20223 yr 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
May 7, 20223 yr Author 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.
May 7, 20223 yr Author 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.