fix NullPointerException
This commit is contained in:
parent
1c21a03104
commit
bfe9f3f386
|
|
@ -152,7 +152,10 @@ public class CompostColors {
|
||||||
|
|
||||||
if (!readMods.contains(modid)) {
|
if (!readMods.contains(modid)) {
|
||||||
var id = entry.getKey().location().getPath();
|
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");
|
var modelPath = jarFile.findResource("assets/" + modid + "/models/item/" + id + ".json");
|
||||||
|
|
||||||
if (Files.exists(modelPath)) {
|
if (Files.exists(modelPath)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user