Skip to content

Commit 44fa08b

Browse files
committed
修复持续挖掘方块时的挥动效果
1 parent bdcf19e commit 44fa08b

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/main/java/com/elfmcys/yesstevemodel/client/animation/AnimationManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,7 @@ public PlayState predicateUse(AnimationEvent<CustomPlayerEntity> event) {
244244
}
245245
if (player.isHandActive() && !player.isPlayerSleeping()) {
246246
if (player.getItemInUseMaxCount() == 1) {
247-
event.getController().shouldResetTick = true;
248-
event.getController().adjustTick(0);
247+
playAnimation(event, "empty", ILoopType.EDefaultLoopTypes.PLAY_ONCE);
249248
}
250249
// if (Loader.isModLoaded(TAC_ID) && TacGunRenderer.isGrenade(player.getUseItem())) {
251250
// return TacGunRenderer.playGrenadeAnimation(event, player.getUsedItemHand());

src/main/java/com/elfmcys/yesstevemodel/client/entity/CustomPlayerEntity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void registerControllers(AnimationData data) {
4747
this.addManagedController(data, "main_controller", 2, manager::predicateMain);
4848
this.addManagedController(data, "hold_offhand_controller", 0, manager::predicateOffhandHold);
4949
this.addManagedController(data, "hold_mainhand_controller", 0, manager::predicateMainhandHold);
50-
this.addManagedController(data, "swing_controller", 2, manager::predicateSwing);
50+
this.addManagedController(data, "swing_controller", 0, manager::predicateSwing);
5151
this.addManagedController(data, "use_controller", 2, manager::predicateUse);
5252
for (int i = 0; i < 8; i++) {
5353
String controllerName = String.format("parallel_%d_controller", i);

0 commit comments

Comments
 (0)