package net.minecraft.world.level.block;

import net.minecraft.tags.Tag;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.level.LevelReader;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.BlockBehaviour;

public class SoulFireBlock extends BaseFireBlock {
    public SoulFireBlock(final Properties c) {
        super(c, 2.0f);
    }
    
    @Override
    public BlockState updateShape(final BlockState cfj1, final Direction fz, final BlockState cfj3, final LevelAccessor bqc, final BlockPos fu5, final BlockPos fu6) {
        if (this.canSurvive(cfj1, bqc, fu5)) {
            return this.defaultBlockState();
        }
        return Blocks.AIR.defaultBlockState();
    }
    
    @Override
    public boolean canSurvive(final BlockState cfj, final LevelReader bqd, final BlockPos fu) {
        return canSurviveOnBlock(bqd.getBlockState(fu.below()).getBlock());
    }
    
    public static boolean canSurviveOnBlock(final Block bvr) {
        return bvr.is(BlockTags.SOUL_FIRE_BASE_BLOCKS);
    }
    
    @Override
    protected boolean canBurn(final BlockState cfj) {
        return true;
    }
}
