From a1672b527c74d152f3e6dd32a8ec8ec59ca43561 Mon Sep 17 00:00:00 2001 From: UnlikePaladin <36827970+UnlikePaladin@users.noreply.github.com> Date: Sun, 24 Dec 2023 15:06:14 -0600 Subject: [PATCH] yeah --- .../pfm/blocks/models/forge/PFMForgeBakedModel.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 6852ce7df..4ea85c8c8 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 @@ -45,7 +45,7 @@ public IModelData getModelData(@NotNull BlockRenderView world, @NotNull BlockPos return tileData; } - Map> separatedQuads = new ConcurrentHashMap<>(); + Map> separatedQuads = new ConcurrentHashMap<>(); public List getQuadsWithTexture(List quads, List toReplace, List replacements) { 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"); @@ -55,7 +55,7 @@ public List getQuadsWithTexture(List quads, List t return quads; for (BakedQuad quad : quads) { - Sprite sprite = quad.getSprite(); + Identifier sprite = quad.getSprite().getId(); if (separatedQuads.containsKey(sprite)) { if (!separatedQuads.get(sprite).contains(quad)) separatedQuads.get(sprite).add(quad); @@ -66,8 +66,8 @@ public List getQuadsWithTexture(List quads, List t } List transformedQuads = new ArrayList<>(quads.size()); - for (Map.Entry> entry : separatedQuads.entrySet()) { - Identifier keyId = entry.getKey().getId(); + for (Map.Entry> entry : separatedQuads.entrySet()) { + Identifier keyId = entry.getKey(); int index = IntStream.range(0, toReplace.size()) .filter(i -> keyId.equals(toReplace.get(i).getId())) .findFirst() @@ -120,7 +120,7 @@ else if (quadToTransformedQuad.containsKey(quadKey)) { return transformedQuads; } - private static final Map, Integer> ELEMENT_INTEGER_MAP = new HashMap<>(); + private static final Map, Integer> ELEMENT_INTEGER_MAP = new ConcurrentHashMap<>(); public static int findVertexElement(VertexFormatElement.Type type, int index) { Pair pairToFind = new Pair<>(type, index); if (ELEMENT_INTEGER_MAP.containsKey(pairToFind))