Skip to content

Commit

Permalink
Allow reading doubles for frametimes in animation.mcmeta files (lenie…
Browse files Browse the repository at this point in the history
…ntly correct them into integers)
  • Loading branch information
TBlueF committed Dec 28, 2024
1 parent 7ddb25d commit 77e793c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public AnimationMeta read(JsonReader in, Gson gson) throws IOException {
case "interpolate" : animationMeta.interpolate = in.nextBoolean(); break;
case "width" : animationMeta.width = in.nextInt(); break;
case "height" : animationMeta.height = in.nextInt(); break;
case "frametime" : animationMeta.frametime = in.nextInt(); break;
case "frametime" : animationMeta.frametime = (int) in.nextDouble(); break;
case "frames" : readFramesList(in, animationMeta); break;
default: in.skipValue(); break;
}
Expand Down Expand Up @@ -115,7 +115,7 @@ private void readFramesList(JsonReader in, AnimationMeta animationMeta) throws I
while (in.hasNext()) {
switch (in.nextName()) {
case "index" : index = in.nextInt(); break;
case "time" : time = in.nextInt(); break;
case "time" : time = (int) in.nextDouble(); break;
default: in.skipValue(); break;
}
}
Expand Down

0 comments on commit 77e793c

Please sign in to comment.