diff --git a/src/material/block/solid/Glowstone.php b/src/material/block/solid/Glowstone.php index abbddfd9d..52141d9b8 100644 --- a/src/material/block/solid/Glowstone.php +++ b/src/material/block/solid/Glowstone.php @@ -19,7 +19,7 @@ * */ -class GlowstoneBlock extends SolidBlock{ +class GlowstoneBlock extends TransparentBlock{ public function __construct(){ parent::__construct(GLOWSTONE_BLOCK, 0, "Glowstone"); } diff --git a/src/material/item/tool/FlintSteel.php b/src/material/item/tool/FlintSteel.php index 37452ed07..3c9af6c07 100644 --- a/src/material/item/tool/FlintSteel.php +++ b/src/material/item/tool/FlintSteel.php @@ -27,14 +27,15 @@ class FlintSteelItem extends Item{ } public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){ - if($block->getID() === AIR){ + if($this->useOn($block) and ($player->gamemode & 0x01) === 0 and $this->getMetadata() >= $this->getMaxDurability()){ + $player->setSlot($player->slot, new Item(AIR, 0, 0), false); + } + + if($block->getID() === AIR and ($target instanceof SolidBlock)){ $level->setBlock($block, new FireBlock(), true, false, true); $block->level->scheduleBlockUpdate(new Position($block, 0, 0, $block->level), Utils::getRandomUpdateTicks(), BLOCK_UPDATE_RANDOM); return true; } - if($this->useOn($block) and ($player->gamemode & 0x01) === 0 and $this->getMetadata() >= $this->getMaxDurability()){ - $player->setSlot($player->slot, new Item(AIR, 0, 0), false); - } return false; } } \ No newline at end of file