diff --git a/src/block/Bamboo.php b/src/block/Bamboo.php index 171491406..08817d12d 100644 --- a/src/block/Bamboo.php +++ b/src/block/Bamboo.php @@ -115,7 +115,7 @@ class Bamboo extends Transparent{ return 12 + (self::getOffsetSeed($x, 0, $z) % 5); } - public function getPositionOffset() : ?Vector3{ + public function getModelPositionOffset() : ?Vector3{ $seed = self::getOffsetSeed($this->position->getFloorX(), 0, $this->position->getFloorZ()); $retX = (($seed % 12) + 1) / 16; $retZ = ((($seed >> 8) % 12) + 1) / 16; diff --git a/src/block/Block.php b/src/block/Block.php index 1ef2ccee0..2de12ce58 100644 --- a/src/block/Block.php +++ b/src/block/Block.php @@ -577,7 +577,7 @@ class Block{ final public function getCollisionBoxes() : array{ if($this->collisionBoxes === null){ $this->collisionBoxes = $this->recalculateCollisionBoxes(); - $extraOffset = $this->getPositionOffset(); + $extraOffset = $this->getModelPositionOffset(); $offset = $extraOffset !== null ? $this->position->addVector($extraOffset) : $this->position; foreach($this->collisionBoxes as $bb){ $bb->offset($offset->x, $offset->y, $offset->z); @@ -588,10 +588,10 @@ class Block{ } /** - * Returns an additional fractional vector to shift the block's effective position by based on the current position. + * Returns an additional fractional vector to shift the block model's position by based on the current position. * Used to randomize position of things like bamboo canes and tall grass. */ - public function getPositionOffset() : ?Vector3{ + public function getModelPositionOffset() : ?Vector3{ return null; }