mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
fix zombie drops
This commit is contained in:
parent
7db8345424
commit
f25255e46c
@ -40,9 +40,9 @@ class Zombie extends Monster{
|
||||
|
||||
public function getDrops() : array{
|
||||
$drops = [
|
||||
ItemFactory::get(ItemItem::FEATHER, 0, 1)
|
||||
ItemFactory::get(ItemItem::ROTTEN_FLESH, 0, 1)
|
||||
];
|
||||
if($this->lastDamageCause instanceof EntityDamageByEntityEvent and $this->lastDamageCause->getEntity() instanceof Player){
|
||||
|
||||
if(mt_rand(0, 199) < 5){
|
||||
switch(mt_rand(0, 2)){
|
||||
case 0:
|
||||
@ -56,7 +56,6 @@ class Zombie extends Monster{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $drops;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user