Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WrappedBlockState by string for grass_path (dirt_path) on <1.17 #1144

Open
osk115 opened this issue Feb 16, 2025 · 0 comments · May be fixed by #1145
Open

WrappedBlockState by string for grass_path (dirt_path) on <1.17 #1144

osk115 opened this issue Feb 16, 2025 · 0 comments · May be fixed by #1145
Labels
bug Something isn't working

Comments

@osk115
Copy link

osk115 commented Feb 16, 2025

Describe the bug
WrappedBlockState#getByString(string) for minecraft:grass_path on versions <1.17 returns AIR

Software brand
Versions below 1.17

How To Reproduce
Example (Spigot 1.16.5, packetevents-spigot-2.7.0):

System.out.println("grass_path: " + WrappedBlockState.getByString("minecraft:grass_path").toString());
System.out.println("dirt_path: " + WrappedBlockState.getByString("minecraft:dirt_path").toString());

output:

[05:56:26 INFO]: grass_path: air
[05:56:26 INFO]: dirt_path: dirt_path

Additional context
Mentioned in GrimAnticheat/Grim#1733
In version 1.17, the identifier of the path block was changed from grass_path to dirt_path. There is a STRING_UPDATER in WrappedBlockState, but unfortunately it breaks getting the WrappedBlockState block on versions below 1.17

@osk115 osk115 added the bug Something isn't working label Feb 16, 2025
@osk115 osk115 linked a pull request Feb 16, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant