Fixed some bad defaults, improved spawning

This commit is contained in:
Shoghi Cervantes 2015-04-27 14:19:01 +02:00
parent ef00103fec
commit 6fc7ee2775
2 changed files with 5 additions and 3 deletions

View File

@ -67,11 +67,11 @@ class MemoryManager{
$this->continuousTrigger = (bool) $this->server->getProperty("memory.continuous-trigger", true); $this->continuousTrigger = (bool) $this->server->getProperty("memory.continuous-trigger", true);
$this->continuousTriggerRate = (int) $this->server->getProperty("memory.continuous-trigger-rate", 30); $this->continuousTriggerRate = (int) $this->server->getProperty("memory.continuous-trigger-rate", 30);
$this->garbageCollectionPeriod = (int) $this->server->getProperty("memory.garbage-collection.period", 12000); $this->garbageCollectionPeriod = (int) $this->server->getProperty("memory.garbage-collection.period", 36000);
$this->garbageCollectionTrigger = (bool) $this->server->getProperty("memory.garbage-collection.low-memory-trigger", true); $this->garbageCollectionTrigger = (bool) $this->server->getProperty("memory.garbage-collection.low-memory-trigger", true);
$this->garbageCollectionAsync = (bool) $this->server->getProperty("memory.garbage-collection.collect-async-worker", true); $this->garbageCollectionAsync = (bool) $this->server->getProperty("memory.garbage-collection.collect-async-worker", true);
$this->chunkLimit = (int) $this->server->getProperty("memory.max-chunks.trigger-limit", 12000); $this->chunkLimit = (int) $this->server->getProperty("memory.max-chunks.trigger-limit", 96);
$this->chunkCollect = (bool) $this->server->getProperty("memory.max-chunks.trigger-chunk-collect", true); $this->chunkCollect = (bool) $this->server->getProperty("memory.max-chunks.trigger-chunk-collect", true);
$this->chunkTrigger = (bool) $this->server->getProperty("memory.max-chunks.low-memory-trigger", true); $this->chunkTrigger = (bool) $this->server->getProperty("memory.max-chunks.low-memory-trigger", true);

View File

@ -648,7 +648,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$this->level->requestChunk($X, $Z, $this, LevelProvider::ORDER_ZXY); $this->level->requestChunk($X, $Z, $this, LevelProvider::ORDER_ZXY);
} }
if($this->chunkLoadCount >= $this->spawnThreshold and $this->spawned === false){ if($this->chunkLoadCount >= $this->spawnThreshold and $this->spawned === false and $this->teleportPosition === null){
$this->spawned = true; $this->spawned = true;
$this->sendSettings(); $this->sendSettings();
@ -1608,6 +1608,8 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$this->dataPacket($pk->setChannel(Network::CHANNEL_PRIORITY)); $this->dataPacket($pk->setChannel(Network::CHANNEL_PRIORITY));
} }
$this->teleportPosition = $this->getPosition();
$this->orderChunks(); $this->orderChunks();
$this->sendNextChunk(); $this->sendNextChunk();
break; break;