/* * Decompiled with CFR 0.152. * * Could not load the following classes: * com.mojang.serialization.MapCodec */ package net.minecraft.world.level.block; import com.mojang.serialization.MapCodec; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.tags.BlockTags; import net.minecraft.util.RandomSource; import net.minecraft.world.level.LevelReader; import net.minecraft.world.level.ScheduledTickAccess; import net.minecraft.world.level.block.BaseFireBlock; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; public class SoulFireBlock extends BaseFireBlock { public static final MapCodec CODEC = SoulFireBlock.simpleCodec(SoulFireBlock::new); public MapCodec codec() { return CODEC; } public SoulFireBlock(BlockBehaviour.Properties properties) { super(properties, 2.0f); } @Override protected BlockState updateShape(BlockState state, LevelReader level, ScheduledTickAccess ticks, BlockPos pos, Direction directionToNeighbour, BlockPos neighbourPos, BlockState neighbourState, RandomSource random) { if (this.canSurvive(state, level, pos)) { return this.defaultBlockState(); } return Blocks.AIR.defaultBlockState(); } @Override protected boolean canSurvive(BlockState state, LevelReader level, BlockPos pos) { return SoulFireBlock.canSurviveOnBlock(level.getBlockState(pos.below())); } public static boolean canSurviveOnBlock(BlockState state) { return state.is(BlockTags.SOUL_FIRE_BASE_BLOCKS); } @Override protected boolean canBurn(BlockState state) { return true; } }