mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-19 16:28:13 +01:00
Suppress stored entity warning if disabled in Via config
... pretty sure reports of this occurring are caused by HolographicDisplay, but still investigating ;)
This commit is contained in:
parent
6b8f9d87f2
commit
12819a63a3
@ -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.data.EntityTypeMapping;
|
||||||
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.storage.ChunkLightStorage;
|
import nl.matsv.viabackwards.protocol.protocol1_13_2to1_14.storage.ChunkLightStorage;
|
||||||
import us.myles.ViaVersion.api.PacketWrapper;
|
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_13Types;
|
||||||
import us.myles.ViaVersion.api.entities.Entity1_14Types;
|
import us.myles.ViaVersion.api.entities.Entity1_14Types;
|
||||||
import us.myles.ViaVersion.api.entities.EntityType;
|
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);
|
int entityId = wrapper.get(Type.VAR_INT, 0);
|
||||||
Optional<EntityTracker.StoredEntity> optStoredEntity = getEntityTracker(wrapper.user()).getEntity(entityId);
|
Optional<EntityTracker.StoredEntity> optStoredEntity = getEntityTracker(wrapper.user()).getEntity(entityId);
|
||||||
if (!optStoredEntity.isPresent()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user