38 lines
1.4 KiB
Kotlin
38 lines
1.4 KiB
Kotlin
package net.shadowfacts.phycon.block.p2p
|
|
|
|
import net.minecraft.block.BlockState
|
|
import net.minecraft.block.Material
|
|
import net.minecraft.sound.BlockSoundGroup
|
|
import net.minecraft.util.Identifier
|
|
import net.minecraft.util.math.BlockPos
|
|
import net.minecraft.util.math.Direction
|
|
import net.shadowfacts.phycon.PhysicalConnectivity
|
|
import net.shadowfacts.phycon.block.FaceDeviceBlock
|
|
|
|
/**
|
|
* @author shadowfacts
|
|
*/
|
|
class P2PInterfaceBlock: FaceDeviceBlock<P2PInterfaceBlockEntity>(
|
|
Settings.of(Material.METAL)
|
|
.strength(1.5f)
|
|
.sounds(BlockSoundGroup.METAL)
|
|
) {
|
|
|
|
companion object {
|
|
val ID = Identifier(PhysicalConnectivity.MODID, "p2p_interface")
|
|
}
|
|
|
|
override val faceThickness = 4.0
|
|
override val faceShapes = mapOf(
|
|
Direction.DOWN to createCuboidShape(0.0, 0.0, 0.0, 16.0, 4.0, 16.0),
|
|
Direction.UP to createCuboidShape(0.0, 12.0, 0.0, 16.0, 16.0, 16.0),
|
|
Direction.NORTH to createCuboidShape(0.0, 0.0, 0.0, 16.0, 16.0, 4.0),
|
|
Direction.SOUTH to createCuboidShape(0.0, 0.0, 12.0, 16.0, 16.0, 16.0),
|
|
Direction.WEST to createCuboidShape(0.0, 0.0, 0.0, 4.0, 16.0, 16.0),
|
|
Direction.EAST to createCuboidShape(12.0, 0.0, 0.0, 16.0, 16.0, 16.0)
|
|
)
|
|
|
|
override fun createBlockEntity(pos: BlockPos, state: BlockState) = P2PInterfaceBlockEntity(pos, state)
|
|
|
|
}
|