Fix flat worlds crashing when generating

This commit is contained in:
Dylan K. Taylor 2017-06-08 13:47:13 +01:00
parent d358e13868
commit 4a7abb7033

View File

@ -103,9 +103,9 @@ class Flat extends Generator{
$this->preset = $preset;
$preset = explode(";", $preset);
$version = (int) $preset[0];
$blocks = $preset[1] ?? "";
$biome = $preset[2] ?? 1;
$options = $preset[3] ?? "";
$blocks = (string) ($preset[1] ?? "");
$biome = (int) ($preset[2] ?? 1);
$options = (string) ($preset[3] ?? "");
$this->structure = self::parseLayers($blocks);
$this->chunks = [];