Allow breaking cables by hand

This commit is contained in:
Shadowfacts 2021-03-07 10:38:09 -05:00
parent c9bcfd29d5
commit eb1aa6cf19
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 5 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package net.shadowfacts.phycon.block.cable
import net.fabricmc.fabric.api.`object`.builder.v1.block.FabricBlockSettings
import net.minecraft.block.*
import net.minecraft.block.piston.PistonBehavior
import net.minecraft.entity.player.PlayerEntity
@ -30,13 +31,14 @@ import java.util.*
* @author shadowfacts
*/
class CableBlock: Block(
Settings.of(CABLE_MATERIAL)
.strength(1f)
FabricBlockSettings.of(CABLE_MATERIAL)
.strength(0.3f)
.nonOpaque()
.breakByHand(true)
), NetworkCableBlock {
companion object {
val ID = Identifier(PhysicalConnectivity.MODID, "cable")
val CABLE_MATERIAL = Material(MaterialColor.IRON, false, false, true, false, true, false, PistonBehavior.NORMAL)
val CABLE_MATERIAL = Material.Builder(MaterialColor.BLUE).build()
val CENTER_SHAPE = createCuboidShape(6.0, 6.0, 6.0, 10.0, 10.0, 10.0)
val SIDE_SHAPES = mapOf<Direction, VoxelShape>(
Direction.DOWN to createCuboidShape(6.0, 0.0, 6.0, 10.0, 6.0, 10.0),