Skip to content

Commit d352454

Browse files
committed
fix: sets minimum interpolation duration
1 parent cfc10f4 commit d352454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/src/main/java/kr/toxicity/model/api/bone/RenderedBone.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ public float progress() {
663663
public int interpolationDuration() {
664664
if (root.state(uuid).skipInterpolation) return 0;
665665
var frame = state.frame() / (float) Tracker.MINECRAFT_TICK_MULTIPLIER;
666-
return Math.round(frame + MathUtil.FLOAT_COMPARISON_EPSILON);
666+
return Math.max(Math.round(frame + MathUtil.FLOAT_COMPARISON_EPSILON), 1);
667667
}
668668

669669
private @NotNull BoneMovement nextMovement() {
@@ -674,7 +674,7 @@ public int interpolationDuration() {
674674
private @NotNull BoneMovement relativeOffset() {
675675
if (relativeOffsetCache != null) return relativeOffsetCache;
676676
var def = defaultFrame();
677-
var preventModifierUpdate = interpolationDuration() < 1;
677+
var preventModifierUpdate = interpolationDuration() <= 1;
678678
if (parent != null) {
679679
var p = parent.state(uuid).relativeOffset();
680680
return relativeOffsetCache = new BoneMovement(

0 commit comments

Comments
 (0)