From 4a58ac2ad8378a45f7a97535aa72ced6ba476454 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Mon, 3 Apr 2023 22:56:04 +0300 Subject: [PATCH] flint and steel should destroy on serverside too now --- src/material/item/tool/FlintSteelItem.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/material/item/tool/FlintSteelItem.php b/src/material/item/tool/FlintSteelItem.php index 91fea310..e7ca11f5 100644 --- a/src/material/item/tool/FlintSteelItem.php +++ b/src/material/item/tool/FlintSteelItem.php @@ -9,9 +9,8 @@ class FlintSteelItem extends ItemTool{ public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ if(($player->gamemode & 0x01) === 0 and $this->useOn($block) and $this->getMetadata() >= $this->getMaxDurability()){ - $player->setSlot($player->slot, new Item(AIR, 0, 0), false); //TODO check + $player->setSlot($player->slot, new Item(AIR, 0, 0), false); //TODO check } - if($block->getID() === AIR and ($target instanceof SolidBlock)){ $level->setBlock($block, new FireBlock(), true, false, true); $block->level->scheduleBlockUpdate($block, Utils::getRandomUpdateTicks(), BLOCK_UPDATE_RANDOM); @@ -21,11 +20,7 @@ class FlintSteelItem extends ItemTool{ } public function useOn($object, $force = false){ - if(($object instanceof Creeper) and $this->id === FLINT_STEEL){ - $this->meta++; - return true; - }else{ - return $force ? parent::useOn($object, $force) : $force; - } + ++$this->meta; + return true; } } \ No newline at end of file