NPE occurs when custom DirectoryResourcePack
uses zipfs #8
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This is the log: https://mclo.gs/j8wVkV9
This error is due to not considering
DirectoryResourcePack#root
being root path of a non-default filesystem, e.g.zipfs
(jar://file://path/to/file.zip!/
).ResourcePackManagerMixin
, Line 51In default filesystem, a
DirectoryResourcePack
(mojmappedPathPackResource
) should never be at the root. However, 3rd-party mods may implement it with a custom fs (e.g. Remote Resource Pack Mod (code) in this crash log), which crashes the game.To solve this NPE, you can simply add a filter:
Have a nice day!
I have added a null check to the parent since doing so didn't take much effort, but I'd recommend taking a second look at some of the choices made when designing your mod, since they seem liable to further unintended compatibility issues.
Perhaps you could look at my mod Resclone for reference (or perhaps implementation) since it seems to target a similar use case.