fire block tweaks

This commit is contained in:
GameHerobrine 2024-05-24 12:27:38 +03:00
parent 5d5099c06f
commit f227daa1e0
2 changed files with 9 additions and 19 deletions

View file

@ -11,9 +11,9 @@ class FlintSteelItem extends ItemTool{
if(($player->gamemode & 0x01) === 0 and $this->useOn($block) 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);
$level->scheduleBlockUpdate($block, 30, BLOCK_UPDATE_SCHEDULED);
if($block->getID() === AIR && $target->isSolid){
$level->fastSetBlockUpdate($block->x, $block->y, $block->z, FIRE, 0, true);
return true;
}
return false;