Pokechu22 / WorldDownloader

Makes a copy of parts of a multiplayer world for singleplayer use (EG, for backups or renders)
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/2520465-world-downloader-mod-create-backups-of-your-builds
Other
573 stars 135 forks source link

Does not save custom maps #162

Open TAJLN opened 4 years ago

TAJLN commented 4 years ago

Saving a world with custom maps will make the maps not show up and instantly fall out of their item frames when you load the world in singleplayer

Pokechu22 commented 4 years ago

Hm, that's odd. The images on maps are supposed to be saved (there's a message that occurs when they're saved, though it's hidden by default because they get saved rather frequently so it fills up the chat); you can find them in the data folder of the world if I recall correctly. Item frames also should work; there have been cases where they weren't saved at all due to entity tracking distance issues, but that's different from them being saved but then popping off when you load the world.

What Minecraft version and WDL version are you using?

TAJLN commented 4 years ago

I tried this on mc 1.8.9 and WDL beta2 and also on mc 1.12.2 and WDL 4.0.6.2

In both cases I got the same result. Images from server (hypixel) didn't aprear on item frames and empty maps fall down, after picking them up they all become the map of the current player location

Pokechu22 commented 4 years ago

Can you post the log file from 1.12.2?

TAJLN commented 4 years ago

Sure: https://pastebin.com/1CyyDw5s

Pokechu22 commented 4 years ago

It looks like you started download and then stopped download a few seconds later. That might not have been long enough for a map data update to occur; I think it only happens once every few seconds for maps in item frames (though, hypixel might do it differently). I don't see any map data saved messages in the log, at least. Try waiting for, say, 30 seconds, and see if that helps (that should be way longer than actually needed); you can spend that time saving the items in chests for instance.

I remember one other thing: WDL tries determine the position of a map's image based on player and item frame markers on the map, but if it can't figure it out, I think it defaults to (0, 0) (though it's been a while since I've checked). I'm guessing that custom maps are imported images, and don't have a location in the world, so they won't have a known location. I also vaguely recall that hypixel worlds tend to be centered at (0, 0), which would mean that when you pick up the map, it tries to update the contents since you're near where it thinks it is. I don't think that's what happened here, since it seems like no map data was saved at all (and in that case, I think it would just set the map center to your position), but it's something to keep in mind.

I'm not completely sure why WDL only saves map data if it's sent during downloading. That behavior makes sense for inventories (since it's not normally something the game keeps track of after the inventory is closed), but map data is kept around after it's sent so it should be possible to use the existing information. I'll look into that.

TAJLN commented 4 years ago

Waited a longer time this time, still the same result

Pokechu22 commented 4 years ago

Another thing that might work is to take the maps out of the frames while downloading; I think maps on the hotbar (or in the hand?) have more frequent updates and that would hopefully make things work. Plus, if they're in your inventory, they won't be affected by item frames popping off. (They can be put back up after download is stopped). Also, I can't remember if map saving was even implemented in 1.8.9, but I know that the map center system definitely wasn't implemented then; you'll want to use a more recent build for this.

If the hotbar doesn't solve it either, then hypixel is probably doing something different with maps, probably for performance reasons (or because they implemented custom maps in some weird way beyond just changing the contents of an otherwise normal map item), and I'll investigate using map data sent before the download was started.

Pokechu22 commented 4 years ago

Can you check if it's still happening with Version 4.0.7.0?

JasonHK commented 4 years ago

Can you check if it's still happening with Version 4.0.7.0?

@Pokechu22 Hello, item frames still pop off in the latest version.

2020-07-04_14 42 51

I can provide instruction to reproduce the bug. Since the server that caused the bug isn't owned by me, I might not be able to get the configuration of the server from the owner.