misode / no-trial-chambers

Data pack that enables the Update 1.21 experimental features, but disables the trial chambers and breeze. Made for Hermitcraft 10!
MIT License
51 stars 0 forks source link

Question: replace level.dat to add post-creation? #2

Closed MeeniMc closed 1 week ago

MeeniMc commented 6 months ago

I would like to upgrade a pre-existing server world.

I did a quick try and I think I have a method that work, but i'd like to have confirmation that it is correct.

  1. re-create the world with the same parameters (seed, datapacks, etc) as the origin, but with this datapack enabled during creation this time
  2. copy everything from the origin, except level.dat
  3. load the copy, the datapack is now active, and the region files, playerdata etc have been updated with the origin, so this is a copy of the origin world with the datapack enabled

⚠️ A side effect of this method is to erase the singleplayer player, so that's really working only for servers. ⚠️

Is there some hidden drawbacks to this approach that escapes me and I should be aware of?

misode commented 6 months ago

I don't see any drawbacks of this. There is even a more direct solution that doesn't involve creating a second world. You can modify the level.dat file using a tool like NBT Studio or NBT Viewer.

Edit the enabled_features list to include minecraft:update_1_21: image

Sylencia commented 6 months ago

The instructions on 1.2 tell us not to add update_1_21, but is it the only way to do this for existing servers?

misode commented 6 months ago

@Sylencia No, to add this to existing servers follow the instructions above. The game automatically shows a update_1_21 (feature) disabled data pack in the /datapack list output, but you should not enable this, as it will enable the trial chambers.

MeeniMc commented 6 months ago

Thanks for the hint about editing level.dat. I had to add the enabled_features array altogether, but in the end it worked. Your vscode nbt editor is very nice, gratz!

KylinBilderain commented 6 months ago

@misode Is there a step by step tutorial to import this onto an existing world?

jmfe10 commented 6 months ago

@misode I added the mod version of this datapack and loaded a pre-existing world and everything seems fine. I can craft all the blocks and it doesn't seem to have generated any structures. I also created a new world after adding the mod and there wasn't a /locate command for trial chambers so I think I'm good. Can you confirm if that works or if there are any unforseen consequences?

KylinBilderain commented 6 months ago

@jmfe10 Can you explain how you did it? I've been trying to that myself, but the blocks are showing up as disabled recipes.

mridulganga commented 6 months ago

@KylinBilderain I directly added the mod in existing world, was not getting the recipe for some reason, but if you craft item according to recipe it works.

jmfe10 commented 6 months ago

@jmfe10 Can you explain how you did it? I've been trying to that myself, but the blocks are showing up as disabled recipes.

I simply dragged the .jar file into the mods folder. I'm using a Fabric install. make sure you downloaded the actual mod and not the datapack.

methape commented 6 months ago

@jmfe10 Can you explain how you did it? I've been trying to that myself, but the blocks are showing up as disabled recipes.

I simply dragged the .jar file into the mods folder. I'm using a Fabric install. make sure you downloaded the actual mod and not the datapack.

this didnt work for me, i installed the mod and the recipes were unlocked but nothing could be crafted because the features were disabled

Sylencia commented 6 months ago

@jmfe10 Can you explain how you did it? I've been trying to that myself, but the blocks are showing up as disabled recipes.

I simply dragged the .jar file into the mods folder. I'm using a Fabric install. make sure you downloaded the actual mod and not the datapack.

this didnt work for me, i installed the mod and the recipes were unlocked but nothing could be crafted because the features were disabled

Have you modified your level.dat file to add what misode showed above? If enabled_features does not exist in your level.dat, you'll need to add a new list called that.

MaksFaZha commented 6 months ago

When I edit my .dat file, it does not save. I've tried using NBT Studio as well as NBT Editor. Any advice?

san-e commented 6 months ago

I'm trying to do this. but Minecraft seems to reset the DataPacks entry in level.dat anytime I edit it. Any clue what I might be missing?

EDIT: Seems like this only happens when trying to load the world in singleplayer. Loaded it up on a fabric server and it works fine

misode commented 6 months ago

@san-e You don't need to edit the data packs in level.dat, only the experimental features

san-e commented 6 months ago

@san-e You don't need to edit the data packs in level.dat, only the experimental features

Ah, my bad, for some reason I assumed the enabled_features list was supposed to be under DataPacks

misode commented 6 months ago

I have updated the description with instructions for adding to an existing world

MeeniMc commented 1 week ago

Instructions on the main page of the mod are sufficiently clear now, closing :)