Merge pull request #43 from CPearl0/fix-NullPointerException

Fix NullPointerException
This commit is contained in:
thedarkcolour 2024-01-31 11:07:45 -08:00 committed by GitHub
commit 27c07f4fea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -152,7 +152,10 @@ public class CompostColors {
if (!readMods.contains(modid)) {
var id = entry.getKey().location().getPath();
var jarFile = ModList.get().getModFileById(modid).getFile();
var modFile = ModList.get().getModFileById(modid);
if (modFile == null)
continue;
var jarFile = modFile.getFile();
var modelPath = jarFile.findResource("assets/" + modid + "/models/item/" + id + ".json");
if (Files.exists(modelPath)) {