isMovementBlocker is called in the HeightmapProcessor for every edited column at least once, so it's kind of a hot method. On newer Spigot versions, the call Material#isSolid() however requires a map lookup as it goes through the registry, slowing down the method call unnecessarily. As we already have the NMS block state available, we can just take the shortcut and call the method that is used by Spigot (and by the NMS heightmap calculation) directly.
### Submitter Checklist
- [x] Make sure you are opening from a topic branch (**/feature/fix/docs/ branch** (right side)) and not your main branch.
- [x] Ensure that the pull request title represents the desired changelog entry.
- [x] New public fields and methods are annotated with `@since TODO`.
- [x] I read and followed the [contribution guidelines](https://github.com/IntellectualSites/.github/blob/main/CONTRIBUTING.md).
Overview
Description
isMovementBlocker
is called in theHeightmapProcessor
for every edited column at least once, so it's kind of a hot method. On newer Spigot versions, the callMaterial#isSolid()
however requires a map lookup as it goes through the registry, slowing down the method call unnecessarily. As we already have the NMS block state available, we can just take the shortcut and call the method that is used by Spigot (and by the NMS heightmap calculation) directly.