Add loot tables for everything

This commit is contained in:
Shadowfacts 2021-02-28 18:56:04 -05:00
parent e13154943e
commit 2084a749fb
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
15 changed files with 176 additions and 7 deletions

View File

@ -31,6 +31,7 @@ import java.util.*
*/ */
class CableBlock: Block( class CableBlock: Block(
Settings.of(CABLE_MATERIAL) Settings.of(CABLE_MATERIAL)
.strength(1f)
.nonOpaque() .nonOpaque()
), NetworkCableBlock { ), NetworkCableBlock {
companion object { companion object {

View File

@ -7,6 +7,7 @@ import net.minecraft.block.ShapeContext
import net.minecraft.entity.LivingEntity import net.minecraft.entity.LivingEntity
import net.minecraft.item.ItemPlacementContext import net.minecraft.item.ItemPlacementContext
import net.minecraft.item.ItemStack import net.minecraft.item.ItemStack
import net.minecraft.sound.BlockSoundGroup
import net.minecraft.state.StateManager import net.minecraft.state.StateManager
import net.minecraft.state.property.Properties import net.minecraft.state.property.Properties
import net.minecraft.util.Identifier import net.minecraft.util.Identifier
@ -25,7 +26,11 @@ import java.util.*
/** /**
* @author shadowfacts * @author shadowfacts
*/ */
class ExtractorBlock: DeviceBlock<ExtractorBlockEntity>(Settings.of(Material.METAL)) { class ExtractorBlock: DeviceBlock<ExtractorBlockEntity>(
Settings.of(Material.METAL)
.strength(1.5f)
.sounds(BlockSoundGroup.METAL)
) {
companion object { companion object {
val ID = Identifier(PhysicalConnectivity.MODID, "extractor") val ID = Identifier(PhysicalConnectivity.MODID, "extractor")

View File

@ -13,6 +13,7 @@ import net.minecraft.item.ItemStack
import net.minecraft.network.PacketByteBuf import net.minecraft.network.PacketByteBuf
import net.minecraft.screen.ScreenHandler import net.minecraft.screen.ScreenHandler
import net.minecraft.server.network.ServerPlayerEntity import net.minecraft.server.network.ServerPlayerEntity
import net.minecraft.sound.BlockSoundGroup
import net.minecraft.state.StateManager import net.minecraft.state.StateManager
import net.minecraft.state.property.Properties import net.minecraft.state.property.Properties
import net.minecraft.text.Text import net.minecraft.text.Text
@ -36,7 +37,11 @@ import java.util.*
/** /**
* @author shadowfacts * @author shadowfacts
*/ */
class InserterBlock: DeviceBlock<InserterBlockEntity>(Settings.of(Material.METAL)) { class InserterBlock: DeviceBlock<InserterBlockEntity>(
Settings.of(Material.METAL)
.strength(1.5f)
.sounds(BlockSoundGroup.METAL)
) {
companion object { companion object {
val ID = Identifier(PhysicalConnectivity.MODID, "inserter") val ID = Identifier(PhysicalConnectivity.MODID, "inserter")
val FACING = Properties.FACING val FACING = Properties.FACING

View File

@ -6,6 +6,7 @@ import net.minecraft.block.Material
import net.minecraft.entity.LivingEntity import net.minecraft.entity.LivingEntity
import net.minecraft.item.ItemPlacementContext import net.minecraft.item.ItemPlacementContext
import net.minecraft.item.ItemStack import net.minecraft.item.ItemStack
import net.minecraft.sound.BlockSoundGroup
import net.minecraft.state.StateManager import net.minecraft.state.StateManager
import net.minecraft.state.property.Properties import net.minecraft.state.property.Properties
import net.minecraft.util.Identifier import net.minecraft.util.Identifier
@ -23,7 +24,11 @@ import java.util.*
/** /**
* @author shadowfacts * @author shadowfacts
*/ */
class MinerBlock: DeviceBlock<MinerBlockEntity>(Settings.of(Material.METAL)) { class MinerBlock: DeviceBlock<MinerBlockEntity>(
Settings.of(Material.METAL)
.strength(1.5f)
.sounds(BlockSoundGroup.METAL)
) {
companion object { companion object {
val ID = Identifier(PhysicalConnectivity.MODID, "miner") val ID = Identifier(PhysicalConnectivity.MODID, "miner")

View File

@ -5,6 +5,7 @@ import alexiil.mc.lib.attributes.AttributeProvider
import net.minecraft.block.* import net.minecraft.block.*
import net.minecraft.entity.LivingEntity import net.minecraft.entity.LivingEntity
import net.minecraft.item.ItemStack import net.minecraft.item.ItemStack
import net.minecraft.sound.BlockSoundGroup
import net.minecraft.util.Identifier import net.minecraft.util.Identifier
import net.minecraft.util.math.BlockPos import net.minecraft.util.math.BlockPos
import net.minecraft.util.math.Direction import net.minecraft.util.math.Direction
@ -17,7 +18,11 @@ import net.shadowfacts.phycon.block.FaceDeviceBlock
/** /**
* @author shadowfacts * @author shadowfacts
*/ */
class InterfaceBlock: FaceDeviceBlock<InterfaceBlockEntity>(Settings.of(Material.METAL)), class InterfaceBlock: FaceDeviceBlock<InterfaceBlockEntity>(
Settings.of(Material.METAL)
.strength(1.5f)
.sounds(BlockSoundGroup.METAL)
),
NetworkComponentBlock, NetworkComponentBlock,
AttributeProvider { AttributeProvider {

View File

@ -4,6 +4,7 @@ import alexiil.mc.lib.attributes.AttributeList
import alexiil.mc.lib.attributes.AttributeProvider import alexiil.mc.lib.attributes.AttributeProvider
import net.minecraft.block.BlockState import net.minecraft.block.BlockState
import net.minecraft.block.Material import net.minecraft.block.Material
import net.minecraft.sound.BlockSoundGroup
import net.minecraft.util.Identifier import net.minecraft.util.Identifier
import net.minecraft.util.math.BlockPos import net.minecraft.util.math.BlockPos
import net.minecraft.util.math.Direction import net.minecraft.util.math.Direction
@ -19,7 +20,11 @@ import java.util.*
/** /**
* @author shadowfacts * @author shadowfacts
*/ */
class SwitchBlock: BlockWithEntity<SwitchBlockEntity>(Settings.of(Material.METAL)), class SwitchBlock: BlockWithEntity<SwitchBlockEntity>(
Settings.of(Material.METAL)
.strength(1.5f)
.sounds(BlockSoundGroup.METAL)
),
NetworkComponentBlock, NetworkComponentBlock,
AttributeProvider { AttributeProvider {

View File

@ -4,6 +4,7 @@ import net.minecraft.block.Block
import net.minecraft.block.BlockState import net.minecraft.block.BlockState
import net.minecraft.block.Material import net.minecraft.block.Material
import net.minecraft.item.ItemPlacementContext import net.minecraft.item.ItemPlacementContext
import net.minecraft.sound.BlockSoundGroup
import net.minecraft.state.StateManager import net.minecraft.state.StateManager
import net.minecraft.state.property.Properties import net.minecraft.state.property.Properties
import net.minecraft.util.Identifier import net.minecraft.util.Identifier
@ -17,7 +18,11 @@ import net.shadowfacts.phycon.block.FaceDeviceBlock
/** /**
* @author shadowfacts * @author shadowfacts
*/ */
class RedstoneControllerBlock: FaceDeviceBlock<RedstoneControllerBlockEntity>(Settings.of(Material.METAL)) { class RedstoneControllerBlock: FaceDeviceBlock<RedstoneControllerBlockEntity>(
Settings.of(Material.METAL)
.strength(1.5f)
.sounds(BlockSoundGroup.METAL)
) {
companion object { companion object {
val ID = Identifier(PhysicalConnectivity.MODID, "redstone_controller") val ID = Identifier(PhysicalConnectivity.MODID, "redstone_controller")

View File

@ -5,6 +5,7 @@ import alexiil.mc.lib.attributes.AttributeProvider
import net.minecraft.block.BlockState import net.minecraft.block.BlockState
import net.minecraft.block.Material import net.minecraft.block.Material
import net.minecraft.entity.player.PlayerEntity import net.minecraft.entity.player.PlayerEntity
import net.minecraft.sound.BlockSoundGroup
import net.minecraft.util.ActionResult import net.minecraft.util.ActionResult
import net.minecraft.util.Hand import net.minecraft.util.Hand
import net.minecraft.util.Identifier import net.minecraft.util.Identifier
@ -22,7 +23,11 @@ import java.util.*
/** /**
* @author shadowfacts * @author shadowfacts
*/ */
class TerminalBlock: DeviceBlock<TerminalBlockEntity>(Settings.of(Material.METAL)), class TerminalBlock: DeviceBlock<TerminalBlockEntity>(
Settings.of(Material.METAL)
.strength(1.5f)
.sounds(BlockSoundGroup.METAL)
),
NetworkComponentBlock, NetworkComponentBlock,
AttributeProvider { AttributeProvider {

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "phycon:cable"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "phycon:extractor"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "phycon:inserter"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "phycon:miner"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "phycon:redstone_controller"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "phycon:switch"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}

View File

@ -0,0 +1,19 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "phycon:terminal"
}
],
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
]
}
]
}