генерация моделей мусора и полосок опасности вместе с блокстейтами

This commit is contained in:
YuRaNnNzZZ 2025-01-09 20:47:59 +03:00
parent 5dd4c027a9
commit b2ee766194
Signed by: YuRaNnNzZZ
GPG Key ID: 5F71738C85A6006D
8 changed files with 18 additions and 31 deletions

View File

@ -204,7 +204,6 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
} }
} }
DataGen.decorativeCubeAll(MBlocks.DANGER_STRIPE_BLOCK)
DataGen.decorativePillar(MBlocks.METAL_BEAM, "metal_beam_side", "metal_beam_top") DataGen.decorativePillar(MBlocks.METAL_BEAM, "metal_beam_side", "metal_beam_top")
var labLampOn: BlockModelBuilder? = null var labLampOn: BlockModelBuilder? = null
@ -236,7 +235,7 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
itemModelProvider.block(MItems.LABORATORY_LAMP) itemModelProvider.block(MItems.LABORATORY_LAMP)
itemModelProvider.block(MItems.LABORATORY_LAMP_INVERTED, MItems.LABORATORY_LAMP.registryName!!.path + "_unlit") itemModelProvider.block(MItems.LABORATORY_LAMP_INVERTED, MItems.LABORATORY_LAMP.registryName!!.path + "_unlit")
itemModelProvider.block(MItems.DANGER_STRIPE_BLOCK) itemModelProvider.block(MItems.DANGER_STRIPE_BLOCK, MItems.DANGER_STRIPE_BLOCK.registryName!!.path + "_0")
itemModelProvider.block(MItems.METAL_BEAM) itemModelProvider.block(MItems.METAL_BEAM)
blockStateProvider.exec { blockStateProvider.exec {

View File

@ -261,12 +261,11 @@ fun addBlockStates(provider: MatteryBlockStateProvider) {
provider.getVariantBuilder(MBlocks.METAL_JUNK).forAllStates { provider.getVariantBuilder(MBlocks.METAL_JUNK).forAllStates {
val generated = ArrayList<ConfiguredModel>() val generated = ArrayList<ConfiguredModel>()
for (suffix in arrayOf("", "_b", "_c", "_d")) { for (suffix in arrayOf("_a", "_b", "_c", "_d")) {
val model = provider.models().getExistingFile(modLocation("block/metal_junk$suffix")) val model = provider.models().cubeAll("block/metal_junk$suffix", modLocation("block/decorative/metal_junk$suffix"))
generated.add(with(ConfiguredModel.builder()) { generated.add(with(ConfiguredModel.builder()) {
modelFile(model) modelFile(model)
weight(2)
return@with buildLast() return@with buildLast()
}) })
@ -274,7 +273,20 @@ fun addBlockStates(provider: MatteryBlockStateProvider) {
generated.add(with(ConfiguredModel.builder()) { generated.add(with(ConfiguredModel.builder()) {
modelFile(model) modelFile(model)
rotationY(180) rotationY(180)
weight(2)
return@with buildLast()
})
}
return@forAllStates generated.toTypedArray()
}
provider.getVariantBuilder(MBlocks.DANGER_STRIPE_BLOCK).forAllStates {
val generated = ArrayList<ConfiguredModel>()
for (suffix in arrayOf("_0", "_1")) {
generated.add(with(ConfiguredModel.builder()) {
modelFile(provider.models().cubeAll("block/danger_stripe_block$suffix", modLocation("block/decorative/danger_stripe_block$suffix")))
return@with buildLast() return@with buildLast()
}) })

View File

@ -20,7 +20,7 @@ fun addItemModels(provider: MatteryItemModelProvider) {
} }
provider.block(MItems.CARBON_FIBRE_BLOCK) provider.block(MItems.CARBON_FIBRE_BLOCK)
provider.block(MItems.METAL_JUNK) provider.block(MItems.METAL_JUNK, MItems.METAL_JUNK.registryName!!.path + "_a")
provider.block(MItems.METAL_MESH) provider.block(MItems.METAL_MESH)
provider.generatedTranslucent(MItems.TRITANIUM_BARS, modLocation("block/decorative/tritanium_bars")) provider.generatedTranslucent(MItems.TRITANIUM_BARS, modLocation("block/decorative/tritanium_bars"))
provider.block(MItems.DEEPSLATE_TRITANIUM_ORE) provider.block(MItems.DEEPSLATE_TRITANIUM_ORE)

View File

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

View File

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

View File

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

View File

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