mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Merge branch '3.6'
This commit is contained in:
@ -65,8 +65,10 @@ class Ladder extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function onEntityInside(Entity $entity) : void{
|
public function onEntityInside(Entity $entity) : void{
|
||||||
$entity->resetFallDistance();
|
if($entity->asVector3()->floor()->distanceSquared($this) < 1){ //entity coordinates must be inside block
|
||||||
$entity->onGround = true;
|
$entity->resetFallDistance();
|
||||||
|
$entity->onGround = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function recalculateBoundingBox() : ?AxisAlignedBB{
|
protected function recalculateBoundingBox() : ?AxisAlignedBB{
|
||||||
|
@ -23,6 +23,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
|
use pocketmine\item\Item;
|
||||||
|
|
||||||
class PackedIce extends Solid{
|
class PackedIce extends Solid{
|
||||||
|
|
||||||
public function getHardness() : float{
|
public function getHardness() : float{
|
||||||
@ -36,4 +38,8 @@ class PackedIce extends Solid{
|
|||||||
public function getToolType() : int{
|
public function getToolType() : int{
|
||||||
return BlockToolType::TYPE_PICKAXE;
|
return BlockToolType::TYPE_PICKAXE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getDropsForCompatibleTool(Item $item) : array{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,7 +123,7 @@ class Arrow extends Projectile{
|
|||||||
|
|
||||||
$hasUpdate = parent::entityBaseTick($tickDiff);
|
$hasUpdate = parent::entityBaseTick($tickDiff);
|
||||||
|
|
||||||
if($this->isCollided){
|
if($this->blockHit !== null){
|
||||||
$this->collideTicks += $tickDiff;
|
$this->collideTicks += $tickDiff;
|
||||||
if($this->collideTicks > 1200){
|
if($this->collideTicks > 1200){
|
||||||
$this->flagForDespawn();
|
$this->flagForDespawn();
|
||||||
|
Reference in New Issue
Block a user