use of org.lanternpowered.server.network.entity.EntityProtocolType in project LanternServer by LanternPowered.
the class LanternWorld method addEntity.
@Nullable
private LanternEntity addEntity(LanternEntity entity) {
final LanternEntity entity1 = this.entitiesByUniqueId.putIfAbsent(entity.getUniqueId(), entity);
if (entity1 != null) {
return entity1;
}
final EntityProtocolType entityProtocolType = entity.getEntityProtocolType();
if (entityProtocolType != null) {
this.entityProtocolManager.add(entity, entityProtocolType);
}
entity.setPositionAndWorld(this, entity.getPosition());
return null;
}
Aggregations