Apollounknowndev / trimmable-tools

Trim your swords, axes, pickaxes, shovels, and hoes!
MIT License
3 stars 2 forks source link

Handle nullable Level in `ItemPropertyFunction`. #8

Closed PlatinPython closed 1 week ago

PlatinPython commented 1 week ago

Currently the registered ItemPropertyFunctions call Level#registryAccess without checking if the level is null. This will lead to NPE if the supplied level is null. I encountered this when inserting an iron sword into a Create Depot. The way I fixed it will probably mean that trims won't show up if the level is null, but I don't know of a better way to fix that, since RegistryAccess#EMPTY will lead to the same result.