mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed bows not getting damaged
This commit is contained in:
parent
c5626bae34
commit
e047b6a870
@ -1576,6 +1576,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
if($this->isSurvival()){
|
||||
$this->inventory->removeItem(Item::get(Item::ARROW, 0, 1));
|
||||
$bow->setDamage($bow->getDamage() + 1);
|
||||
$this->inventory->setItemInHand($bow);
|
||||
if($bow->getDamage() >= 385){
|
||||
$this->inventory->setItemInHand(Item::get(Item::AIR, 0, 0));
|
||||
}
|
||||
|
@ -84,7 +84,6 @@ class Arrow extends Projectile{
|
||||
$nearDistance = PHP_INT_MAX;
|
||||
$nearEntity = null;
|
||||
|
||||
|
||||
foreach($list as $entity){
|
||||
if(!$entity->canCollideWith($this) or ($entity === $this->shootingEntity and $this->ticksLived < 5)){
|
||||
continue;
|
||||
|
@ -24,7 +24,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Bow extends Tool{
|
||||
public function __construct($meta = 0, $count = 1){
|
||||
parent::__construct(self::BOW, 0, $count, "Bow");
|
||||
parent::__construct(self::BOW, $meta, $count, "Bow");
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user