Prevent End Cake from crashing fake players

Closes #178
This commit is contained in:
thedarkcolour 2026-05-31 14:19:48 -07:00
parent fda9268490
commit 3a532ff569
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,6 @@
## Ex Deorum 3.11
- Fixed End Cakes crashing fake players (#178)
## Ex Deorum 3.10
- Now requires KubeJS 7.2 to fix incompatibility (#158)

View File

@ -89,8 +89,9 @@ public class EndCakeBlock extends CakeBlock {
return InteractionResult.PASS;
}
// todo test
private static boolean tryTeleport(ServerLevel level, Player player) {
if (player.isFakePlayer()) return false;
if (level.dimension() != Level.END) {
var endLevel = level.getServer().getLevel(Level.END);