Ignore untracked entity meta

This commit is contained in:
kennytv 2021-07-11 17:35:17 +02:00
parent 6f2961a00b
commit fa707e5391
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
3 changed files with 3 additions and 5 deletions

View File

@ -64,10 +64,10 @@ public abstract class EntityRewriterBase<T extends BackwardsProtocol> extends En
@Override
public void handleMetadata(int entityId, List<Metadata> metadataList, UserConnection connection) {
super.handleMetadata(entityId, metadataList, connection);
EntityType type = tracker(connection).entityType(entityId);
if (type == null) return;
if (type == null) return; // Don't handle untracked entities - basically always the fault of a plugin sending virtual entities through concurrency-unsafe handling
super.handleMetadata(entityId, metadataList, connection);
EntityData entityData = entityDataForType(type);

View File

@ -328,7 +328,6 @@ public class EntityPackets1_13 extends LegacyEntityRewriter<Protocol1_12_2To1_13
typeId - 1
));
}
});
// Rewrite Custom Name from Chat to String

View File

@ -370,7 +370,6 @@ public class EntityPackets1_14 extends LegacyEntityRewriter<Protocol1_13_2To1_14
int blockstate = (Integer) meta.getValue();
meta.setValue(protocol.getMappingData().getNewBlockStateId(blockstate));
}
});
filter().type(Entity1_14Types.PILLAGER).cancel(15);