From adf406321a1f62bc0395622592ea4c756bf1297a Mon Sep 17 00:00:00 2001 From: onebeastchris Date: Fri, 19 Dec 2025 21:30:57 +0100 Subject: [PATCH] Log unknown implementations of GeyserEntityDefinition --- .../geysermc/geyser/entity/spawn/EntitySpawnContext.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/entity/spawn/EntitySpawnContext.java b/core/src/main/java/org/geysermc/geyser/entity/spawn/EntitySpawnContext.java index 618af0c8e..8b2b9140d 100644 --- a/core/src/main/java/org/geysermc/geyser/entity/spawn/EntitySpawnContext.java +++ b/core/src/main/java/org/geysermc/geyser/entity/spawn/EntitySpawnContext.java @@ -161,10 +161,11 @@ public class EntitySpawnContext { public void definition(@Nullable GeyserEntityDefinition entityDefinition) { if (entityDefinition == null) { bedrockEntityDefinition = null; + return; } if (!(entityDefinition instanceof BedrockEntityDefinition definition)) { - throw new IllegalStateException("Unknown implementation of GeyserEntityDefinition"); + throw new IllegalStateException("Unknown implementation of GeyserEntityDefinition! Got: " + entityDefinition.getClass().getSimpleName()); } if (!entityDefinition.registered()) { @@ -212,10 +213,11 @@ public class EntitySpawnContext { public void definition(@Nullable GeyserEntityDefinition entityDefinition) { if (entityDefinition == null) { bedrockEntityDefinition = null; + return; } if (!(entityDefinition instanceof BedrockEntityDefinition definition)) { - throw new IllegalStateException("Unknown implementation of GeyserEntityDefinition"); + throw new IllegalStateException("Unknown implementation of GeyserEntityDefinition! Got: " + entityDefinition.getClass().getSimpleName()); } if (!entityDefinition.registered()) {