From 20b83007a812ec3922bc9df0db4ac9d81738d402 Mon Sep 17 00:00:00 2001 From: thedarkcolour <30441001+thedarkcolour@users.noreply.github.com> Date: Fri, 15 May 2026 17:36:33 -0700 Subject: [PATCH] Prevent End Cake from crashing fake players Closes #178 --- changelog.md | 1 + src/main/java/thedarkcolour/exdeorum/block/EndCakeBlock.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 27019d1d..dbc527da 100644 --- a/changelog.md +++ b/changelog.md @@ -11,6 +11,7 @@ - Added new Sand sieve drops: - Dry Short Grass now drops from String Mesh - Fixed Compressed Sieves not allowing simultaneous insertion of material even when Simultaneous Compressed Sieve Usage was enabled +- Fixed End Cakes crashing fake players (#178) ## Ex Deorum 3.10 - Now requires KubeJS 7.2 to fix incompatibility (#158) diff --git a/src/main/java/thedarkcolour/exdeorum/block/EndCakeBlock.java b/src/main/java/thedarkcolour/exdeorum/block/EndCakeBlock.java index f5549fa6..9f594d32 100644 --- a/src/main/java/thedarkcolour/exdeorum/block/EndCakeBlock.java +++ b/src/main/java/thedarkcolour/exdeorum/block/EndCakeBlock.java @@ -89,8 +89,10 @@ public class EndCakeBlock extends CakeBlock { return InteractionResult.PASS; } - // todo test private static boolean tryTeleport(ServerLevel level, Player player) { + // avoid crashing with fake players (#178) + if (player.isFakePlayer()) return false; + if (level.dimension() != Level.END) { var endLevel = level.getServer().getLevel(Level.END);