fix: make projector block not piston push-able
This commit is contained in:
parent
df4ad180d7
commit
f9e6ffacc1
@ -13,6 +13,7 @@ import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.EntityBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.material.MapColor
|
||||
import net.minecraft.world.level.material.PushReaction
|
||||
import net.minecraft.world.phys.BlockHitResult
|
||||
|
||||
object ProjectorBlock : Block(Properties.of()
|
||||
@ -21,7 +22,9 @@ object ProjectorBlock : Block(Properties.of()
|
||||
.mapColor(MapColor.COLOR_BLACK)
|
||||
.randomTicks()
|
||||
.strength(4.0f)
|
||||
.requiresCorrectToolForDrops()), EntityBlock {
|
||||
.requiresCorrectToolForDrops()
|
||||
.pushReaction(PushReaction.IGNORE)
|
||||
), EntityBlock {
|
||||
|
||||
fun checkUpdate(level: Level, pos: BlockPos) {
|
||||
if (!level.isClientSide) {
|
||||
|
@ -16,7 +16,7 @@ object ProjectionShellItem : Item(
|
||||
val block = context.level.getBlockState(context.clickedPos).block
|
||||
if (block is ProjectionShellBlock && context.level.isClientSide) {
|
||||
ProjectionShell.channel.sendToServer(ServerboundPSHLockAcquirePacket(context.clickedPos))
|
||||
return InteractionResult.SUCCESS
|
||||
return InteractionResult.CONSUME
|
||||
}
|
||||
return InteractionResult.PASS
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user