diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/cable/CableBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/cable/CableBlock.kt index 1e92db8..1e206ff 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/cable/CableBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/cable/CableBlock.kt @@ -31,6 +31,7 @@ import java.util.* */ class CableBlock: Block( Settings.of(CABLE_MATERIAL) + .strength(1f) .nonOpaque() ), NetworkCableBlock { companion object { diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/extractor/ExtractorBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/extractor/ExtractorBlock.kt index 21d3871..1522fec 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/extractor/ExtractorBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/extractor/ExtractorBlock.kt @@ -7,6 +7,7 @@ import net.minecraft.block.ShapeContext import net.minecraft.entity.LivingEntity import net.minecraft.item.ItemPlacementContext import net.minecraft.item.ItemStack +import net.minecraft.sound.BlockSoundGroup import net.minecraft.state.StateManager import net.minecraft.state.property.Properties import net.minecraft.util.Identifier @@ -25,7 +26,11 @@ import java.util.* /** * @author shadowfacts */ -class ExtractorBlock: DeviceBlock(Settings.of(Material.METAL)) { +class ExtractorBlock: DeviceBlock( + Settings.of(Material.METAL) + .strength(1.5f) + .sounds(BlockSoundGroup.METAL) +) { companion object { val ID = Identifier(PhysicalConnectivity.MODID, "extractor") diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/inserter/InserterBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/inserter/InserterBlock.kt index 8fd6690..3370b37 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/inserter/InserterBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/inserter/InserterBlock.kt @@ -13,6 +13,7 @@ import net.minecraft.item.ItemStack import net.minecraft.network.PacketByteBuf import net.minecraft.screen.ScreenHandler import net.minecraft.server.network.ServerPlayerEntity +import net.minecraft.sound.BlockSoundGroup import net.minecraft.state.StateManager import net.minecraft.state.property.Properties import net.minecraft.text.Text @@ -36,7 +37,11 @@ import java.util.* /** * @author shadowfacts */ -class InserterBlock: DeviceBlock(Settings.of(Material.METAL)) { +class InserterBlock: DeviceBlock( + Settings.of(Material.METAL) + .strength(1.5f) + .sounds(BlockSoundGroup.METAL) +) { companion object { val ID = Identifier(PhysicalConnectivity.MODID, "inserter") val FACING = Properties.FACING diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/miner/MinerBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/miner/MinerBlock.kt index 097ed76..3239286 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/miner/MinerBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/miner/MinerBlock.kt @@ -6,6 +6,7 @@ import net.minecraft.block.Material import net.minecraft.entity.LivingEntity import net.minecraft.item.ItemPlacementContext import net.minecraft.item.ItemStack +import net.minecraft.sound.BlockSoundGroup import net.minecraft.state.StateManager import net.minecraft.state.property.Properties import net.minecraft.util.Identifier @@ -23,7 +24,11 @@ import java.util.* /** * @author shadowfacts */ -class MinerBlock: DeviceBlock(Settings.of(Material.METAL)) { +class MinerBlock: DeviceBlock( + Settings.of(Material.METAL) + .strength(1.5f) + .sounds(BlockSoundGroup.METAL) +) { companion object { val ID = Identifier(PhysicalConnectivity.MODID, "miner") diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/netinterface/InterfaceBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/netinterface/InterfaceBlock.kt index af4af0f..500b4ee 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/netinterface/InterfaceBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/netinterface/InterfaceBlock.kt @@ -5,6 +5,7 @@ import alexiil.mc.lib.attributes.AttributeProvider import net.minecraft.block.* import net.minecraft.entity.LivingEntity import net.minecraft.item.ItemStack +import net.minecraft.sound.BlockSoundGroup import net.minecraft.util.Identifier import net.minecraft.util.math.BlockPos import net.minecraft.util.math.Direction @@ -17,7 +18,11 @@ import net.shadowfacts.phycon.block.FaceDeviceBlock /** * @author shadowfacts */ -class InterfaceBlock: FaceDeviceBlock(Settings.of(Material.METAL)), +class InterfaceBlock: FaceDeviceBlock( + Settings.of(Material.METAL) + .strength(1.5f) + .sounds(BlockSoundGroup.METAL) +), NetworkComponentBlock, AttributeProvider { diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/netswitch/SwitchBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/netswitch/SwitchBlock.kt index e85ddbe..843e84d 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/netswitch/SwitchBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/netswitch/SwitchBlock.kt @@ -4,6 +4,7 @@ import alexiil.mc.lib.attributes.AttributeList import alexiil.mc.lib.attributes.AttributeProvider 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 @@ -19,7 +20,11 @@ import java.util.* /** * @author shadowfacts */ -class SwitchBlock: BlockWithEntity(Settings.of(Material.METAL)), +class SwitchBlock: BlockWithEntity( + Settings.of(Material.METAL) + .strength(1.5f) + .sounds(BlockSoundGroup.METAL) +), NetworkComponentBlock, AttributeProvider { diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/redstone/RedstoneControllerBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/redstone/RedstoneControllerBlock.kt index b7d52c7..86f272f 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/redstone/RedstoneControllerBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/redstone/RedstoneControllerBlock.kt @@ -4,6 +4,7 @@ import net.minecraft.block.Block import net.minecraft.block.BlockState import net.minecraft.block.Material import net.minecraft.item.ItemPlacementContext +import net.minecraft.sound.BlockSoundGroup import net.minecraft.state.StateManager import net.minecraft.state.property.Properties import net.minecraft.util.Identifier @@ -17,7 +18,11 @@ import net.shadowfacts.phycon.block.FaceDeviceBlock /** * @author shadowfacts */ -class RedstoneControllerBlock: FaceDeviceBlock(Settings.of(Material.METAL)) { +class RedstoneControllerBlock: FaceDeviceBlock( + Settings.of(Material.METAL) + .strength(1.5f) + .sounds(BlockSoundGroup.METAL) +) { companion object { val ID = Identifier(PhysicalConnectivity.MODID, "redstone_controller") diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/terminal/TerminalBlock.kt b/src/main/kotlin/net/shadowfacts/phycon/block/terminal/TerminalBlock.kt index 627be2e..475cacb 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/terminal/TerminalBlock.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/terminal/TerminalBlock.kt @@ -5,6 +5,7 @@ import alexiil.mc.lib.attributes.AttributeProvider import net.minecraft.block.BlockState import net.minecraft.block.Material import net.minecraft.entity.player.PlayerEntity +import net.minecraft.sound.BlockSoundGroup import net.minecraft.util.ActionResult import net.minecraft.util.Hand import net.minecraft.util.Identifier @@ -22,7 +23,11 @@ import java.util.* /** * @author shadowfacts */ -class TerminalBlock: DeviceBlock(Settings.of(Material.METAL)), +class TerminalBlock: DeviceBlock( + Settings.of(Material.METAL) + .strength(1.5f) + .sounds(BlockSoundGroup.METAL) +), NetworkComponentBlock, AttributeProvider { diff --git a/src/main/resources/data/phycon/loot_tables/blocks/cable.json b/src/main/resources/data/phycon/loot_tables/blocks/cable.json new file mode 100644 index 0000000..0c45331 --- /dev/null +++ b/src/main/resources/data/phycon/loot_tables/blocks/cable.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "phycon:cable" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} diff --git a/src/main/resources/data/phycon/loot_tables/blocks/extractor.json b/src/main/resources/data/phycon/loot_tables/blocks/extractor.json new file mode 100644 index 0000000..72a4a03 --- /dev/null +++ b/src/main/resources/data/phycon/loot_tables/blocks/extractor.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "phycon:extractor" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} diff --git a/src/main/resources/data/phycon/loot_tables/blocks/inserter.json b/src/main/resources/data/phycon/loot_tables/blocks/inserter.json new file mode 100644 index 0000000..6afa907 --- /dev/null +++ b/src/main/resources/data/phycon/loot_tables/blocks/inserter.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "phycon:inserter" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} diff --git a/src/main/resources/data/phycon/loot_tables/blocks/miner.json b/src/main/resources/data/phycon/loot_tables/blocks/miner.json new file mode 100644 index 0000000..ae854e9 --- /dev/null +++ b/src/main/resources/data/phycon/loot_tables/blocks/miner.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "phycon:miner" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} diff --git a/src/main/resources/data/phycon/loot_tables/blocks/redstone_controller.json b/src/main/resources/data/phycon/loot_tables/blocks/redstone_controller.json new file mode 100644 index 0000000..c5baf9c --- /dev/null +++ b/src/main/resources/data/phycon/loot_tables/blocks/redstone_controller.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "phycon:redstone_controller" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} diff --git a/src/main/resources/data/phycon/loot_tables/blocks/switch.json b/src/main/resources/data/phycon/loot_tables/blocks/switch.json new file mode 100644 index 0000000..683bc20 --- /dev/null +++ b/src/main/resources/data/phycon/loot_tables/blocks/switch.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "phycon:switch" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} diff --git a/src/main/resources/data/phycon/loot_tables/blocks/terminal.json b/src/main/resources/data/phycon/loot_tables/blocks/terminal.json new file mode 100644 index 0000000..77d8851 --- /dev/null +++ b/src/main/resources/data/phycon/loot_tables/blocks/terminal.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "phycon:terminal" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +}