mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-03 16:49:53 +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{
|
public function getDrops() : array{
|
||||||
$drops = [
|
$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){
|
if(mt_rand(0, 199) < 5){
|
||||||
switch(mt_rand(0, 2)){
|
switch(mt_rand(0, 2)){
|
||||||
case 0:
|
case 0:
|
||||||
@ -56,7 +56,6 @@ class Zombie extends Monster{
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $drops;
|
return $drops;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user