| 684 | } |
| 685 | |
| 686 | void WorldGenerator::destructEntity(WorldStorage*, EntityPtr const& entity) { |
| 687 | if (entity->isSlave()) |
| 688 | throw StarException("Cannot destruct slave entity in WorldStorage, something has gone wrong!"); |
| 689 | if (auto tileEntity = as<TileEntity>(entity)) |
| 690 | m_worldServer->updateTileEntityTiles(tileEntity, true, false); |
| 691 | entity->uninit(); |
| 692 | } |
| 693 | |
| 694 | bool WorldGenerator::entityKeepAlive(WorldStorage*, EntityPtr const& entity) const { |
| 695 | return entity->isSlave() || (entity->isMaster() && entity->keepAlive()); |
no test coverage detected