mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Hide out-of-range entity metadata IDs
The vanilla Java client gracefully ignores these.
This commit is contained in:
parent
117ebdd9c1
commit
25921e1d67
1 changed files with 2 additions and 1 deletions
|
@ -51,8 +51,9 @@ public class JavaSetEntityDataTranslator extends PacketTranslator<ClientboundSet
|
|||
EntityDefinition<?> definition = entity.getDefinition();
|
||||
for (EntityMetadata<?, ?> metadata : packet.getMetadata()) {
|
||||
if (metadata.getId() >= definition.translators().size()) {
|
||||
session.getGeyser().getLogger().warning("Metadata ID " + metadata.getId() + " is out of bounds of known entity metadata size " + definition.translators().size() + " for entity type " + entity.getDefinition().entityType());
|
||||
if (session.getGeyser().getConfig().isDebugMode()) {
|
||||
// Minecraft client just ignores these
|
||||
session.getGeyser().getLogger().warning("Metadata ID " + metadata.getId() + " is out of bounds of known entity metadata size " + definition.translators().size() + " for entity type " + entity.getDefinition().entityType());
|
||||
session.getGeyser().getLogger().debug(metadata.toString());
|
||||
}
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue