Made it so neutral mobs can kill you and fixed gravity when knocked.

This commit is contained in:
IM23a-spirgif
2025-07-23 23:43:56 +02:00
parent 843ffc4ae6
commit bd62a201f9
4 changed files with 29 additions and 6 deletions
@@ -16,10 +16,10 @@ public class KnockedEffect {
public static void onPlayerTick(LivingEvent.LivingTickEvent event) {
if (!(event.getEntity() instanceof Player player)) return;
if (KnockedManager.isKnocked(player)) {
player.setDeltaMovement(0, 0, 0);
player.setSprinting(false);
player.hurtMarked = true;
player.setNoGravity(false);
player.setDeltaMovement(0, player.getDeltaMovement().y(), 0);
}
}