Merge branch 'master' into 1.20.1

This commit is contained in:
DBotThePony 2024-01-01 15:45:06 +07:00
commit 748a232569
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -6,7 +6,11 @@ package ru.dbotthepony.mc.otm.block
import com.google.common.collect.ImmutableMap
import net.minecraft.core.BlockPos
import net.minecraft.core.Direction
import net.minecraft.world.InteractionHand
import net.minecraft.world.InteractionResult
import net.minecraft.world.entity.player.Player
import net.minecraft.world.level.BlockGetter
import net.minecraft.world.level.Level
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.EntityBlock
import net.minecraft.world.level.block.SoundType
@ -15,6 +19,7 @@ import net.minecraft.world.level.block.state.BlockState
import net.minecraft.world.level.block.state.StateDefinition
import net.minecraft.world.level.block.state.properties.BooleanProperty
import net.minecraft.world.level.material.MapColor
import net.minecraft.world.phys.BlockHitResult
import net.minecraft.world.phys.shapes.BooleanOp
import net.minecraft.world.phys.shapes.CollisionContext
import net.minecraft.world.phys.shapes.Shapes
@ -53,6 +58,11 @@ abstract class CableBlock(properties: Properties) : MatteryBlock(properties) {
return getShapeForEachState { getShapeFor(it, halfCoreSize) }
}
@Suppress("OVERRIDE_DEPRECATION")
override fun use(blockState: BlockState, level: Level, blockPos: BlockPos, ply: Player, hand: InteractionHand, blockHitResult: BlockHitResult): InteractionResult {
return InteractionResult.PASS
}
companion object {
fun getShapeFor(it: BlockState, halfCoreSize: Double): VoxelShape {
val shapes = ArrayList<VoxelShape>()