3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-12-27 00:22:53 +01:00

Suppress stored entity warning if disabled in Via config

... pretty sure reports of this occurring are caused by HolographicDisplay, but still investigating ;)
Dieser Commit ist enthalten in:
KennyTV 2019-12-18 20:05:52 +01:00
Ursprung 6b8f9d87f2
Commit 12819a63a3

Datei anzeigen

@ -11,6 +11,7 @@ import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.data.EntityPositionSt
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.data.EntityTypeMapping;
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.storage.ChunkLightStorage;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.Via;
import us.myles.ViaVersion.api.entities.Entity1_13Types;
import us.myles.ViaVersion.api.entities.Entity1_14Types;
import us.myles.ViaVersion.api.entities.EntityType;
@ -514,7 +515,9 @@ public class EntityPackets1_14 extends EntityRewriter<Protocol1_13_2To1_14> {
int entityId = wrapper.get(Type.VAR_INT, 0);
Optional<EntityTracker.StoredEntity> optStoredEntity = getEntityTracker(wrapper.user()).getEntity(entityId);
if (!optStoredEntity.isPresent()) {
ViaBackwards.getPlatform().getLogger().warning("Stored entity with id " + entityId + " not found in packet " + Integer.toHexString(wrapper.getId()));
if (!Via.getConfig().isSuppressMetadataErrors()) {
ViaBackwards.getPlatform().getLogger().warning("Stored entity with id " + entityId + " missing at position: " + x + " - " + y + " - " + z);
}
return;
}