rewrite of interact system, bugfixes, ai tweaks

This commit is contained in:
GameHerobrine 2022-11-01 00:55:49 +03:00
parent f5222be9d2
commit ac1a1b2449
62 changed files with 649 additions and 491 deletions

View file

@ -1,6 +1,6 @@
<?php
class FlintSteelItem extends Item{
class FlintSteelItem extends ItemTool{
public function __construct($meta = 0, $count = 1){
parent::__construct(FLINT_STEEL, $meta, $count, "Flint and Steel");
$this->isActivable = true;
@ -20,7 +20,12 @@ class FlintSteelItem extends Item{
return false;
}
public function isTool(){
return true;
public function useOn($object, $force = false){
if(($object instanceof Creeper) and $this->id === FLINT_STEEL){
$this->meta++;
return true;
}else{
return parent::useOn($object, $force);
}
}
}