ComunidadAylas / PackSquash

📦 Minecraft: Java Edition resource and data pack optimizer which aims to achieve the best possible compression, performance and protection, improving pack distribution, storage and in-game load times.
https://packsquash.aylas.org
GNU Affero General Public License v3.0
612 stars 25 forks source link

Data packs support for 1.21 #327

Closed lottuce-yami closed 6 days ago

lottuce-yami commented 2 months ago

Distribution

Windows executable

Bug description

In 1.21 version of Minecraft, various folders in the data pack structure were renamed - source (Minecraft Wiki). However, PackSquash simply skips files in those folders and makes the data pack unusable.

Reproduction steps

  1. Create a data pack with, for example, .mcfunction files in the data/*/function/.
  2. Try to optimize the pack with PackSquash.

Expected behavior

Files from the renamed folders should get copied to the target pack.

Attached files

Example 1.21 data pack - example.zip

Additional context

The program can check for the pack version and use different paths if the version is 48 (source) or higher.

AlexTMjugador commented 1 month ago

Thanks for the report and the Minecraft wiki changelog link. 1.21 did indeed change the directory layout of datapacks a bit, causing the problems you describe. I'll eventually fix this.

AlexTMjugador commented 6 days ago

The commit that closed this issue should fix the reported problem! If anyone's interested, please feel try out the latest unstable builds and let us know how the fix works for you. This fix is expected to make it to the next stable release, but such stable release was not published yet, so that's why unstable builds should be used to test it for now.