Uncolored tritanium blocks all stripe variants

This commit is contained in:
DBotThePony 2024-09-04 15:28:32 +07:00
parent a64010fc85
commit b208ca1358
Signed by: DBot
GPG Key ID: DCC23B5715498507
32 changed files with 179 additions and 220 deletions

View File

@ -269,17 +269,31 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr
}
}
DataGen.decorativeColumn(MBlocks.TRITANIUM_STRIPED_BLOCK, "tritanium_striped_block", "tritanium_block")
DataGen.decorativeStairs(MBlocks.TRITANIUM_STRIPED_STAIRS as StairBlock, "tritanium_striped_block", "tritanium_block")
DataGen.decorativeWall(MBlocks.TRITANIUM_STRIPED_WALL as WallBlock, "tritanium_striped_block", "tritanium_block")
DataGen.decorativeSlab(MBlocks.TRITANIUM_STRIPED_SLAB as SlabBlock, MBlocks.TRITANIUM_STRIPED_BLOCK.registryName!!, "tritanium_striped_block", "tritanium_block")
itemModelProvider.block(MItems.TRITANIUM_STRIPED_STAIRS)
itemModelProvider.block(MItems.TRITANIUM_STRIPED_SLAB)
MBlocks.TRITANIUM_STRIPED_BLOCK.entries.forEach { (c, it) ->
DataGen.decorativeColumn(it, "stripe/tritanium_striped_block_${c.name.lowercase()}", "tritanium_block")
}
MBlocks.TRITANIUM_STRIPED_STAIRS.entries.forEach { (c, it) ->
DataGen.decorativeStairs(it, "stripe/tritanium_striped_block_${c.name.lowercase()}", "tritanium_block")
}
MBlocks.TRITANIUM_STRIPED_WALL.entries.forEach { (c, it) ->
DataGen.decorativeWall(it, "stripe/tritanium_striped_block_${c.name.lowercase()}", "tritanium_block")
}
MBlocks.TRITANIUM_STRIPED_SLAB.entries.forEach { (c, it) ->
DataGen.decorativeSlab(it, MBlocks.TRITANIUM_STRIPED_BLOCK[c]!!.registryName!!, "stripe/tritanium_striped_block_${c.name.lowercase()}", "tritanium_block")
}
itemModelProvider.blocks(MItems.TRITANIUM_STRIPED_STAIRS.values)
itemModelProvider.blocks(MItems.TRITANIUM_STRIPED_SLAB.values)
itemModelProvider.exec {
itemModelProvider.withExistingParent(MItems.TRITANIUM_STRIPED_WALL.registryName!!.path, modLocation("block/wall_inventory"))
.texture("wall_side", modLocation("${DataGen.DECORATIVE_BLOCK_LOCATION}/tritanium_striped_block"))
.texture("wall", modLocation("${DataGen.DECORATIVE_BLOCK_LOCATION}/tritanium_block"))
MBlocks.TRITANIUM_STRIPED_WALL.entries.forEach { (c, it) ->
itemModelProvider.withExistingParent(it.registryName!!.path, modLocation("block/wall_inventory"))
.texture("wall_side", modLocation("${DataGen.DECORATIVE_BLOCK_LOCATION}/stripe/tritanium_striped_block_${c.name.lowercase()}"))
.texture("wall", modLocation("${DataGen.DECORATIVE_BLOCK_LOCATION}/tritanium_block"))
}
}
for ((color, glass) in MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks) {

View File

@ -441,15 +441,15 @@ fun addAdvancements(serializer: Consumer<AdvancementHolder>, lang: MatteryLangua
MRegistry.TRITANIUM_STRIPED_BLOCK.flatItems.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MRegistry.TRITANIUM_STAIRS.allItems.values.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MRegistry.TRITANIUM_STRIPED_STAIRS.flatItems.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_BLOCK.also { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_STAIRS.also { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_BLOCK.values.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_STAIRS.values.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
}
.save(serializer, modLocation("regular/tritanium_block"))
AdvancementBuilder()
.parent(tritaniumBlock)
.display(
itemStack = ItemStack(MItems.TRITANIUM_STRIPED_BLOCK),
itemStack = ItemStack(MItems.TRITANIUM_STRIPED_BLOCK[DyeColor.YELLOW]!!),
title = translation.add("striped_tritanium_block", "Old Fashion Color Touch") {
russian("Старомодная цветовая отделка")
},
@ -458,10 +458,10 @@ fun addAdvancements(serializer: Consumer<AdvancementHolder>, lang: MatteryLangua
}
)
.requirements(Strategy.OR)
.addCriterion("has_item", criterion(MItems.TRITANIUM_STRIPED_BLOCK))
.addCriterion("has_item1", criterion(MItems.TRITANIUM_STRIPED_STAIRS))
.addCriterion("has_item2", criterion(MItems.TRITANIUM_STRIPED_SLAB))
.addCriterion("has_item3", criterion(MItems.TRITANIUM_STRIPED_WALL))
.addCriterion("has_item", criterion(MItems.TRITANIUM_STRIPED_BLOCK[DyeColor.YELLOW]!!))
.addCriterion("has_item1", criterion(MItems.TRITANIUM_STRIPED_STAIRS[DyeColor.YELLOW]!!))
.addCriterion("has_item2", criterion(MItems.TRITANIUM_STRIPED_SLAB[DyeColor.YELLOW]!!))
.addCriterion("has_item3", criterion(MItems.TRITANIUM_STRIPED_WALL[DyeColor.YELLOW]!!))
.save(serializer, modLocation("regular/striped_tritanium_block"))
val colorTritaniumBlock = AdvancementBuilder()
@ -481,8 +481,8 @@ fun addAdvancements(serializer: Consumer<AdvancementHolder>, lang: MatteryLangua
MRegistry.TRITANIUM_STAIRS.items.values.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MRegistry.TRITANIUM_STRIPED_BLOCK.flatItems.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MRegistry.TRITANIUM_STRIPED_STAIRS.flatItems.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_BLOCK.also { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_STAIRS.also { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_BLOCK.values.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_STAIRS.values.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
}
.save(serializer, modLocation("regular/tritanium_block2"))
@ -522,7 +522,7 @@ fun addAdvancements(serializer: Consumer<AdvancementHolder>, lang: MatteryLangua
.also { advancement ->
MRegistry.TRITANIUM_BLOCK.items.values.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MRegistry.TRITANIUM_STRIPED_BLOCK.flatItems.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_BLOCK.also { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
MItems.TRITANIUM_STRIPED_BLOCK.values.forEach { advancement.addCriterion(it.registryName!!.path, criterion(it)) }
}
.save(serializer, modLocation("regular/tritanium_block4"))

View File

@ -25,7 +25,7 @@ fun addItemModels(provider: MatteryItemModelProvider) {
provider.generatedTranslucent(MItems.TRITANIUM_BARS, modLocation("block/decorative/tritanium_bars"))
provider.block(MItems.DEEPSLATE_TRITANIUM_ORE)
provider.block(MItems.TRITANIUM_ORE)
provider.block(MItems.TRITANIUM_STRIPED_BLOCK)
provider.blocks(MItems.TRITANIUM_STRIPED_BLOCK.values)
provider.block(MItems.TRITANIUM_RAW_BLOCK)
provider.block(MItems.TRITANIUM_INGOT_BLOCK)
provider.coloredWithBaseBlock(MItems.ITEM_MONITOR, "item_monitor")

View File

@ -26,7 +26,7 @@ private fun decoratives(provider: MatteryLanguageProvider) {
}
with (provider.english) {
for ((color, name) in provider.englishColors.dyeClassMapped) {
for ((color, name) in provider.englishColors.mapped) {
add(MItems.CARGO_CRATE_MINECARTS[color]!!, "Minecart with $name Cargo Crate")
add(MEntityTypes.CARGO_CRATE_MINECARTS[color]!!, "Minecart with $name Cargo Crate")
@ -50,6 +50,13 @@ private fun decoratives(provider: MatteryLanguageProvider) {
add(MRegistry.TRITANIUM_PRESSURE_PLATE.block, "description1", "High blast resistance")
}
with(provider.englishColors) {
addIntermediate(MBlocks.TRITANIUM_STRIPED_BLOCK, "Tritanium %s Striped Block")
addIntermediate(MBlocks.TRITANIUM_STRIPED_STAIRS, "Tritanium %s Striped Stairs")
addIntermediate(MBlocks.TRITANIUM_STRIPED_SLAB, "Tritanium %s Striped Slab")
addIntermediate(MBlocks.TRITANIUM_STRIPED_WALL, "Tritanium %s Striped Wall")
}
with(provider.english) {
add(MItems.CARGO_CRATE_MINECARTS[null]!!, "Minecart with Cargo Crate")
add(MEntityTypes.CARGO_CRATE_MINECARTS[null]!!, "Minecart with Cargo Crate")
@ -70,12 +77,11 @@ 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
val baseName = provider.englishColors.dyeClassMapped[base]!!
val stripeName = provider.englishColors.dyeClassMapped[stripe]!!
val baseName = provider.englishColors.mapped[base]!!
val stripeName = provider.englishColors.mapped[stripe]!!
add(block, "$baseName Colored $stripeName Striped Tritanium Block")
}
@ -83,8 +89,8 @@ private fun decoratives(provider: MatteryLanguageProvider) {
for ((block, colors) in MRegistry.TRITANIUM_STRIPED_STAIRS.blocksWithColor) {
val (base, stripe) = colors
val baseName = provider.englishColors.dyeClassMapped[base]!!
val stripeName = provider.englishColors.dyeClassMapped[stripe]!!
val baseName = provider.englishColors.mapped[base]!!
val stripeName = provider.englishColors.mapped[stripe]!!
add(block, "$baseName Colored $stripeName Striped Tritanium Stairs")
}
@ -92,8 +98,8 @@ private fun decoratives(provider: MatteryLanguageProvider) {
for ((block, colors) in MRegistry.TRITANIUM_STRIPED_SLAB.blocksWithColor) {
val (base, stripe) = colors
val baseName = provider.englishColors.dyeClassMapped[base]!!
val stripeName = provider.englishColors.dyeClassMapped[stripe]!!
val baseName = provider.englishColors.mapped[base]!!
val stripeName = provider.englishColors.mapped[stripe]!!
add(block, "$baseName Colored $stripeName Striped Tritanium Slab")
}
@ -101,8 +107,8 @@ private fun decoratives(provider: MatteryLanguageProvider) {
for ((block, colors) in MRegistry.TRITANIUM_STRIPED_WALL.blocksWithColor) {
val (base, stripe) = colors
val baseName = provider.englishColors.dyeClassMapped[base]!!
val stripeName = provider.englishColors.dyeClassMapped[stripe]!!
val baseName = provider.englishColors.mapped[base]!!
val stripeName = provider.englishColors.mapped[stripe]!!
add(block, "$baseName Colored $stripeName Striped Tritanium Wall")
}
@ -548,10 +554,6 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.METAL_JUNK, "desc", "Useless junk, or is it?")
add(MBlocks.METAL_MESH, "Metal Mesh")
add(MBlocks.TRITANIUM_STRIPED_BLOCK, "Tritanium Striped Block")
add(MBlocks.TRITANIUM_STRIPED_STAIRS, "Tritanium Striped Stairs")
add(MBlocks.TRITANIUM_STRIPED_SLAB, "Tritanium Striped Slab")
add(MBlocks.TRITANIUM_STRIPED_WALL, "Tritanium Striped Wall")
add(MBlocks.TRITANIUM_ORE, "Tritanium Ore")
add(MBlocks.DEEPSLATE_TRITANIUM_ORE, "Deepslate Tritanium Ore")
add(MBlocks.TRITANIUM_RAW_BLOCK, "Raw Tritanium Block")

View File

@ -1,6 +1,5 @@
package ru.dbotthepony.mc.otm.datagen.lang
import com.google.common.collect.ImmutableList
import com.google.common.collect.ImmutableMap
import it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap
import net.minecraft.data.DataGenerator
@ -13,7 +12,6 @@ import net.minecraft.world.entity.EntityType
import net.minecraft.world.item.DyeColor
import net.minecraft.world.item.Item
import net.minecraft.world.item.ItemStack
import net.minecraft.world.item.enchantment.Enchantment
import net.minecraft.world.level.block.Block
import net.neoforged.neoforge.common.data.LanguageProvider
import ru.dbotthepony.mc.otm.OverdriveThatMatters
@ -123,6 +121,7 @@ class MatteryLanguageProvider(private val gen: DataGenerator) {
inner class Colors(
language: String,
val lowercaseIntermediate: Boolean,
val white: String,
val orange: String,
@ -143,86 +142,7 @@ class MatteryLanguageProvider(private val gen: DataGenerator) {
) {
val slave: LanguageProvider = slaves.computeIfAbsent(language, ::Slave)
val list: List<String> = ImmutableList.builder<String>()
.add(white)
.add(orange)
.add(magenta)
.add(lightBlue)
.add(yellow)
.add(lime)
.add(pink)
.add(gray)
.add(lightGray)
.add(cyan)
.add(purple)
.add(blue)
.add(brown)
.add(green)
.add(red)
.add(black)
.build()
val pairList: List<Pair<String, String>> = ImmutableList.builder<Pair<String, String>>()
.add("white" to white)
.add("orange" to orange)
.add("magenta" to magenta)
.add("light_blue" to lightBlue)
.add("yellow" to yellow)
.add("lime" to lime)
.add("pink" to pink)
.add("gray" to gray)
.add("light_gray" to lightGray)
.add("cyan" to cyan)
.add("purple" to purple)
.add("blue" to blue)
.add("brown" to brown)
.add("green" to green)
.add("red" to red)
.add("black" to black)
.build()
val mapped: Map<String, String> = ImmutableMap.builder<String, String>()
.put("white", white)
.put("orange", orange)
.put("magenta", magenta)
.put("lightBlue", lightBlue)
.put("light_blue", lightBlue)
.put("yellow", yellow)
.put("lime", lime)
.put("pink", pink)
.put("gray", gray)
.put("lightGray", lightGray)
.put("light_gray", lightGray)
.put("cyan", cyan)
.put("purple", purple)
.put("blue", blue)
.put("brown", brown)
.put("green", green)
.put("red", red)
.put("black", black)
.put("WHITE", white)
.put("ORANGE", orange)
.put("MAGENTA", magenta)
.put("LIGHTBLUE", lightBlue)
.put("LIGHT_BLUE", lightBlue)
.put("YELLOW", yellow)
.put("LIME", lime)
.put("PINK", pink)
.put("GRAY", gray)
.put("LIGHTGRAY", lightGray)
.put("LIGHT_GRAY", lightGray)
.put("CYAN", cyan)
.put("PURPLE", purple)
.put("BLUE", blue)
.put("BROWN", brown)
.put("GREEN", green)
.put("RED", red)
.put("BLACK", black)
.build()
val dyeClassMapped: Map<DyeColor, String> = ImmutableMap.builder<DyeColor, String>()
val mapped: Map<DyeColor, String> = ImmutableMap.builder<DyeColor, String>()
.put(DyeColor.WHITE, white)
.put(DyeColor.ORANGE, orange)
.put(DyeColor.MAGENTA, magenta)
@ -241,37 +161,30 @@ class MatteryLanguageProvider(private val gen: DataGenerator) {
.put(DyeColor.BLACK, black)
.build()
val dyeClassPairs: List<Pair<DyeColor, String>> = ImmutableList.builder<Pair<DyeColor, String>>()
.add(DyeColor.WHITE to white)
.add(DyeColor.ORANGE to orange)
.add(DyeColor.MAGENTA to magenta)
.add(DyeColor.LIGHT_BLUE to lightBlue)
.add(DyeColor.YELLOW to yellow)
.add(DyeColor.LIME to lime)
.add(DyeColor.PINK to pink)
.add(DyeColor.GRAY to gray)
.add(DyeColor.LIGHT_GRAY to lightGray)
.add(DyeColor.CYAN to cyan)
.add(DyeColor.PURPLE to purple)
.add(DyeColor.BLUE to blue)
.add(DyeColor.BROWN to brown)
.add(DyeColor.GREEN to green)
.add(DyeColor.RED to red)
.add(DyeColor.BLACK to black)
.build()
fun add(list: ColoredDecorativeBlock, toFormat: String) {
for ((color, target) in dyeClassPairs) {
for ((color, target) in mapped) {
slave.add(list.blocks[color]!!, toFormat.format(target))
}
}
fun forEach(consumer: (color: DyeColor, name: String) -> Unit) {
for ((a, b) in dyeClassPairs) {
for ((a, b) in mapped) {
consumer.invoke(a, b)
}
}
fun add(map: Map<DyeColor, Block>, toFormat: String) {
for ((color, block) in map) {
slave.add(block, toFormat.format(mapped[color]!!))
}
}
fun addIntermediate(map: Map<DyeColor, Block>, toFormat: String) {
for ((color, block) in map) {
slave.add(block, toFormat.format(if (lowercaseIntermediate) mapped[color]!!.lowercase() else mapped[color]!!))
}
}
fun add(
whiteBlock: Block,
orangeBlock: Block,
@ -349,7 +262,7 @@ class MatteryLanguageProvider(private val gen: DataGenerator) {
}
}
val englishColors = Colors("en_us",
val englishColors = Colors("en_us", lowercaseIntermediate = false,
"White",
"Orange",
"Magenta",
@ -368,16 +281,16 @@ class MatteryLanguageProvider(private val gen: DataGenerator) {
"Black",
)
val russianColors = Colors("ru_ru",
val russianColors = Colors("ru_ru", lowercaseIntermediate = true,
"Белый",
"Оранжевый",
"Маджентовый",
"Светло Синий",
"Светло синий",
"Жёлтый",
"Лаймовый",
"Розовый",
"Серый",
"Светло Серый",
"Светло серый",
"Циановый",
"Пурпурный",
"Синий",

View File

@ -1,6 +1,5 @@
package ru.dbotthepony.mc.otm.datagen.lang
import net.minecraft.world.item.DyeColor
import ru.dbotthepony.mc.otm.registry.AndroidFeatures
import ru.dbotthepony.mc.otm.registry.MBlocks
import ru.dbotthepony.mc.otm.registry.MEntityTypes
@ -35,8 +34,15 @@ private fun decoratives(provider: MatteryLanguageProvider) {
add(MRegistry.DECORATIVE_CRATE, "%s блок контейнера")
}
with (provider.russianColors) {
addIntermediate(MBlocks.TRITANIUM_STRIPED_BLOCK, "Тритановый блок с %s полоской")
addIntermediate(MBlocks.TRITANIUM_STRIPED_STAIRS, "Тритановые ступеньки с %s полоской")
addIntermediate(MBlocks.TRITANIUM_STRIPED_SLAB, "Тритановая плита с %s полоской")
addIntermediate(MBlocks.TRITANIUM_STRIPED_WALL, "Тритановая ограда с %s полоской")
}
with (provider.russian) {
for ((color, name) in provider.russianColors.dyeClassMapped) {
for ((color, name) in provider.russianColors.mapped) {
add(MItems.CARGO_CRATE_MINECARTS[color]!!, "Вагонетка с $name грузовым ящиком")
add(MEntityTypes.CARGO_CRATE_MINECARTS[color]!!, "Вагонетка с $name грузовым ящиком")
@ -83,8 +89,8 @@ private fun decoratives(provider: MatteryLanguageProvider) {
for ((block, colors) in MRegistry.TRITANIUM_STRIPED_BLOCK.blocksWithColor) {
val (base, stripe) = colors
val baseName = provider.russianColors.dyeClassMapped[base]!!
val stripeName = provider.russianColors.dyeClassMapped[stripe]!!
val baseName = provider.russianColors.mapped[base]!!
val stripeName = provider.russianColors.mapped[stripe]!!
add(block, "$baseName-окрашенный $stripeName-ополосаченный тритановый блок")
}
@ -92,8 +98,8 @@ private fun decoratives(provider: MatteryLanguageProvider) {
for ((block, colors) in MRegistry.TRITANIUM_STRIPED_STAIRS.blocksWithColor) {
val (base, stripe) = colors
val baseName = provider.russianColors.dyeClassMapped[base]!!
val stripeName = provider.russianColors.dyeClassMapped[stripe]!!
val baseName = provider.russianColors.mapped[base]!!
val stripeName = provider.russianColors.mapped[stripe]!!
add(block, "$baseName-окрашенные $stripeName-ополосаченные тритановые ступеньки")
}
@ -101,8 +107,8 @@ private fun decoratives(provider: MatteryLanguageProvider) {
for ((block, colors) in MRegistry.TRITANIUM_STRIPED_SLAB.blocksWithColor) {
val (base, stripe) = colors
val baseName = provider.russianColors.dyeClassMapped[base]!!
val stripeName = provider.russianColors.dyeClassMapped[stripe]!!
val baseName = provider.russianColors.mapped[base]!!
val stripeName = provider.russianColors.mapped[stripe]!!
add(block, "$baseName-окрашенная $stripeName-ополосаченная тритановая Плита")
}
@ -110,8 +116,8 @@ private fun decoratives(provider: MatteryLanguageProvider) {
for ((block, colors) in MRegistry.TRITANIUM_STRIPED_WALL.blocksWithColor) {
val (base, stripe) = colors
val baseName = provider.russianColors.dyeClassMapped[base]!!
val stripeName = provider.russianColors.dyeClassMapped[stripe]!!
val baseName = provider.russianColors.mapped[base]!!
val stripeName = provider.russianColors.mapped[stripe]!!
add(block, "$baseName-окрашенная $stripeName-ополосаченная тритановая ограда")
}
@ -553,10 +559,6 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.METAL_JUNK, "Металлический хлам")
add(MBlocks.METAL_JUNK, "desc", "Бесполезный хлам, или нет?")
add(MBlocks.TRITANIUM_STRIPED_BLOCK, "Тритановый блок с полоской")
add(MBlocks.TRITANIUM_STRIPED_STAIRS, "Тритановые ступеньки с полоской")
add(MBlocks.TRITANIUM_STRIPED_SLAB, "Тритановая плита с полоской")
add(MBlocks.TRITANIUM_STRIPED_WALL, "Тритановая ограда с полоской")
add(MBlocks.TRITANIUM_ORE, "Тритановая руда")
add(MBlocks.DEEPSLATE_TRITANIUM_ORE, "Тританоносный глубинный сланец")
add(MBlocks.TRITANIUM_RAW_BLOCK, "Блок рудного тритана")

View File

@ -72,10 +72,10 @@ fun addLootTables(lootTables: LootTables) {
lootTables.dropsSelf(MBlocks.CARBON_FIBRE_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.METAL_MESH) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_RAW_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_BLOCK) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_WALL) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_STAIRS) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MBlocks.TRITANIUM_STRIPED_SLAB) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_BLOCK.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_WALL.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.TRITANIUM_STRIPED_STAIRS.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.createSlabItemTable(MBlocks.TRITANIUM_STRIPED_SLAB.values) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.MATTER_CABLE) { condition(ExplosionCondition.survivesExplosion()) }
lootTables.dropsSelf(MBlocks.GRAVITATION_STABILIZER)
lootTables.dropsOther(MBlocks.GRAVITATION_STABILIZER_LENS, MBlocks.GRAVITATION_STABILIZER)

View File

@ -109,9 +109,11 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: RecipeOutpu
wallWithCut(item, MRegistry.TRITANIUM_STRIPED_WALL.getItem(a, b), consumer)
}
stairsWithCut(MItems.TRITANIUM_STRIPED_BLOCK, MItems.TRITANIUM_STRIPED_STAIRS, consumer)
slabWithCut(MItems.TRITANIUM_STRIPED_BLOCK, MItems.TRITANIUM_STRIPED_SLAB, consumer)
wallWithCut(MItems.TRITANIUM_STRIPED_BLOCK, MItems.TRITANIUM_STRIPED_WALL, consumer)
for (color in DyeColor.entries) {
stairsWithCut(MItems.TRITANIUM_STRIPED_BLOCK[color]!!, MItems.TRITANIUM_STRIPED_STAIRS[color]!!, consumer)
slabWithCut(MItems.TRITANIUM_STRIPED_BLOCK[color]!!, MItems.TRITANIUM_STRIPED_SLAB[color]!!, consumer)
wallWithCut(MItems.TRITANIUM_STRIPED_BLOCK[color]!!, MItems.TRITANIUM_STRIPED_WALL[color]!!, consumer)
}
for ((color, item) in MRegistry.FLOOR_TILES.items) {
stairsWithCut(item, MRegistry.FLOOR_TILES_STAIRS.items[color]!!, consumer)
@ -275,13 +277,15 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: RecipeOutpu
.unlockedBy(MItems.LABORATORY_LAMP)
.save(consumer, MItems.LABORATORY_LAMP_INVERTED.registryName!!.toString() + "_inv")
MatteryRecipe(MBlocks.TRITANIUM_STRIPED_BLOCK, 24, category = RecipeCategory.BUILDING_BLOCKS)
.rowB(MItemTags.TRITANIUM_INGOTS)
.row(MItemTags.TRITANIUM_INGOTS, Tags.Items.COBBLESTONES, MItemTags.TRITANIUM_INGOTS)
.rowAB(Tags.Items.DYES_YELLOW, MItemTags.TRITANIUM_INGOTS)
.unlockedBy(MItemTags.TRITANIUM_INGOTS)
.unlockedBy(Tags.Items.DYES_YELLOW)
.build(consumer, modLocation("decorative/blocks/striped_default"))
for (color in DyeColor.entries) {
MatteryRecipe(MBlocks.TRITANIUM_STRIPED_BLOCK[color]!!, 24, category = RecipeCategory.BUILDING_BLOCKS)
.rowB(MItemTags.TRITANIUM_INGOTS)
.row(MItemTags.TRITANIUM_INGOTS, Tags.Items.COBBLESTONES, MItemTags.TRITANIUM_INGOTS)
.rowAB(color.tag, MItemTags.TRITANIUM_INGOTS)
.unlockedBy(MItemTags.TRITANIUM_INGOTS)
.unlockedBy(color.tag)
.build(consumer, modLocation("decorative/blocks/striped_default_${color.name.lowercase()}"))
}
MatteryRecipe(MRegistry.TRITANIUM_BLOCK.item, 24, category = RecipeCategory.BUILDING_BLOCKS)
.rowB(MItemTags.TRITANIUM_INGOTS)

View File

@ -44,9 +44,13 @@ private fun generate(consumer: RecipeOutput, default: Item, items: Map<out DyeCo
}
}
private fun cleaning(consumer: RecipeOutput, to: Item, from: Map<out DyeColor?, Item>) {
consumer.accept(modLocation("painter/cleaning/" + to.recipeName), PainterRecipe(
Ingredient.of(from.entries.stream().filter { it.key != null }.map { ItemStack(it.value) }),
private fun cleaning(consumer: RecipeOutput, to: Item, from: Map<out DyeColor?, Item>, suffix: String = "") {
cleaning(consumer, to, from.entries.stream().filter { it.key != null }.map { it.value }.toList(), suffix)
}
private fun cleaning(consumer: RecipeOutput, to: Item, from: Collection<Item>, suffix: String = "") {
consumer.accept(modLocation("painter/cleaning/" + to.recipeName + suffix), PainterRecipe(
Ingredient.of(from.stream().map { ItemStack(it) }),
ItemStack(to),
mapOf(null to 15)
))
@ -321,27 +325,39 @@ fun addPainterRecipes(consumer: RecipeOutput) {
consumer.accept(modLocation("painter/armor_clear_dye"), PainterArmorDyeRecipe(mapOf(null to 15)))
consumer.accept(modLocation("painter/tritanium_yellow_stripe"), PainterRecipe(
Ingredient.of(MRegistry.TRITANIUM_BLOCK.item),
ItemStack(MItems.TRITANIUM_STRIPED_BLOCK),
mapOf(DyeColor.YELLOW to 1)
))
generate(consumer, MItems.TRITANIUM_STRIPED_BLOCK)
generate(consumer, MItems.TRITANIUM_STRIPED_STAIRS)
generate(consumer, MItems.TRITANIUM_STRIPED_SLAB)
generate(consumer, MItems.TRITANIUM_STRIPED_WALL)
consumer.accept(modLocation("painter/tritanium_yellow_stripe_stairs"), PainterRecipe(
Ingredient.of(MRegistry.TRITANIUM_STAIRS.item),
ItemStack(MItems.TRITANIUM_STRIPED_STAIRS),
mapOf(DyeColor.YELLOW to 1)
))
cleaning(consumer, MRegistry.TRITANIUM_BLOCK.item, MItems.TRITANIUM_STRIPED_BLOCK.values, "_from_striped")
cleaning(consumer, MRegistry.TRITANIUM_STAIRS.item, MItems.TRITANIUM_STRIPED_STAIRS.values, "_from_striped")
cleaning(consumer, MRegistry.TRITANIUM_SLAB.item, MItems.TRITANIUM_STRIPED_SLAB.values, "_from_striped")
cleaning(consumer, MRegistry.TRITANIUM_WALL.item, MItems.TRITANIUM_STRIPED_WALL.values, "_from_striped")
consumer.accept(modLocation("painter/tritanium_yellow_stripe_slab"), PainterRecipe(
Ingredient.of(MRegistry.TRITANIUM_SLAB.item),
ItemStack(MItems.TRITANIUM_STRIPED_SLAB),
mapOf(DyeColor.YELLOW to 1)
))
for (color in DyeColor.entries) {
consumer.accept(modLocation("painter/tritanium_${color.name.lowercase()}_stripe"), PainterRecipe(
Ingredient.of(MRegistry.TRITANIUM_BLOCK.item),
ItemStack(MItems.TRITANIUM_STRIPED_BLOCK[color]!!),
mapOf(color to 1)
))
consumer.accept(modLocation("painter/tritanium_yellow_stripe_wall"), PainterRecipe(
Ingredient.of(MRegistry.TRITANIUM_WALL.item),
ItemStack(MItems.TRITANIUM_STRIPED_WALL),
mapOf(DyeColor.YELLOW to 1)
))
consumer.accept(modLocation("painter/tritanium_${color.name.lowercase()}_stripe_stairs"), PainterRecipe(
Ingredient.of(MRegistry.TRITANIUM_STAIRS.item),
ItemStack(MItems.TRITANIUM_STRIPED_STAIRS[color]!!),
mapOf(color to 1)
))
consumer.accept(modLocation("painter/tritanium_${color.name.lowercase()}_stripe_slab"), PainterRecipe(
Ingredient.of(MRegistry.TRITANIUM_SLAB.item),
ItemStack(MItems.TRITANIUM_STRIPED_SLAB[color]!!),
mapOf(color to 1)
))
consumer.accept(modLocation("painter/tritanium_${color.name.lowercase()}_stripe_wall"), PainterRecipe(
Ingredient.of(MRegistry.TRITANIUM_WALL.item),
ItemStack(MItems.TRITANIUM_STRIPED_WALL[color]!!),
mapOf(color to 1)
))
}
}

View File

@ -151,35 +151,35 @@ fun addTags(tagsProvider: TagsProvider) {
.add(MRegistry.FLOOR_TILES_STAIRS.blocks.values)
.add(MRegistry.TRITANIUM_STAIRS.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_STAIRS.flatBlocks)
.add(MBlocks.TRITANIUM_STRIPED_STAIRS)
.add(MBlocks.TRITANIUM_STRIPED_STAIRS.values)
tagsProvider.blocks.Appender(BlockTags.SLABS)
.add(MRegistry.TRITANIUM_SLAB.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_SLAB.flatBlocks)
.add(MRegistry.FLOOR_TILES_SLAB.blocks.values)
.add(MBlocks.TRITANIUM_STRIPED_SLAB)
.add(MBlocks.TRITANIUM_STRIPED_SLAB.values)
tagsProvider.blocks.Appender(BlockTags.WALLS)
.add(MRegistry.TRITANIUM_WALL.allBlocks.values)
.add(MRegistry.TRITANIUM_STRIPED_WALL.flatBlocks)
.add(MBlocks.TRITANIUM_STRIPED_WALL)
.add(MBlocks.TRITANIUM_STRIPED_WALL.values)
tagsProvider.items.Appender(ItemTags.STAIRS)
.add(MRegistry.FLOOR_TILES_STAIRS.items.values)
.add(MRegistry.TRITANIUM_STAIRS.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_STAIRS.flatItems)
.add(MItems.TRITANIUM_STRIPED_STAIRS)
.add(MItems.TRITANIUM_STRIPED_STAIRS.values)
tagsProvider.items.Appender(ItemTags.SLABS)
.add(MRegistry.TRITANIUM_SLAB.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_SLAB.flatItems)
.add(MRegistry.FLOOR_TILES_SLAB.items.values)
.add(MItems.TRITANIUM_STRIPED_SLAB)
.add(MItems.TRITANIUM_STRIPED_SLAB.values)
tagsProvider.items.Appender(ItemTags.WALLS)
.add(MRegistry.TRITANIUM_WALL.allItems.values)
.add(MRegistry.TRITANIUM_STRIPED_WALL.flatItems)
.add(MItems.TRITANIUM_STRIPED_WALL)
.add(MItems.TRITANIUM_STRIPED_WALL.values)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_DOOR.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_TRAPDOOR.values, Tiers.IRON)
@ -243,10 +243,10 @@ fun addTags(tagsProvider: TagsProvider) {
tagsProvider.requiresPickaxe(MBlocks.DEEPSLATE_TRITANIUM_ORE, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_RAW_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_STAIRS, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_WALL, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_SLAB, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_BLOCK.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_STAIRS.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_WALL.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_SLAB.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.CARBON_FIBRE_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.INFINITE_WATER_SOURCE, Tiers.STONE)

View File

@ -30,6 +30,11 @@ class CondensedCreativeCompat : CondensedCreativeInitializer {
addByBase(MItems.COBBLESTONE_GENERATOR, MCreativeTabs.MAIN)
addByBase(MItems.ESSENCE_STORAGE, MCreativeTabs.MAIN)
addByColor(MItems.TRITANIUM_STRIPED_BLOCK, DyeColor.YELLOW, MCreativeTabs.DECORATIVE)
addByColor(MItems.TRITANIUM_STRIPED_STAIRS, DyeColor.YELLOW, MCreativeTabs.DECORATIVE)
addByColor(MItems.TRITANIUM_STRIPED_SLAB, DyeColor.YELLOW, MCreativeTabs.DECORATIVE)
addByColor(MItems.TRITANIUM_STRIPED_WALL, DyeColor.YELLOW, MCreativeTabs.DECORATIVE)
addByBase(MItems.MATTER_DECOMPOSER, MCreativeTabs.MAIN)
addByBase(MItems.MATTER_CAPACITOR_BANK, MCreativeTabs.MAIN)
addByBase(MItems.MATTER_SCANNER, MCreativeTabs.MAIN)
@ -88,7 +93,11 @@ class CondensedCreativeCompat : CondensedCreativeInitializer {
}
private fun addByWhite(map: Map<DyeColor, Item>, vararg tabs: CreativeModeTab): CondensedItemEntry.Builder? {
val base = map[DyeColor.WHITE]
return addByColor(map, DyeColor.WHITE, *tabs)
}
private fun addByColor(map: Map<DyeColor, Item>, color: DyeColor, vararg tabs: CreativeModeTab): CondensedItemEntry.Builder? {
val base = map[color]
val builder = CondensedEntryRegistry.fromItems(base!!.registryName, base, map.values)
tabs.forEach { builder.addToItemGroup(it) }

View File

@ -270,7 +270,7 @@ object MBlocks {
val TRITANIUM_TRAPDOOR = registry.coloredWithBase(MNames.TRITANIUM_TRAPDOOR, ::TritaniumTrapdoorBlock)
val TRITANIUM_STRIPED_BLOCK: Block by registry.register(MNames.TRITANIUM_STRIPED_BLOCK, true) { Block(
val TRITANIUM_STRIPED_BLOCK = registry.colored(MNames.TRITANIUM_STRIPED_BLOCK) { Block(
BlockBehaviour.Properties.of()
.mapColor(MapColor.COLOR_LIGHT_BLUE)
.sound(SoundType.BASALT)
@ -279,17 +279,17 @@ object MBlocks {
.destroyTime(2.5f)
) }
val TRITANIUM_STRIPED_STAIRS: Block by registry.register(MNames.TRITANIUM_STRIPED_STAIRS) { StairBlock(
TRITANIUM_STRIPED_BLOCK.defaultBlockState(),
BlockBehaviour.Properties.ofLegacyCopy(TRITANIUM_STRIPED_BLOCK)
val TRITANIUM_STRIPED_STAIRS = registry.colored(MNames.TRITANIUM_STRIPED_STAIRS) { StairBlock(
TRITANIUM_STRIPED_BLOCK[it]!!.defaultBlockState(),
BlockBehaviour.Properties.ofLegacyCopy(TRITANIUM_STRIPED_BLOCK[it]!!)
) }
val TRITANIUM_STRIPED_SLAB: Block by registry.register(MNames.TRITANIUM_STRIPED_SLAB) {
SlabBlock(BlockBehaviour.Properties.ofLegacyCopy(TRITANIUM_STRIPED_BLOCK))
val TRITANIUM_STRIPED_SLAB = registry.colored(MNames.TRITANIUM_STRIPED_SLAB) {
SlabBlock(BlockBehaviour.Properties.ofLegacyCopy(TRITANIUM_STRIPED_BLOCK[it]!!))
}
val TRITANIUM_STRIPED_WALL: Block by registry.register(MNames.TRITANIUM_STRIPED_WALL) {
WallBlock(BlockBehaviour.Properties.ofLegacyCopy(TRITANIUM_STRIPED_BLOCK))
val TRITANIUM_STRIPED_WALL = registry.colored(MNames.TRITANIUM_STRIPED_WALL) {
WallBlock(BlockBehaviour.Properties.ofLegacyCopy(TRITANIUM_STRIPED_BLOCK[it]!!))
}
val CARBON_FIBRE_BLOCK: Block by registry.register(MNames.CARBON_FIBRE_BLOCK) { Block(

View File

@ -225,10 +225,10 @@ private fun addDecorativeTabItems(consumer: CreativeModeTab.Output) {
accept(MItems.METAL_BEAM)
accept(MItems.ENGINE)
accept(MItems.TRITANIUM_STRIPED_BLOCK)
accept(MItems.TRITANIUM_STRIPED_STAIRS)
accept(MItems.TRITANIUM_STRIPED_SLAB)
accept(MItems.TRITANIUM_STRIPED_WALL)
accept(MItems.TRITANIUM_STRIPED_BLOCK.values)
accept(MItems.TRITANIUM_STRIPED_STAIRS.values)
accept(MItems.TRITANIUM_STRIPED_SLAB.values)
accept(MItems.TRITANIUM_STRIPED_WALL.values)
accept(MItems.CARBON_FIBRE_BLOCK)
accept(MItems.METAL_JUNK)
accept(MItems.METAL_MESH)

View File

@ -596,10 +596,10 @@ object MItems {
ExopackUpgrades
}
val TRITANIUM_STRIPED_BLOCK: Item by registry.register(MNames.TRITANIUM_STRIPED_BLOCK) { BlockItem(MBlocks.TRITANIUM_STRIPED_BLOCK, DEFAULT_PROPERTIES) }
val TRITANIUM_STRIPED_STAIRS: Item by registry.register(MNames.TRITANIUM_STRIPED_STAIRS) { BlockItem(MBlocks.TRITANIUM_STRIPED_STAIRS, DEFAULT_PROPERTIES) }
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 TRITANIUM_STRIPED_BLOCK = registry.colored(MNames.TRITANIUM_STRIPED_BLOCK) { BlockItem(MBlocks.TRITANIUM_STRIPED_BLOCK[it]!!, DEFAULT_PROPERTIES) }
val TRITANIUM_STRIPED_STAIRS = registry.colored(MNames.TRITANIUM_STRIPED_STAIRS) { BlockItem(MBlocks.TRITANIUM_STRIPED_STAIRS[it]!!, DEFAULT_PROPERTIES) }
val TRITANIUM_STRIPED_SLAB = registry.colored(MNames.TRITANIUM_STRIPED_SLAB) { BlockItem(MBlocks.TRITANIUM_STRIPED_SLAB[it]!!, DEFAULT_PROPERTIES) }
val TRITANIUM_STRIPED_WALL = registry.colored(MNames.TRITANIUM_STRIPED_WALL) { BlockItem(MBlocks.TRITANIUM_STRIPED_WALL[it]!!, 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) }

View File

@ -78,7 +78,6 @@ class DecorativeBlock(
private val shapes = getShapeForEachState(rotationProperty) { shape.rotateFromNorth(it[rotationProperty]).computeShape() }
@Suppress("override_deprecation")
override fun getShape(
state: BlockState,
blockGetter: BlockGetter,