mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
Merge changes from master
This commit is contained in:
@ -26,6 +26,7 @@ namespace pocketmine\entity;
|
||||
use pocketmine\event\entity\EntityDamageByEntityEvent;
|
||||
use pocketmine\event\entity\EntityDamageEvent;
|
||||
use pocketmine\item\Item as ItemItem;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\network\mcpe\protocol\AddEntityPacket;
|
||||
use pocketmine\network\mcpe\protocol\EntityEventPacket;
|
||||
@ -53,8 +54,8 @@ class Squid extends WaterAnimal{
|
||||
return "Squid";
|
||||
}
|
||||
|
||||
public function attack($damage, EntityDamageEvent $source){
|
||||
parent::attack($damage, $source);
|
||||
public function attack(EntityDamageEvent $source){
|
||||
parent::attack($source);
|
||||
if($source->isCancelled()){
|
||||
return;
|
||||
}
|
||||
@ -143,7 +144,7 @@ class Squid extends WaterAnimal{
|
||||
|
||||
public function getDrops() : array{
|
||||
return [
|
||||
ItemItem::get(ItemItem::DYE, 0, mt_rand(1, 3))
|
||||
ItemFactory::get(ItemItem::DYE, 0, mt_rand(1, 3))
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user