From cdcda1bd800e6ef390f3ff33f84c430b775ca746 Mon Sep 17 00:00:00 2001 From: gentlegiantJGC Date: Tue, 3 Dec 2024 20:12:25 +0000 Subject: [PATCH] Fix air rendering (#38) Fixes Amulet-Team/Amulet-Map-Editor#1119 These two lines of code were to display the missing block if the block had textures but no elements which is the case for polygon mesh formats that we don't support. Minecraft Java 1.21.4 added a particle texture which broke this. --- .../api/resource_pack/java/resource_pack_manager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/minecraft_model_reader/api/resource_pack/java/resource_pack_manager.py b/minecraft_model_reader/api/resource_pack/java/resource_pack_manager.py index 95982b3..2d213e4 100644 --- a/minecraft_model_reader/api/resource_pack/java/resource_pack_manager.py +++ b/minecraft_model_reader/api/resource_pack/java/resource_pack_manager.py @@ -356,7 +356,9 @@ def _load_block_model(self, model_path: str) -> BlockMesh: } transparent = Transparency.Partial - if java_model.get("textures", {}) and not java_model.get("elements"): + if set(java_model.get("textures", {})).difference( + {"particle"} + ) and not java_model.get("elements"): return self.missing_block for element in java_model.get("elements", {}):