removed 2 useless handlers from Player(they were not sending any data to player), fixed bug 158

This commit is contained in:
GameHerobrine 2023-01-31 18:37:32 +03:00
parent a66176b75d
commit ad17a6880a
6 changed files with 10 additions and 17 deletions

View file

@ -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;