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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user