From 35508c3635b43f8fa8156445885b373664a1a035 Mon Sep 17 00:00:00 2001 From: gnembon Date: Wed, 25 Aug 2021 00:17:31 -0300 Subject: [PATCH] Compatibility with paper cardboard. Fixes #1078 --- src/main/java/carpet/patches/EntityPlayerMPFake.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/carpet/patches/EntityPlayerMPFake.java b/src/main/java/carpet/patches/EntityPlayerMPFake.java index 19dafed4..885a5054 100644 --- a/src/main/java/carpet/patches/EntityPlayerMPFake.java +++ b/src/main/java/carpet/patches/EntityPlayerMPFake.java @@ -135,8 +135,14 @@ public class EntityPlayerMPFake extends ServerPlayerEntity this.getServerWorld().getChunkManager().updatePosition(this); onTeleportationDone(); //<- causes hard crash but would need to be done to enable portals // not as of 1.17 } - super.tick(); - this.playerTick(); + try + { + super.tick(); + this.playerTick(); + } + catch (NullPointerException ignored) { } // happens with that paper port thingy - not sure what that would fix, but hey + // the game not gonna crash violently. + } private void shakeOff()