From 617f1d38765bd44418451ee30fec2609b0544043 Mon Sep 17 00:00:00 2001 From: KennyTV <28825609+KennyTV@users.noreply.github.com> Date: Thu, 2 Jan 2020 18:25:43 +0100 Subject: [PATCH] Add additional info to entity warning in teleport packet --- .../protocol1_13_2to1_14/packets/EntityPackets1_14.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13_2to1_14/packets/EntityPackets1_14.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13_2to1_14/packets/EntityPackets1_14.java index 1ff43fdf..b939685d 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13_2to1_14/packets/EntityPackets1_14.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_13_2to1_14/packets/EntityPackets1_14.java @@ -35,6 +35,7 @@ import java.util.Optional; public class EntityPackets1_14 extends EntityRewriter { private static final double RELATIVE_MOVE_FACTOR = 32 * 128; + private boolean warnedForMissingEntity; @Override protected void addTrackedEntity(PacketWrapper wrapper, int entityId, EntityType type) throws Exception { @@ -517,6 +518,11 @@ public class EntityPackets1_14 extends EntityRewriter { if (!optStoredEntity.isPresent()) { if (!Via.getConfig().isSuppressMetadataErrors()) { ViaBackwards.getPlatform().getLogger().warning("Stored entity with id " + entityId + " missing at position: " + x + " - " + y + " - " + z); + if (!warnedForMissingEntity) { + warnedForMissingEntity = true; + ViaBackwards.getPlatform().getLogger().warning("This is very likely caused by a plugin sending a teleport packet for an entity outside of the player's range."); + ViaBackwards.getPlatform().getLogger().warning("You can disable this warning in the ViaVersion config under \"suppress-metadata-errors\""); + } } return; }