Skip to content

Commit

Permalink
ref: update test animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeronimo97 committed Sep 22, 2024
1 parent 9d986d0 commit ee0be63
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,19 @@ public void render(final SignalTileEntity tile, final float tick, final PoseStac
public void renderAnimation(final RenderAnimationInfo info, final SignalTileEntity tile) {

final BlockState state = tile.getBlockState();
final SignalAngel angel = state.getValue(Signal.ANGEL);
final SignalAngel angle = state.getValue(Signal.ANGEL);

info.stack.pushPose(); // erst Berechnungen ausführen, dann Block rendern

info.stack.translate(0.5f, 0, 0.5f);
info.stack.mulPose(angel.getQuaternion());
info.stack.translate(0.5f, 0.5f, 0.5f);

info.stack.mulPose(angle.getQuaternion());
info.stack.translate(0.15f, 7f, -0.5f); // Block verschieben

info.stack.translate(0.5f, 7.5f, -0.5f); // Block verschieben
info.stack.mulPose(Quaternion.fromXYZ(0, 0, -tile.animProgress * 0.005f));
tile.updateAnim(); // Progress aktualisieren

info.stack.translate(-1, -4.5f, 0); // Pivot Punkt verschieben
info.stack.translate(-0.7f, -4.5f, 0f); // Pivot Punkt verschieben

// info.dispatcher.renderSingleBlock(Blocks.GLASS.defaultBlockState(),
// info.stack, info.source,
Expand All @@ -68,7 +69,8 @@ public void renderAnimation(final RenderAnimationInfo info, final SignalTileEnti

info.stack.popPose();

if (tile.animProgress > 180)
if (tile.animProgress > 158) {
tile.animProgress = 0;
}
}
}

0 comments on commit ee0be63

Please sign in to comment.