PrismarineJS / prismarine-physics

Provide the physics engine for minecraft entities
MIT License
35 stars 39 forks source link

Fix 1.17 & 1.18 effect names #101

Closed killbinvlog closed 1 year ago

killbinvlog commented 1 year ago

This pull request addresses the issue where the usage of different effect names for versions 1.17 and 1.18 results in broken effects since the effect names have been updated in the minecraft-data package (related to PrismarineJS/minecraft-data#528) leading to compatibility problems.

To demonstrate this issue, I have performed a test using the levitation effect in version 1.17.

Without the fix:

https://github.com/PrismarineJS/prismarine-physics/assets/33067100/7d2924a0-e8d9-4987-8e26-d54e2a91f3a9

With the fix:

https://github.com/PrismarineJS/prismarine-physics/assets/33067100/4a4ddbdb-b845-4646-920e-aebe9d221892

Hope this helps, any feedback or suggestions regarding this pull request would be greatly appreciated.

rom1504 commented 1 year ago

Does it work for other versions?

killbinvlog commented 1 year ago

Does it work for other versions?

Yes, it works in 1.16.5 and 1.19.

rom1504 commented 1 year ago

ok. I think we should have a lot more tests in this repo, but not caused by this PR

rom1504 commented 1 year ago

https://github.com/PrismarineJS/prismarine-physics/issues/21