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
@@ -65,6 +65,17 @@ public class KnockedManager {
Map.Entry<UUID, Integer> entry = it.next();
UUID playerId = entry.getKey();
int timeLeft = entry.getValue();
if ( grippedEntities.contains(playerId)
|| CarryManager.isBeingCarried(playerId) ) {
ServerPlayer p = NetworkHandlerHelper.getPlayerByUuid(server, playerId);
if (p != null) {
NetworkHandler.CHANNEL.send(
PacketDistributor.PLAYER.with(() -> p),
new KnockedTimePacket(timeLeft)
);
}
continue;
}
if (MobKillHandler.isBeingMobExecuted(playerId)
|| PlayerExecutionHandler.isBeingPlayerExecuted(playerId)) {
ServerPlayer p = NetworkHandlerHelper.getPlayerByUuid(server, playerId);