Skip to content

Commit

Permalink
mesh fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuken committed Jun 27, 2023
1 parent b4d5d05 commit c15b342
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/mindustry/mod/ContentParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ ContentType.status, parser(ContentType.status, StatusEffect::new),

if(value.has("mesh")){
var mesh = value.get("mesh");
if(!mesh.isObject()) throw new RuntimeException("Meshes must be objects.");
if(!mesh.isObject() && !mesh.isArray()) throw new RuntimeException("Meshes must be objects.");
value.remove("mesh");
planet.meshLoader = () -> {
//don't crash, just log an error
Expand All @@ -616,7 +616,7 @@ ContentType.status, parser(ContentType.status, StatusEffect::new),

if(value.has("cloudMesh")){
var mesh = value.get("cloudMesh");
if(!mesh.isObject()) throw new RuntimeException("Meshes must be objects.");
if(!mesh.isObject() && !mesh.isArray()) throw new RuntimeException("Meshes must be objects.");
value.remove("cloudMesh");
planet.cloudMeshLoader = () -> {
//don't crash, just log an error
Expand Down

0 comments on commit c15b342

Please sign in to comment.