diff --git a/src/world/generator/object/grass/TallGrassObject.php b/src/world/generator/object/grass/TallGrassObject.php index bed196015..85b712ef0 100644 --- a/src/world/generator/object/grass/TallGrassObject.php +++ b/src/world/generator/object/grass/TallGrassObject.php @@ -45,7 +45,7 @@ class TallGrassObject{ $d = $level->getBlock(new Vector3($x, $pos->y, $z)); if($b->getID() === AIR and $d->getID() === GRASS){ $t = $arr[$random->nextRange(0, count($arr) - 1)]; - $level->setBlock($b, BlockAPI::get($t[0], $t[1])); + $level->setBlockRaw($b, BlockAPI::get($t[0], $t[1])); } } } diff --git a/src/world/generator/object/tree/PineTreeObject.php b/src/world/generator/object/tree/PineTreeObject.php index efe2ab55d..7411f5655 100644 --- a/src/world/generator/object/tree/PineTreeObject.php +++ b/src/world/generator/object/tree/PineTreeObject.php @@ -64,7 +64,7 @@ class PineTreeObject extends TreeObject{ if($this->leavesSizeY === -1 or $this->leavesAbsoluteMaxRadius === -1) { $this->findRandomLeavesSize($random); } - $level->setBlock(new Vector3($pos->x, $pos->y - 1, $pos->z), new DirtBlock()); + $level->setBlockRaw(new Vector3($pos->x, $pos->y - 1, $pos->z), new DirtBlock()); $leavesRadius = 0; $leavesMaxRadius = 1; $leavesBottomY = $this->totalHeight - $this->leavesSizeY; @@ -74,7 +74,7 @@ class PineTreeObject extends TreeObject{ for ($xx = -$leavesRadius; $xx <= $leavesRadius; ++$xx) { for ($zz = -$leavesRadius; $zz <= $leavesRadius; ++$zz) { if (abs($xx) != $leavesRadius or abs($zz) != $leavesRadius or $leavesRadius <= 0) { - $level->setBlock(new Vector3($pos->x + $xx, $pos->y + $yy, $pos->z + $zz), new LeavesBlock($this->type)); + $level->setBlockRaw(new Vector3($pos->x + $xx, $pos->y + $yy, $pos->z + $zz), new LeavesBlock($this->type)); } } } @@ -90,7 +90,7 @@ class PineTreeObject extends TreeObject{ } $trunkHeightReducer = $random->nextRange(0, 3); for($yy = 0; $yy < ($this->totalHeight - $trunkHeightReducer); ++$yy){ - $level->setBlock(new Vector3($pos->x, $pos->y + $yy, $pos->z), new WoodBlock($this->type)); + $level->setBlockRaw(new Vector3($pos->x, $pos->y + $yy, $pos->z), new WoodBlock($this->type)); } } diff --git a/src/world/generator/object/tree/SmallTreeObject.php b/src/world/generator/object/tree/SmallTreeObject.php index b594f97ca..e24dc5751 100644 --- a/src/world/generator/object/tree/SmallTreeObject.php +++ b/src/world/generator/object/tree/SmallTreeObject.php @@ -60,7 +60,7 @@ class SmallTreeObject extends TreeObject{ public function placeObject(Level $level, Vector3 $pos, Random $random){ // The base dirt block $dirtpos = new Vector3( $pos->x, $pos->y -1, $pos->z ); - $level->setBlock( $dirtpos, new DirtBlock() ); + $level->setBlockRaw( $dirtpos, new DirtBlock() ); // Adjust the tree trunk's height randomly // plot [-14:11] int( x / 8 ) + 5 @@ -93,7 +93,7 @@ class SmallTreeObject extends TreeObject{ $leafpos = new Vector3( $pos->x + $xx, $pos->y + $yy, $pos->z + $zz ); - $level->setBlock( $leafpos, new LeavesBlock( $this->type ) ); + $level->setBlockRaw($leafpos, new LeavesBlock( $this->type ) ); } } } @@ -104,7 +104,7 @@ class SmallTreeObject extends TreeObject{ if( $leaflevel > 1 ) { $trunkpos = new Vector3( $pos->x, $pos->y + $yy, $pos->z ); - $level->setBlock( $trunkpos, new WoodBlock( $this->type ) ); + $level->setBlockRaw($trunkpos, new WoodBlock( $this->type ) ); } } } diff --git a/src/world/generator/object/tree/SpruceTreeObject.php b/src/world/generator/object/tree/SpruceTreeObject.php index 38d297925..bd0091785 100644 --- a/src/world/generator/object/tree/SpruceTreeObject.php +++ b/src/world/generator/object/tree/SpruceTreeObject.php @@ -64,13 +64,13 @@ class SpruceTreeObject extends TreeObject{ if($this->leavesBottomY === -1 or $this->leavesMaxRadius === -1) { $this->findRandomLeavesSize(); } - $level->setBlock(new Vector3($pos->x, $pos->y - 1, $pos->z), new DirtBlock()); + $level->setBlockRaw(new Vector3($pos->x, $pos->y - 1, $pos->z), new DirtBlock()); $leavesRadius = 0; for($yy = $this->totalHeight; $yy >= $this->leavesBottomY; --$yy){ for($xx = -$leavesRadius; $xx <= $leavesRadius; ++$xx) { for($zz = -$leavesRadius; $zz <= $leavesRadius; ++$zz) { if (abs($xx) != $leavesRadius or abs($zz) != $leavesRadius or $leavesRadius <= 0) { - $level->setBlock(new Vector3($pos->x + $xx, $pos->y + $yy, $pos->z + $zz), new LeavesBLock($this->type)); + $level->setBlockRaw(new Vector3($pos->x + $xx, $pos->y + $yy, $pos->z + $zz), new LeavesBlock($this->type)); } } } @@ -81,7 +81,7 @@ class SpruceTreeObject extends TreeObject{ } } for($yy = 0; $yy < ($this->totalHeight - 1); ++$yy){ - $level->setBlock(new Vector3($pos->x, $pos->y + $yy, $pos->z), new WoodBlock($this->type)); + $level->setBlockRaw(new Vector3($pos->x, $pos->y + $yy, $pos->z), new WoodBlock($this->type)); } }