feat: better texture for causality anchor
This commit is contained in:
parent
cc360be7c1
commit
efade64c0f
@ -4,6 +4,7 @@ import net.minecraft.core.BlockPos
|
||||
import net.minecraft.core.Direction
|
||||
import net.minecraft.world.item.context.BlockPlaceContext
|
||||
import net.minecraft.world.level.BlockGetter
|
||||
import net.minecraft.world.level.Level
|
||||
import net.minecraft.world.level.LevelAccessor
|
||||
import net.minecraft.world.level.block.*
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
@ -87,4 +88,19 @@ object CABlock : HorizontalDirectionalBlock(
|
||||
super.getFluidState(state)
|
||||
}
|
||||
|
||||
@Suppress("OVERRIDE_DEPRECATION", "DEPRECATION")
|
||||
override fun neighborChanged(
|
||||
state: BlockState,
|
||||
level: Level,
|
||||
pos: BlockPos,
|
||||
neighborBlock: Block,
|
||||
neighborPos: BlockPos,
|
||||
movedByPiston: Boolean
|
||||
) {
|
||||
super.neighborChanged(state, level, pos, neighborBlock, neighborPos, movedByPiston)
|
||||
if (level.getBlockState(pos.below()).isAir) {
|
||||
level.destroyBlock(pos, true)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 1.3 KiB |
Loading…
Reference in New Issue
Block a user