Skip to content

Commit 6b307dd

Browse files
committed
fix: different conditions for suffocation pre-b1.6
1 parent 47c150b commit 6b307dd

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/main/java/net/minecraft/server/EntityHuman.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,20 @@ public void die() {
639639
}
640640

641641
public boolean K() {
642-
return !this.sleeping && super.K();
642+
if (this.sleeping) {
643+
return false;
644+
}
645+
646+
// Uberbukkit - different conditions for suffocation pre-b1.6
647+
if (this instanceof EntityPlayer && ((EntityPlayer) this).netServerHandler.networkManager.pvn < 12) {
648+
int i = MathHelper.floor(this.locX);
649+
int j = MathHelper.floor(this.locY + (double) this.t());
650+
int k = MathHelper.floor(this.locZ);
651+
652+
return this.world.e(i, j, k);
653+
}
654+
655+
return super.K();
643656
}
644657

645658
public EnumBedError a(int i, int j, int k) {

0 commit comments

Comments
 (0)