mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
fixed cactuses not getting dropped when the grow
This commit is contained in:
parent
c07c5e5abd
commit
e30586fff2
2 changed files with 3 additions and 2 deletions
|
|
@ -217,7 +217,7 @@ abstract class Block extends Position{
|
|||
public static function onRandomTick(Level $level, $x, $y, $z){}
|
||||
public static function fallOn(Level $level, $x, $y, $z, Entity $entity, $fallDistance){}
|
||||
public static function getCollisionBoundingBoxes(Level $level, $x, $y, $z, Entity $entity){
|
||||
return [new AxisAlignedBB($x, $y, $z, $x, $y, $z)];
|
||||
return [static::getAABB($level, $x, $y, $z)];
|
||||
}
|
||||
public static function onEntityCollidedWithBlock(Level $level, $x, $y, $z, Entity $entity){}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ class CactusBlock extends TransparentBlock{
|
|||
for($yy = 1; $yy < 3; ++$yy){
|
||||
$bID = $level->level->getBlockID($x, $y + $yy, $z);
|
||||
if($bID === AIR){
|
||||
$level->setBlock(new Position($x, $y + $yy, $z, $level), new CactusBlock(), true, false, true);
|
||||
$level->fastSetBlockUpdate($x, $y + $yy, $z, CACTUS, 0);
|
||||
$level->getBlockWithoutVector($x, $y + $yy, $z)->onUpdate(BLOCK_UPDATE_NORMAL); //TODO rewrite ticking
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue