mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
fix of small error in drop
This commit is contained in:
parent
3892d697f8
commit
6ee84717f8
2 changed files with 4 additions and 5 deletions
|
|
@ -104,9 +104,8 @@ abstract class Animal extends Creature implements Ageable, Breedable{
|
||||||
|
|
||||||
public function getDrops(){
|
public function getDrops(){
|
||||||
if($this->isBaby()){
|
if($this->isBaby()){
|
||||||
return array(
|
return [];
|
||||||
array(AIR, 0, 0),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
return parent::getDrops();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -287,7 +287,7 @@ class Entity extends Position
|
||||||
public function getDrops()
|
public function getDrops()
|
||||||
{
|
{
|
||||||
if($this->class === ENTITY_PLAYER and $this->player instanceof Player and ($this->player->gamemode & 0x01) === 0){
|
if($this->class === ENTITY_PLAYER and $this->player instanceof Player and ($this->player->gamemode & 0x01) === 0){
|
||||||
$inv = array();
|
$inv = [];
|
||||||
for($i = 0; $i < PLAYER_SURVIVAL_SLOTS; ++ $i){
|
for($i = 0; $i < PLAYER_SURVIVAL_SLOTS; ++ $i){
|
||||||
$slot = $this->player->getSlot($i);
|
$slot = $this->player->getSlot($i);
|
||||||
$this->player->setSlot($i, BlockAPI::getItem(AIR, 0, 0));
|
$this->player->setSlot($i, BlockAPI::getItem(AIR, 0, 0));
|
||||||
|
|
@ -312,7 +312,7 @@ class Entity extends Position
|
||||||
}
|
}
|
||||||
return $inv;
|
return $inv;
|
||||||
}
|
}
|
||||||
return array();
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function spawnDrops()
|
private function spawnDrops()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue