Implement difficulty per-world (#878)

* Moved Server::getDifficultyFromString() to Level
* Added ability to set difficulty in worlds section of pocketmine.yml for generation
This commit is contained in:
Dylan K. Taylor
2017-09-26 11:16:51 +01:00
committed by GitHub
parent e64076ec81
commit 38fad4b963
9 changed files with 132 additions and 50 deletions

View File

@ -362,7 +362,7 @@ abstract class Living extends Entity implements Damageable{
if($e !== null){
if($e->isOnFire() > 0){
$this->setOnFire(2 * $this->server->getDifficulty());
$this->setOnFire(2 * $this->level->getDifficulty());
}
$deltaX = $this->x - $e->x;