mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
removed 2 useless handlers from Player(they were not sending any data to player), fixed bug 158
This commit is contained in:
parent
a66176b75d
commit
ad17a6880a
6 changed files with 10 additions and 17 deletions
|
|
@ -75,11 +75,14 @@ class Sheep extends Animal{
|
|||
$slot = $e->player->getHeldItem();
|
||||
if($slot->getID() === SHEARS){
|
||||
if(!$this->isSheared()){
|
||||
if($e->player->gamemode != 1) $slot->useOn($this);
|
||||
$this->setSheared(1);
|
||||
$this->server->api->entity->drop($this, BlockAPI::getItem(WOOL, $this->getColor(), mt_rand(1, 3)));
|
||||
//$this->server->schedule(20, [$this, "eatGrass"]);
|
||||
if($slot->getMetadata() >= $slot->getMaxDurability()){
|
||||
$e->player->removeItem($slot->getID(), $slot->getMetadata(), $slot->count, true);
|
||||
}else{
|
||||
$e->player->setSlot($e->player->slot, $slot);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue