mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Merge branch 'stable' into master
# Conflicts: # composer.lock # resources/vanilla # src/entity/Living.php # src/pocketmine/Player.php # src/pocketmine/VersionInfo.php # src/pocketmine/block/Potato.php # src/pocketmine/block/Sugarcane.php # src/pocketmine/entity/Entity.php # src/pocketmine/item/Item.php # src/pocketmine/level/format/Chunk.php # src/pocketmine/level/format/io/leveldb/LevelDB.php # src/world/generator/GeneratorRegisterTask.php # tests/phpstan/configs/check-explicit-mixed-baseline.neon # tests/phpstan/configs/l7-baseline.neon # tests/phpstan/configs/l8-baseline.neon # tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMainLoggerTest.php # tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskMemoryLeakTest.php # tests/plugins/TesterPlugin/src/pmmp/TesterPlugin/tests/AsyncTaskPublishProgressRaceTest.php
This commit is contained in:
@ -98,7 +98,12 @@ class Sugarcane extends Flowable{
|
||||
for($y = 1; $y < 3; ++$y){
|
||||
$b = $this->pos->getWorld()->getBlockAt($this->pos->x, $this->pos->y + $y, $this->pos->z);
|
||||
if($b->getId() === BlockLegacyIds::AIR){
|
||||
$this->pos->getWorld()->setBlock($b->pos, VanillaBlocks::SUGARCANE());
|
||||
$ev = new BlockGrowEvent($b, VanillaBlocks::SUGARCANE());
|
||||
$ev->call();
|
||||
if($ev->isCancelled()){
|
||||
break;
|
||||
}
|
||||
$this->pos->getWorld()->setBlock($b->pos, $ev->getNewState());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user