Skip to content

Commit

Permalink
Fix air rendering (#38)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gentlegiantJGC authored Dec 3, 2024
1 parent fe32145 commit cdcda1b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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", {}):
Expand Down

0 comments on commit cdcda1b

Please sign in to comment.