mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 00:09:39 +00:00
Merge 'minor-next' into 'major-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/14687149888
This commit is contained in:
commit
8e1426e25e
@ -2759,7 +2759,7 @@ class World implements ChunkManager{
|
|||||||
throw new AssumptionFailedError("Found two different entities sharing entity ID " . $entity->getId());
|
throw new AssumptionFailedError("Found two different entities sharing entity ID " . $entity->getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!EntityFactory::getInstance()->isRegistered($entity::class)){
|
if(!EntityFactory::getInstance()->isRegistered($entity::class) && !$entity instanceof Player){
|
||||||
//canSaveWithChunk is mutable, so that means it could be toggled after adding the entity and cause a crash
|
//canSaveWithChunk is mutable, so that means it could be toggled after adding the entity and cause a crash
|
||||||
//later on. Better we just force all entities to have a save ID, even if it might not be needed.
|
//later on. Better we just force all entities to have a save ID, even if it might not be needed.
|
||||||
throw new \LogicException("Entity " . $entity::class . " is not registered for a save ID in EntityFactory");
|
throw new \LogicException("Entity " . $entity::class . " is not registered for a save ID in EntityFactory");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user