Update JsonModel.java

This commit is contained in:
ah-OOG-ah committed 2024-02-29 21:17:46 -05:00
1 parent 2ca4d5338f
commit c9539faf44
1 file changed
+8
@@ -37,6 +37,7 @@ import static com.gtnewhorizons.angelica.utils.JsonUtil.loadBool;
import static com.gtnewhorizons.angelica.utils.JsonUtil.loadFloat;
import static com.gtnewhorizons.angelica.utils.JsonUtil.loadInt;
import static com.gtnewhorizons.angelica.utils.JsonUtil.loadStr;
import static me.jellysquid.mods.sodium.common.util.DirectionUtil.ALL_DIRECTIONS;
public class JsonModel implements QuadProvider {
@@ -145,7 +146,14 @@ public class JsonModel implements QuadProvider {
}
}
// Lock the lists.
this.allQuadStore = new ObjectImmutableList<>(this.allQuadStore);
for (ForgeDirection f : ALL_DIRECTIONS) {
List<Quad> l = this.sidedQuadStore.computeIfAbsent(f, o -> EMPTY);
if (!l.isEmpty())
this.sidedQuadStore.put(f, new ObjectImmutableList<>(l));
}
}
public List<ResourceLocation> getParents() {