Executions can now be cancelled, Properly implemented gripping progress bar, recovery timer is paused while getting carried, some bug fixes

This commit is contained in:
IM23a-spirgif
2025-04-27 22:03:13 +02:00
parent 9e6b1af77e
commit f803d277e0
4 changed files with 33 additions and 13 deletions
@@ -84,10 +84,18 @@ public class PlayerExecutionHandler {
ServerPlayer knocked = getPlayerByUuid(knockedId);
if (knocked != null) {
knocked.sendSystemMessage(Component.literal("Execution interrupted!"));
NetworkHandler.CHANNEL.send(
PacketDistributor.PLAYER.with(() -> knocked),
new ExecutionProgressPacket(0)
);
}
ServerPlayer executor = getPlayerByUuid(attempt.executorUuid);
if (executor != null) {
executor.sendSystemMessage(Component.literal("Your execution was interrupted!"));
NetworkHandler.CHANNEL.send(
PacketDistributor.PLAYER.with(() -> executor),
new ExecutionProgressPacket(0)
);
}
}
}