Merge 'minor-next' into 'major-next'

Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/14687149888
This commit is contained in:
pmmp-admin-bot[bot] 2025-04-27 01:46:41 +00:00
commit 8e1426e25e

View File

@ -2759,7 +2759,7 @@ class World implements ChunkManager{
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
//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");