1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2025-12-30 12:19:10 +00:00

Log unknown implementations of GeyserEntityDefinition

This commit is contained in:
onebeastchris
2025-12-19 21:30:57 +01:00
parent 2916f3f18f
commit adf406321a

View File

@@ -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()) {