/* * 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.core.cauldron.CauldronInteraction; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.InsideBlockEffectApplier; import net.minecraft.world.entity.InsideBlockEffectType; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.AbstractCauldronBlock; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.shapes.Shapes; import net.minecraft.world.phys.shapes.VoxelShape; public class LavaCauldronBlock extends AbstractCauldronBlock { public static final MapCodec CODEC = LavaCauldronBlock.simpleCodec(LavaCauldronBlock::new); private static final VoxelShape SHAPE_INSIDE = Block.column(12.0, 4.0, 15.0); private static final VoxelShape FILLED_SHAPE = Shapes.or(AbstractCauldronBlock.SHAPE, SHAPE_INSIDE); public MapCodec codec() { return CODEC; } public LavaCauldronBlock(BlockBehaviour.Properties properties) { super(properties, CauldronInteraction.LAVA); } @Override protected double getContentHeight(BlockState state) { return 0.9375; } @Override public boolean isFull(BlockState state) { return true; } @Override protected VoxelShape getEntityInsideCollisionShape(BlockState state, BlockGetter level, BlockPos pos, Entity entity) { return FILLED_SHAPE; } @Override protected void entityInside(BlockState state, Level level, BlockPos pos, Entity entity, InsideBlockEffectApplier effectApplier, boolean isPrecise) { effectApplier.apply(InsideBlockEffectType.CLEAR_FREEZE); effectApplier.apply(InsideBlockEffectType.LAVA_IGNITE); effectApplier.runAfter(InsideBlockEffectType.LAVA_IGNITE, Entity::lavaHurt); } @Override protected int getAnalogOutputSignal(BlockState state, Level level, BlockPos pos, Direction direction) { return 3; } }