diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt index 6ce2c6ec4..b58581093 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -1,6 +1,7 @@ package ru.dbotthepony.mc.otm.datagen import net.minecraft.resources.ResourceLocation +import net.minecraft.world.item.DyeColor import net.minecraft.world.level.block.Block import net.minecraft.world.level.block.DoorBlock import net.minecraft.world.level.block.IronBarsBlock @@ -440,7 +441,11 @@ object DataGen { for ((color, door) in MBlocks.TRITANIUM_DOOR) door(door, modLocation("block/decorative/tritanium_door_top${color?.name?.lowercase()?.let { "_$it" } ?: ""}"), modLocation("block/decorative/tritanium_door_bottom${color?.name?.lowercase()?.let { "_$it" } ?: ""}")) - trapdoor(MBlocks.TRITANIUM_TRAPDOOR, modLocation("block/decorative/tritanium_trapdoor")) + trapdoor(MBlocks.TRITANIUM_TRAPDOOR[null]!!, modLocation("block/decorative/tritanium_trapdoor")) + + for (color in DyeColor.values()) + trapdoor(MBlocks.TRITANIUM_TRAPDOOR[color]!!, modLocation("block/decorative/tritanium_trapdoor_${color.name.lowercase()}")) + addBlockModels(blockModelProvider) addDecorativeData(blockStateProvider, itemModelProvider, blockModelProvider) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt index f42d04e11..3b8e3a921 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/items/ItemModels.kt @@ -1,6 +1,7 @@ package ru.dbotthepony.mc.otm.datagen.items import net.minecraft.resources.ResourceLocation +import net.minecraft.world.item.DyeColor import ru.dbotthepony.mc.otm.core.registryName import ru.dbotthepony.mc.otm.datagen.DataGen import ru.dbotthepony.mc.otm.datagen.modLocation @@ -96,7 +97,11 @@ fun addItemModels(provider: MatteryItemModelProvider) { provider.generated(MItems.MATTER_DUST) provider.generated(MItems.TRITANIUM_DOOR.values) - provider.block(MItems.TRITANIUM_TRAPDOOR, "tritanium_trapdoor_bottom") + + provider.block(MItems.TRITANIUM_TRAPDOOR[null]!!, "tritanium_trapdoor_bottom") + + for (color in DyeColor.values()) + provider.block(MItems.TRITANIUM_TRAPDOOR[color]!!, "tritanium_trapdoor_${color.name.lowercase()}_bottom") for (item in MRegistry.CARGO_CRATES.allItems.values) { provider.block(item, "${item.registryName!!.path}_closed") diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt index fcbe2fab4..912815145 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/lang/English.kt @@ -34,6 +34,11 @@ private fun decoratives(provider: MatteryLanguageProvider) { add(MBlocks.TRITANIUM_DOOR[color]!!, "description0", "High blast resistance door with redstone latch...") add(MBlocks.TRITANIUM_DOOR[color]!!, "description1", "...feeling safe now?") add(MBlocks.TRITANIUM_DOOR[color]!!, "description2", "This one is painted $name") + + add(MBlocks.TRITANIUM_TRAPDOOR[color]!!, "$name Tritanium Trapdoor") + add(MBlocks.TRITANIUM_TRAPDOOR[color]!!, "description0", "High blast resistance door with redstone latch...") + add(MBlocks.TRITANIUM_TRAPDOOR[color]!!, "description1", "...feeling safe now?") + add(MBlocks.TRITANIUM_TRAPDOOR[color]!!, "description2", "This one is painted $name") } add(MRegistry.TRITANIUM_PRESSURE_PLATE.block, "Tritanium Pressure Plate") @@ -418,9 +423,9 @@ private fun blocks(provider: MatteryLanguageProvider) { add(MBlocks.TRITANIUM_DOOR[null]!!, "description0", "High blast resistance door with redstone latch...") add(MBlocks.TRITANIUM_DOOR[null]!!, "description1", "...feeling safe now?") - add(MBlocks.TRITANIUM_TRAPDOOR, "Tritanium Trapdoor") - add(MBlocks.TRITANIUM_TRAPDOOR, "description0", "High blast resistance door with redstone latch...") - add(MBlocks.TRITANIUM_TRAPDOOR, "description1", "...feeling safe now?") + add(MBlocks.TRITANIUM_TRAPDOOR[null]!!, "Tritanium Trapdoor") + add(MBlocks.TRITANIUM_TRAPDOOR[null]!!, "description0", "High blast resistance door with redstone latch...") + add(MBlocks.TRITANIUM_TRAPDOOR[null]!!, "description1", "...feeling safe now?") } } diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesData.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesData.kt index 04e3e9ab1..1c838327f 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesData.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootTablesData.kt @@ -58,7 +58,9 @@ fun addLootTables(lootTables: LootTables) { lootTables.dropsSelf(MBlocks.METAL_BEAM) { condition(ExplosionCondition.survivesExplosion()) } lootTables.dropsSelf(MBlocks.TRITANIUM_INGOT_BLOCK) { condition(ExplosionCondition.survivesExplosion()) } - lootTables.dropsSelf(MBlocks.TRITANIUM_TRAPDOOR) { condition(ExplosionCondition.survivesExplosion()) } + for (door in MBlocks.TRITANIUM_TRAPDOOR.values) + lootTables.dropsSelf(door) { condition(ExplosionCondition.survivesExplosion()) } + lootTables.dropsSelf(MRegistry.TRITANIUM_PRESSURE_PLATE.allBlocks.values) { condition(ExplosionCondition.survivesExplosion()) } lootTables.block(MBlocks.PHANTOM_ATTRACTOR) { diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt index 7878eda20..b34d6e749 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/recipes/DecorativesRecipes.kt @@ -288,12 +288,20 @@ fun addDecorativesRecipes(provider: MatteryRecipeProvider, consumer: Consumer + object : TrapDoorBlock(Properties.of(Material.METAL, color ?: DyeColor.LIGHT_BLUE).explosionResistance(80f).noOcclusion().destroyTime(3f).requiresCorrectToolForDrops()) { override fun appendHoverText( p_49816_: ItemStack, p_49817_: BlockGetter?, @@ -158,6 +158,10 @@ object MBlocks { super.appendHoverText(p_49816_, p_49817_, p_49818_, p_49819_) p_49818_.add(TranslatableComponent("$descriptionId.description0").withStyle(ChatFormatting.DARK_GRAY)) p_49818_.add(TranslatableComponent("$descriptionId.description1").withStyle(ChatFormatting.DARK_GRAY)) + + if (color != null) { + p_49818_.add(TranslatableComponent("$descriptionId.description2").withStyle(ChatFormatting.DARK_GRAY)) + } } } } diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt index 97b2d94b7..c1dbc3bbd 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/registry/MItems.kt @@ -234,7 +234,7 @@ object MItems { val METAL_BEAM: Item by registry.register(MNames.METAL_BEAM) { BlockItem(MBlocks.METAL_BEAM, DEFAULT_PROPERTIES_DECORATIVE) } val TRITANIUM_DOOR = registry.allColored(MNames.TRITANIUM_DOOR) { color, _ -> DoubleHighBlockItem(MBlocks.TRITANIUM_DOOR[color]!!, DEFAULT_PROPERTIES_DECORATIVE) } - val TRITANIUM_TRAPDOOR: Item by registry.register(MNames.TRITANIUM_TRAPDOOR) { BlockItem(MBlocks.TRITANIUM_TRAPDOOR, DEFAULT_PROPERTIES_DECORATIVE) } + val TRITANIUM_TRAPDOOR = registry.allColored(MNames.TRITANIUM_TRAPDOOR) { color, _ -> BlockItem(MBlocks.TRITANIUM_TRAPDOOR[color]!!, DEFAULT_PROPERTIES_DECORATIVE) } init { MRegistry.TRITANIUM_PRESSURE_PLATE.registerItems(registry) diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_black.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_black.png new file mode 100644 index 000000000..91c73d764 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_black.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_blue.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_blue.png new file mode 100644 index 000000000..454a17b12 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_blue.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_brown.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_brown.png new file mode 100644 index 000000000..a6179300c Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_brown.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_colorless.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_colorless.png new file mode 100644 index 000000000..d56ca012f Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_colorless.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_cyan.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_cyan.png new file mode 100644 index 000000000..be88f7713 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_cyan.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_gray.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_gray.png new file mode 100644 index 000000000..c1c60e4ab Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_gray.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_green.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_green.png new file mode 100644 index 000000000..b66599f51 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_green.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_light_blue.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_light_blue.png new file mode 100644 index 000000000..2c0a928b8 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_light_blue.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_light_gray.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_light_gray.png new file mode 100644 index 000000000..753753e63 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_light_gray.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_lime.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_lime.png new file mode 100644 index 000000000..d80f527ca Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_lime.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_magenta.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_magenta.png new file mode 100644 index 000000000..bff36969e Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_magenta.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_orange.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_orange.png new file mode 100644 index 000000000..0a4988488 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_orange.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_overlay.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_overlay.png new file mode 100644 index 000000000..c348fa286 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_overlay.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_pink.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_pink.png new file mode 100644 index 000000000..70375edb4 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_pink.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_purple.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_purple.png new file mode 100644 index 000000000..b2488bb9d Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_purple.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_red.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_red.png new file mode 100644 index 000000000..2555592b4 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_red.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_white.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_white.png new file mode 100644 index 000000000..9ee247a3d Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_white.png differ diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_yellow.png b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_yellow.png new file mode 100644 index 000000000..76c4ac644 Binary files /dev/null and b/src/main/resources/assets/overdrive_that_matters/textures/block/decorative/tritanium_trapdoor_yellow.png differ