Skip to content

Commit f908c17

Browse files
committed
replace illegal chars
1 parent ffea824 commit f908c17

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/re/imc/geysermodelenginepackgenerator/generator/Animation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public void load(String string) {
8787
}
8888
}
8989

90-
newAnimations.add("animation." + modelId + "." + element.getKey(), element.getValue());
90+
newAnimations.add("animation." + modelId + "." + element.getKey().replace(" ", ""), element.getValue());
9191
}
9292
json.add("animations", newAnimations);
9393

src/main/java/re/imc/geysermodelenginepackgenerator/generator/AnimationController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void load(Animation animation, Entity entity) {
5151

5252
Collections.sort(sorted);
5353
for (String id : sorted) {
54-
54+
id = id.replace(" ", "_");
5555
int n = (int) Math.pow(2, (i % 24));
5656
JsonObject controller = new JsonParser().parse(CONTROLLER_TEMPLATE.replace("%anim%", id).replace("%query%", "math.mod(math.floor(query.property('modelengine:anim" + i / 24 + "') / " + n + "), 2)")).getAsJsonObject();
5757
animationControllers.add("controller.animation." + animation.modelId + "." + id, controller);

0 commit comments

Comments
 (0)