Currently, a call to DynamicResourcePack#getRootResource() with the name of a resource that is not present throws a NullPointerException in the ByteArrayInputStream constructor, crashing the game. This PR adds a null check to avoid calling the ByteArrayInputStream constructor when the resource is null. getRootResource() is @Nullable, so it is safe to return null from this method when the resource is not present.
Please see MoreMcmeta/core#35 for logs and a stacktrace.
Currently, a call to
DynamicResourcePack#getRootResource()
with the name of a resource that is not present throws aNullPointerException
in theByteArrayInputStream
constructor, crashing the game. This PR adds a null check to avoid calling theByteArrayInputStream
constructor when the resource isnull
.getRootResource()
is@Nullable
, so it is safe to returnnull
from this method when the resource is not present.Please see MoreMcmeta/core#35 for logs and a stacktrace.