From 06fa122436a6ce75e614ebc12e0f46e58994a3bb Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Thu, 28 Dec 2023 18:08:42 -0600 Subject: [PATCH] fix a possible crash --- .../pfm/blocks/models/forge/PFMForgeBakedModel.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/forge/src/main/java/com/unlikepaladin/pfm/blocks/models/forge/PFMForgeBakedModel.java b/forge/src/main/java/com/unlikepaladin/pfm/blocks/models/forge/PFMForgeBakedModel.java index 8043bb2a9..858942135 100644 --- a/forge/src/main/java/com/unlikepaladin/pfm/blocks/models/forge/PFMForgeBakedModel.java +++ b/forge/src/main/java/com/unlikepaladin/pfm/blocks/models/forge/PFMForgeBakedModel.java @@ -47,6 +47,9 @@ public IModelData getModelData(@NotNull BlockRenderView world, @NotNull BlockPos Map> separatedQuads = new ConcurrentHashMap<>(); public List getQuadsWithTexture(List quads, List toReplace, List replacements) { + if (quads == null) + return Collections.emptyList(); + if (replacements == null || toReplace == null || toReplace.size() != replacements.size()) { PaladinFurnitureMod.GENERAL_LOGGER.warn("Replacement list is not the same size or was null, skipping transformation"); return quads;