mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-11 00:09:39 +00:00
Fixed Flat generator using item ID/damage to build block layers
This commit is contained in:
parent
36548a335c
commit
706082deb1
@ -86,7 +86,7 @@ class Flat extends Generator{
|
||||
preg_match_all('#^(([0-9]*x|)([0-9]{1,3})(|:[0-9]{0,2}))$#m', str_replace(",", "\n", $layers), $matches);
|
||||
$y = 0;
|
||||
foreach($matches[3] as $i => $b){
|
||||
$b = ItemFactory::fromString($b . $matches[4][$i]);
|
||||
$b = ItemFactory::fromString($b . $matches[4][$i])->getBlock();
|
||||
$cnt = $matches[2][$i] === "" ? 1 : (int) $matches[2][$i];
|
||||
for($cY = $y, $y += $cnt; $cY < $y; ++$cY){
|
||||
$result[$cY] = [$b->getId(), $b->getDamage()];
|
||||
|
Loading…
x
Reference in New Issue
Block a user