flathub / com.mojang.Minecraft

https://flathub.org/apps/details/com.mojang.Minecraft
34 stars 13 forks source link

Unable to save structure #64

Closed ghost closed 3 years ago

ghost commented 4 years ago

Saving structures with Minecraft flatpack version doesn't work

structure_block

flatpack

I tried with a new world, I also reset ~/.var/app/com.mojang.Minecraft

I use no mobs, data packs, resource packs or something like

No difference using entities or not

I tried to create the generated/minecraft/structures folder manuelly, I think it's no permissions problem

In the log file I found the follow error, but it occurs already on launcher launch, I don't know it's in context

Couldn't load Narrator library : Unable to load library 'fliteWrapper': Native library (linux-x86-64/libfliteWrapper.so) not found 

With the native Minecraft it works (https://launcher.mojang.com/download/Minecraft.tar.gz)

native

I use: Linux Mint 20, Cinnamon 4.6.7 (https://linuxmint.com) Flatpak 1.6.5 (Pre installed from apt) Minecraft installer 2.1.17417 (https://flathub.org/apps/details/com.mojang.Minecraft) Minecraft game 1.16.3

AsciiWolf commented 4 years ago

Hmm, to be honest I am not entirely sure how this works. From what I found, structures are saved in .minecraft/saves/(WorldName)/generated/(namespace)/structures. This should not have been an issue. The Narrator library error is unrelated.

ghost commented 4 years ago

Seems isn't really a problem with the flatpak context

Obviously Minecraft don't like the ~/.var/app/com.mojang.Minecraft/data/minecraft folder

If I move the minecraft data folder (for instance to ~/minecraft), create a symlink to the old path (for force use) and allow the flatpak context access to the new folder

mv ~/.var/app/com.mojang.Minecraft/data/minecraft ~/minecraft
ln -s ~/minecraft ~/.var/app/com.mojang.Minecraft/data/minecraft
flatpak override com.mojang.Minecraft --filesystem=~/minecraft --user

Minecraft detects the real path, will use this path and save of structures will work even with flatpak context

This trick also fix crashes playing some 3-party worlds for me (My own worlds strangely always works)

@AsciiWolf May this info can help you to fix it somehow in this flatpak package?

AsciiWolf commented 4 years ago

Hmm, to be honest, I am not sure how to fix this without breaking anything.

@p1u3o You are the one who added XDG_DATA_HOME support into this Flatpak. Do you have any idea how to easily fix/workaround this issue?

p1u3o commented 4 years ago

That is odd. I don't see why it would be fine when it's a symlink but not when it's a regular folder unless it's trying to read symlinks directly.

I'll do some testing on this, I already plan on updating the script to drop the migration and .minecraft folder which will simplify things.

Chris2000SP commented 2 years ago

i run in the same issue to this Flatpak. I run Minecraft without Flatpak just fine. Thats sad because dependencies to beta releases.