diff --git a/src/main/java/pl/xyundy/squaredadditions/block/MixedSlabBlock.java b/src/main/java/pl/xyundy/squaredadditions/block/MixedSlabBlock.java index 4c6d5c9..a27944a 100644 --- a/src/main/java/pl/xyundy/squaredadditions/block/MixedSlabBlock.java +++ b/src/main/java/pl/xyundy/squaredadditions/block/MixedSlabBlock.java @@ -2,7 +2,11 @@ import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.Entity; +import net.minecraft.entity.ai.pathing.NavigationType; import net.minecraft.util.math.BlockPos; +import net.minecraft.world.BlockView; +import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; import pl.xyundy.squaredadditions.block.entity.MixedSlabBlockEntity; @@ -43,4 +47,15 @@ public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { public BlockRenderType getRenderType(BlockState state) { return BlockRenderType.ENTITYBLOCK_ANIMATED; } -} + + @Override + public void onSteppedOn(World world, BlockPos blockPos, BlockState blockState, Entity entity) { + //TODO support vertical blocks - should I run function from both blocks, or random or what? + this.topSlabState.getBlock().onSteppedOn(world, blockPos, blockState, entity); + } + + @Override + public float getBlastResistance() { + return Math.max(this.topSlabState.getBlock().getBlastResistance(), this.bottomSlabState.getBlock().getBlastResistance()); + } +} \ No newline at end of file