Junk metal and Metal mesh blocks

This commit is contained in:
GearShocky 2023-03-13 04:15:25 +06:00
parent bec79a1ea5
commit 8249c9a9cd
17 changed files with 75 additions and 18 deletions

View File

@ -28,6 +28,7 @@ fun addBlockStates(provider: MatteryBlockStateProvider) {
provider.ore(MBlocks.TRITANIUM_ORE)
provider.ore(MBlocks.TRITANIUM_RAW_BLOCK)
provider.block(MBlocks.TRITANIUM_INGOT_BLOCK)
provider.block(MBlocks.METAL_MESH)
provider.block(MBlocks.CHEMICAL_GENERATOR)
provider.block(MBlocks.MATTER_SCANNER)

View File

@ -23,6 +23,8 @@ fun addItemModels(provider: MatteryItemModelProvider) {
}
provider.block(MItems.CARBON_FIBRE_BLOCK)
provider.block(MItems.METAL_JUNK)
provider.block(MItems.METAL_MESH)
provider.block(MItems.DEEPSLATE_TRITANIUM_ORE)
provider.block(MItems.TRITANIUM_ORE)
provider.block(MItems.TRITANIUM_STRIPED_BLOCK)

View File

@ -66,6 +66,7 @@ private fun decoratives(provider: MatteryLanguageProvider) {
add(MRegistry.VENT.block, "Vent")
add(MRegistry.VENT_ALTERNATIVE.block, "Alternative Vent")
for ((block, colors) in MRegistry.TRITANIUM_STRIPED_BLOCK.blocksWithColor) {
val (base, stripe) = colors
@ -382,6 +383,8 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.ENERGY_SERVO, "desc", "Charges, Discharges or Exchanges energy of items")
add(MBlocks.CARBON_FIBRE_BLOCK, "Carbon Fibre Block")
add(MBlocks.METAL_JUNK, "Metal Junk Block")
add(MBlocks.METAL_MESH, "Metal Mesh")
add(MBlocks.TRITANIUM_STRIPED_BLOCK, "Tritanium Striped Block")
add(MBlocks.TRITANIUM_STRIPED_STAIRS, "Tritanium Striped Stairs")

View File

@ -174,6 +174,9 @@ internal fun addDecorativeTabItems(consumer: CreativeModeTab.Output) {
accept(MItems.TRITANIUM_STRIPED_SLAB)
accept(MItems.TRITANIUM_STRIPED_WALL)
accept(MItems.CARBON_FIBRE_BLOCK)
accept(MItems.METAL_JUNK)
accept(MItems.METAL_MESH)
accept(MItems.TRITANIUM_BARS)
colored(MItems.TRITANIUM_DOOR)

View File

@ -6,6 +6,7 @@ import net.minecraft.network.chat.Component
import net.minecraft.sounds.SoundEvents
import net.minecraft.util.valueproviders.UniformInt
import net.minecraft.world.entity.Entity
import net.minecraft.world.entity.EntityType
import net.minecraft.world.entity.monster.Zombie
import net.minecraft.world.item.DyeColor
import net.minecraft.world.item.ItemStack
@ -121,6 +122,17 @@ object MBlocks {
Block(BlockBehaviour.Properties.of(Material.METAL, MaterialColor.COLOR_BLUE).explosionResistance(400f).destroyTime(3f).requiresCorrectToolForDrops())
}
val METAL_JUNK: Block by registry.register(MNames.METAL_JUNK) {
Block(BlockBehaviour.Properties.of(Material.HEAVY_METAL, MaterialColor.COLOR_GRAY).sound(SoundType.NETHERITE_BLOCK).explosionResistance(45f).destroyTime(3f).requiresCorrectToolForDrops())
}
val METAL_MESH: Block by registry.register(MNames.METAL_MESH) {
Block(BlockBehaviour.Properties.of(Material.GLASS, MaterialColor.COLOR_GRAY)
.noOcclusion()
.sound(SoundType.COPPER).explosionResistance(30f)
.destroyTime(2f).requiresCorrectToolForDrops())
}
val TRITANIUM_BARS: IronBarsBlock by registry.register(MNames.TRITANIUM_BARS) {
IronBarsBlock(BlockBehaviour.Properties.of(Material.METAL, MaterialColor.COLOR_BLUE).explosionResistance(45f).destroyTime(2.5f).requiresCorrectToolForDrops())
}
@ -133,9 +145,7 @@ object MBlocks {
) }
val TRITANIUM_RAW_BLOCK: Block by registry.register(MNames.TRITANIUM_RAW_BLOCK) { Block(
BlockBehaviour.Properties.of(Material.STONE)
.strength(8.0f, 10f)
.requiresCorrectToolForDrops()
BlockBehaviour.Properties.of(Material.STONE).strength(8.0f, 10f).requiresCorrectToolForDrops()
) }
val LABORATORY_LAMP: Block by registry.register(MNames.LABORATORY_LAMP) { LaboratoryLamp(false) }

View File

@ -424,6 +424,8 @@ object MItems {
val TRITANIUM_STRIPED_SLAB: Item by registry.register(MNames.TRITANIUM_STRIPED_SLAB) { BlockItem(MBlocks.TRITANIUM_STRIPED_SLAB, DEFAULT_PROPERTIES) }
val TRITANIUM_STRIPED_WALL: Item by registry.register(MNames.TRITANIUM_STRIPED_WALL) { BlockItem(MBlocks.TRITANIUM_STRIPED_WALL, DEFAULT_PROPERTIES) }
val CARBON_FIBRE_BLOCK: Item by registry.register(MNames.CARBON_FIBRE_BLOCK) { BlockItem(MBlocks.CARBON_FIBRE_BLOCK, DEFAULT_PROPERTIES) }
val METAL_JUNK: Item by registry.register(MNames.METAL_JUNK) { BlockItem(MBlocks.METAL_JUNK, DEFAULT_PROPERTIES) }
val METAL_MESH: Item by registry.register(MNames.METAL_MESH) { BlockItem(MBlocks.METAL_MESH, DEFAULT_PROPERTIES) }
init {
MRegistry.INDUSTRIAL_GLASS.registerItems(registry)

View File

@ -66,6 +66,8 @@ object MNames {
const val INDUSTRIAL_GLASS = "industrial_glass"
const val INDUSTRIAL_GLASS_PANE = "industrial_glass_pane"
const val METAL_MESH = "metal_mesh"
const val METAL_JUNK = "metal_junk"
const val CARBON_FIBRE_BLOCK = "carbon_fibre_block"
const val FLOOR_TILES = "floor_tiles"

View File

@ -0,0 +1,24 @@
{
"variants": {
"":[
{
"model": "overdrive_that_matters:block/metal_junk", "weight": 2
},
{
"model": "overdrive_that_matters:block/metal_junk", "y": 180, "weight": 2
},
{
"model": "overdrive_that_matters:block/metal_junk_b", "weight": 4
},
{
"model": "overdrive_that_matters:block/metal_junk_b", "y": 180, "weight": 4
},
{
"model": "overdrive_that_matters:block/metal_junk_c", "weight": 3
},
{
"model": "overdrive_that_matters:block/metal_junk_c", "y": 180, "weight": 3
}
]
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "overdrive_that_matters:block/decorative/metal_junk_a"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "overdrive_that_matters:block/decorative/metal_junk_b"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "overdrive_that_matters:block/decorative/metal_junk_c"
}
}

View File

@ -0,0 +1,7 @@
{
"parent": "minecraft:block/cube_all",
"render_type": "translucent",
"textures": {
"all": "overdrive_that_matters:block/decorative/metal_mesh"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

View File

@ -1,15 +0,0 @@
{
"values": [
"minecraft:conduit_power",
"minecraft:instant_health",
"minecraft:regeneration",
"minecraft:water_breathing",
"minecraft:poison",
"minecraft:health_boost",
"minecraft:absorption",
"minecraft:saturation",
"minecraft:dolphins_grace",
"minecraft:nausea",
"hordes:infected"
]
}