Skip to content

Commit

Permalink
1.2.4
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
LouisQuepierts committed Aug 23, 2024
1 parent d13c952 commit 35fdd6f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ public void update(String variable, VariableHolder holder, ClientAnimator animat

} else {
final float time = Mth.clamp(animator.getTimer(), 0.0f, length);
holder.setValue(Interpolation.interpolation(frames, holder, time).get());
holder.setValue(Interpolation.interpolation(frames, holder, time));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ public void setValue(float value) {
this.value = value;
}

public void setValue(VariableHolder holder) {
this.value = holder.value;
}

public int getAsInt() {
return (int) this.value;
}
Expand Down Expand Up @@ -104,6 +108,13 @@ public Float2(Vector2f vector2f) {
this.y = vector2f.y;
}

@Override
public void setValue(VariableHolder holder) {
Vector2f vector2f = holder.getAsVector2f();
this.setValue(vector2f.x);
this.y = vector2f.y;
}

@Override
public Vector2f getAsVector2f() {
return new Vector2f(get(), y);
Expand Down Expand Up @@ -162,6 +173,14 @@ public Float3(Vector3f vector3f) {
this.z = vector3f.z;
}

@Override
public void setValue(VariableHolder holder) {
Vector3f vector3f = holder.getAsVector3f();
this.setValue(vector3f.x);
this.y = vector3f.y;
this.z = vector3f.z;
}

@Override
public Vector2f getAsVector2f() {
return new Vector2f(get(), y);
Expand Down

0 comments on commit 35fdd6f

Please sign in to comment.