Yatopia/patches/Purpur/patches/server/0048-Players-should-not-cra...

20 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sun, 21 Jul 2019 18:01:46 -0500
Subject: [PATCH] Players should not cram to death
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 64de6be4f9e740a2a036b202789be0a28b175575..a609d62b6ad8b3be8fc6ae85dc3b1bcc0513a121 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1426,7 +1426,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@Override
public boolean isInvulnerable(DamageSource damagesource) {
- return super.isInvulnerable(damagesource) || this.H() || this.abilities.isInvulnerable && damagesource == DamageSource.WITHER;
+ return super.isInvulnerable(damagesource) || this.H() || damagesource == DamageSource.CRAMMING || this.abilities.isInvulnerable && damagesource == DamageSource.WITHER; // Purpur
}
@Override