tweaks to inv to make it better on serverside, fixed eattile, spiders are a bit faster

This commit is contained in:
GameHerobrine 2024-07-04 01:56:40 +03:00
parent e28498c4c2
commit 89717f86a4
4 changed files with 32 additions and 31 deletions

View file

@ -12,7 +12,10 @@ abstract class ItemTool extends Item
return true;
}
public function useOn($object, $force = false){
if(($object instanceof Entity) and !$this->isSword()){
if($this->isSword() && !($object instanceof Entity)){
$this->meta += 2;
}else if(($object instanceof Entity) && !$this->isSword()){
$this->meta += 2;
}else{
$this->meta++;