Merge branch 'master' into implement-gripping-execution-animation
This commit is contained in:
@@ -29,8 +29,9 @@ public class PlayerAnimationHandler {
|
|||||||
public static void onPlayerTick(TickEvent.PlayerTickEvent event) {
|
public static void onPlayerTick(TickEvent.PlayerTickEvent event) {
|
||||||
if (event.phase != TickEvent.Phase.END) return;
|
if (event.phase != TickEvent.Phase.END) return;
|
||||||
if (!(event.player instanceof AbstractClientPlayer player)) return;
|
if (!(event.player instanceof AbstractClientPlayer player)) return;
|
||||||
|
if (Minecraft.getInstance().player != player) return;
|
||||||
UUID playerId = player.getUUID();
|
UUID playerId = player.getUUID();
|
||||||
boolean shouldPlayExecution = ClientExecutionState.isExecutor(playerId);
|
boolean shouldPlayExecution = ClientExecutionState.isExecuting();
|
||||||
boolean wasPlaying = activeStates.getOrDefault(playerId, false);
|
boolean wasPlaying = activeStates.getOrDefault(playerId, false);
|
||||||
if (shouldPlayExecution == wasPlaying) return;
|
if (shouldPlayExecution == wasPlaying) return;
|
||||||
activeStates.put(playerId, shouldPlayExecution);
|
activeStates.put(playerId, shouldPlayExecution);
|
||||||
|
|||||||
Reference in New Issue
Block a user