readded ability to keep chunks unloaded, fixed entities falling on farmland

This commit is contained in:
GameHerobrine 2024-05-30 03:26:49 +03:00
parent 7bc97cca37
commit 8353607451
4 changed files with 13 additions and 7 deletions

View file

@ -40,12 +40,16 @@ class LevelAPI{
console("[ERROR] Could not load level \"" . $name . "\"");
return false;
}
for($X = 0; $X < 16; ++$X){
for($Z = 0; $Z < 16; ++$Z){
$level->loadChunk($X, $Z);
if(PocketMinecraftServer::$KEEP_CHUNKS_LOADED){
for($X = 0; $X < 16; ++$X){
for($Z = 0; $Z < 16; ++$Z){
$level->loadChunk($X, $Z);
}
}
}
$entities = new Config($path . "entities.yml", CONFIG_YAML);
if(file_exists($path . "tileEntities.yml")){
@rename($path . "tileEntities.yml", $path . "tiles.yml");