Container crates, but with all colors

This commit is contained in:
DBotThePony 2022-09-08 19:14:33 +07:00
parent b617bf0c25
commit 5946413b7a
Signed by: DBot
GPG Key ID: DCC23B5715498507
63 changed files with 128 additions and 89 deletions

View File

@ -62,6 +62,11 @@ object DataGen {
blockStateProvider.simpleBlockM(*blocks) blockStateProvider.simpleBlockM(*blocks)
} }
private fun decorativeCubeAll(subdir: String, suffix: String, vararg blocks: Block) {
blockModelProvider.decorativeCubeAll(subdir, suffix, *blocks)
blockStateProvider.simpleBlockM(*blocks)
}
private fun decorativeCubeAll(blocks: List<Block>) { private fun decorativeCubeAll(blocks: List<Block>) {
blockModelProvider.decorativeCubeAll(blocks) blockModelProvider.decorativeCubeAll(blocks)
blockStateProvider.simpleBlockM(blocks) blockStateProvider.simpleBlockM(blocks)
@ -139,6 +144,46 @@ object DataGen {
} }
} }
private fun decoratives(subdir: String, list: ColoredDecorativeBlock) {
for (block in list.blocks.values) {
decorativeCubeAll(subdir, block)
}
for (item in list.items.values) {
itemModelProvider.block(item)
}
}
private fun decoratives(subdir: String, list: DecorativeBlock) {
for (block in list.blocks.values) {
decorativeCubeAll(subdir, block)
}
for (item in list.items.values) {
itemModelProvider.block(item)
}
}
private fun decoratives(subdir: String, suffix: String, list: ColoredDecorativeBlock) {
for (block in list.blocks.values) {
decorativeCubeAll(subdir, suffix, block)
}
for (item in list.items.values) {
itemModelProvider.block(item)
}
}
private fun decoratives(subdir: String, suffix: String, list: DecorativeBlock) {
for (block in list.blocks.values) {
decorativeCubeAll(subdir, suffix, block)
}
for (item in list.items.values) {
itemModelProvider.block(item)
}
}
@SubscribeEvent @SubscribeEvent
@JvmStatic @JvmStatic
@Suppress("unused") @Suppress("unused")
@ -165,7 +210,16 @@ object DataGen {
event.generator.addProvider(true, lootTableProvider) event.generator.addProvider(true, lootTableProvider)
event.generator.addProvider(true, lootModifier) event.generator.addProvider(true, lootModifier)
decorativeCubeAll(MBlocks.CRATE_LIST) for ((color, block) in MRegistry.DECORATIVE_CRATE.allBlocks) {
if (color == null) {
blockModelProvider.decorativeCubeAll(block, "crates/crate_colorless_borderless")
} else {
blockModelProvider.decorativeCubeAll(block, "crates/crate_borderless_${color.name.lowercase()}")
}
blockStateProvider.simpleBlockM(block)
}
decorativeCubeAll(MBlocks.CARBON_FIBRE_BLOCK) decorativeCubeAll(MBlocks.CARBON_FIBRE_BLOCK)
decoratives(MRegistry.TRITANIUM_BLOCK) decoratives(MRegistry.TRITANIUM_BLOCK)
@ -393,7 +447,7 @@ object DataGen {
generated(glass, ResourceLocation(MOD_ID, "block/decorative/${MRegistry.INDUSTRIAL_GLASS.allItems[color]!!.registryName!!.path}")) generated(glass, ResourceLocation(MOD_ID, "block/decorative/${MRegistry.INDUSTRIAL_GLASS.allItems[color]!!.registryName!!.path}"))
} }
blocks(MItems.CRATE_LIST) blocks(MRegistry.DECORATIVE_CRATE.allItems.values)
components(MItems.DATAGEN_COMPONENTS) components(MItems.DATAGEN_COMPONENTS)

View File

@ -55,7 +55,7 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event
fun block(item: Item) = delegates.add(SimpleItemModel(item.registryName!!.path, ResourceLocation(DataGen.MOD_ID, "block/${item.registryName!!.path}"))) fun block(item: Item) = delegates.add(SimpleItemModel(item.registryName!!.path, ResourceLocation(DataGen.MOD_ID, "block/${item.registryName!!.path}")))
fun block(item: Item, path: String) = delegates.add(SimpleItemModel(item.registryName!!.path, ResourceLocation(DataGen.MOD_ID, "block/$path"))) fun block(item: Item, path: String) = delegates.add(SimpleItemModel(item.registryName!!.path, ResourceLocation(DataGen.MOD_ID, "block/$path")))
fun blocks(vararg items: Item) = items.forEach(this::block) fun blocks(vararg items: Item) = items.forEach(this::block)
fun blocks(items: List<Item>) = items.forEach(this::block) fun blocks(items: Collection<Item>) = items.forEach(this::block)
fun generated(item: Item, texture: ResourceLocation) { fun generated(item: Item, texture: ResourceLocation) {
generated.add(SimpleItemModel(item.registryName!!.path, texture)) generated.add(SimpleItemModel(item.registryName!!.path, texture))
@ -67,18 +67,18 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event
fun generated(vararg items: Item) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "item/${it.registryName!!.path}")) } fun generated(vararg items: Item) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "item/${it.registryName!!.path}")) }
fun KOT(vararg items: Item) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "block/ph_kitty")) } fun KOT(vararg items: Item) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "block/ph_kitty")) }
fun generated(items: List<Item>) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "item/${it.registryName!!.path}")) } fun generated(items: Collection<Item>) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "item/${it.registryName!!.path}")) }
fun generatedBlock(vararg items: Item) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "block/${it.registryName!!.path}")) } fun generatedBlock(vararg items: Item) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "block/${it.registryName!!.path}")) }
fun generatedBlockDecorative(vararg items: Item) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "block/decorative/${it.registryName!!.path}")) } fun generatedBlockDecorative(vararg items: Item) = items.forEach { generated(it, ResourceLocation(DataGen.MOD_ID, "block/decorative/${it.registryName!!.path}")) }
fun handheld(vararg items: Item) = items.forEach { handheld(it, ResourceLocation(DataGen.MOD_ID, "item/${it.registryName!!.path}")) } fun handheld(vararg items: Item) = items.forEach { handheld(it, ResourceLocation(DataGen.MOD_ID, "item/${it.registryName!!.path}")) }
fun handheld(items: List<Item>) = items.forEach { handheld(it, ResourceLocation(DataGen.MOD_ID, "item/${it.registryName!!.path}")) } fun handheld(items: Collection<Item>) = items.forEach { handheld(it, ResourceLocation(DataGen.MOD_ID, "item/${it.registryName!!.path}")) }
fun generated(item: Item, prefix: String) = generated(item, ResourceLocation(DataGen.MOD_ID, "item/${prefix}${item.registryName!!.path}")) fun generated(item: Item, prefix: String) = generated(item, ResourceLocation(DataGen.MOD_ID, "item/${prefix}${item.registryName!!.path}"))
fun handheld(item: Item, prefix: String) = handheld(item, ResourceLocation(DataGen.MOD_ID, "item/${prefix}${item.registryName!!.path}")) fun handheld(item: Item, prefix: String) = handheld(item, ResourceLocation(DataGen.MOD_ID, "item/${prefix}${item.registryName!!.path}"))
fun component(item: Item) = generated(item, "component/") fun component(item: Item) = generated(item, "component/")
fun components(vararg items: Item) = items.forEach(this::component) fun components(vararg items: Item) = items.forEach(this::component)
fun components(items: List<Item>) = items.forEach(this::component) fun components(items: Collection<Item>) = items.forEach(this::component)
fun resource(item: Item) = generated(item, "resources/") fun resource(item: Item) = generated(item, "resources/")
fun resources(vararg items: Item) = items.forEach(this::resource) fun resources(vararg items: Item) = items.forEach(this::resource)
@ -91,7 +91,7 @@ class MatteryItemModelProvider(event: GatherDataEvent) : ItemModelProvider(event
} }
} }
fun generatedTiered(items: List<Item>, prefix: String) { fun generatedTiered(items: Collection<Item>, prefix: String) {
var i = 0 var i = 0
for (item in items) { for (item in items) {

View File

@ -14,6 +14,7 @@ private fun decoratives(provider: MatteryLanguageProvider) {
provider.englishColors.add(MRegistry.INDUSTRIAL_GLASS_PANE, "%s Stained Industrial Glass Pane") provider.englishColors.add(MRegistry.INDUSTRIAL_GLASS_PANE, "%s Stained Industrial Glass Pane")
provider.englishColors.add(MRegistry.CARGO_CRATES, "%s Cargo Crate") provider.englishColors.add(MRegistry.CARGO_CRATES, "%s Cargo Crate")
provider.englishColors.add(MRegistry.DECORATIVE_CRATE, "%s Container Block")
with(provider.english) { with(provider.english) {
add(MRegistry.CARGO_CRATES.block, "Cargo Crate") add(MRegistry.CARGO_CRATES.block, "Cargo Crate")
@ -22,6 +23,8 @@ private fun decoratives(provider: MatteryLanguageProvider) {
add(MRegistry.INDUSTRIAL_GLASS.block, "Industrial Glass") add(MRegistry.INDUSTRIAL_GLASS.block, "Industrial Glass")
add(MRegistry.INDUSTRIAL_GLASS_PANE.block, "Industrial Glass Pane") add(MRegistry.INDUSTRIAL_GLASS_PANE.block, "Industrial Glass Pane")
add(MRegistry.DECORATIVE_CRATE.block, "Rusty Container Block")
add(MRegistry.VENT.block, "Vent") add(MRegistry.VENT.block, "Vent")
add(MRegistry.VENT_ALTERNATIVE.block, "Alternative Vent") add(MRegistry.VENT_ALTERNATIVE.block, "Alternative Vent")
@ -291,14 +294,6 @@ private fun blocks(provider: MatteryLanguageProvider) {
add(MBlocks.MATTER_RECYCLER, "Matter Recycler") add(MBlocks.MATTER_RECYCLER, "Matter Recycler")
add(MBlocks.CRATE_RED, "Red Container Block")
add(MBlocks.CRATE_BLUE, "Blue Container Block")
add(MBlocks.CRATE_GREEN, "Green Container Block")
add(MBlocks.CRATE_YELLOW, "Yellow Container Block")
add(MBlocks.CRATE_BLACK, "Black Container Block")
add(MBlocks.CRATE_PINK, "Pink Container Block")
add(MBlocks.CRATE_PURPLE, "Purple Container Block")
add(MBlocks.CARBON_FIBRE_BLOCK, "Carbon fibre Block") add(MBlocks.CARBON_FIBRE_BLOCK, "Carbon fibre Block")
add(MBlocks.TRITANIUM_STRIPED_BLOCK, "Tritanium Striped Block") add(MBlocks.TRITANIUM_STRIPED_BLOCK, "Tritanium Striped Block")

View File

@ -13,14 +13,14 @@ import ru.dbotthepony.mc.otm.registry.MBlocks
import ru.dbotthepony.mc.otm.registry.MRegistry import ru.dbotthepony.mc.otm.registry.MRegistry
fun addLootTables(lootTables: LootTables) { fun addLootTables(lootTables: LootTables) {
lootTables.dropsSelf(MBlocks.CRATE_LIST) lootTables.dropsSelf(MRegistry.DECORATIVE_CRATE.allBlocks.values)
lootTables.dropsSelf(MRegistry.CARGO_CRATES.blocks.values) lootTables.dropsSelf(MRegistry.CARGO_CRATES.allBlocks.values)
lootTables.dropsSelf(MRegistry.INDUSTRIAL_GLASS.blocks.values) lootTables.dropsSelf(MRegistry.INDUSTRIAL_GLASS.allBlocks.values)
lootTables.dropsSelf(MRegistry.INDUSTRIAL_GLASS_PANE.blocks.values) lootTables.dropsSelf(MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks.values)
lootTables.dropsSelf(MRegistry.TRITANIUM_BLOCK.blocks.values) lootTables.dropsSelf(MRegistry.TRITANIUM_BLOCK.allBlocks.values)
lootTables.dropsSelf(MRegistry.VENT.blocks.values) lootTables.dropsSelf(MRegistry.VENT.allBlocks.values)
lootTables.dropsSelf(MRegistry.VENT_ALTERNATIVE.blocks.values) lootTables.dropsSelf(MRegistry.VENT_ALTERNATIVE.allBlocks.values)
lootTables.dropsSelf(MRegistry.FLOOR_TILES.blocks.values) lootTables.dropsSelf(MRegistry.FLOOR_TILES.blocks.values)
lootTables.dropsSelf(MRegistry.UNREFINED_FLOOR_TILES.blocks.values) lootTables.dropsSelf(MRegistry.UNREFINED_FLOOR_TILES.blocks.values)
lootTables.dropsSelf(MRegistry.TRITANIUM_STRIPED_BLOCK.flatBlocks) lootTables.dropsSelf(MRegistry.TRITANIUM_STRIPED_BLOCK.flatBlocks)

View File

@ -67,7 +67,7 @@ class BlockMatteryModelProvider(event: GatherDataEvent) : MatteryModelProvider(e
super.registerModels() super.registerModels()
for ((path, texture) in cubeAll) { for ((path, texture) in cubeAll) {
val s = cubeAll(path, texture) cubeAll(path, texture)
} }
for ((path, end, side) in cubeColumn) { for ((path, end, side) in cubeColumn) {
@ -87,12 +87,22 @@ class BlockMatteryModelProvider(event: GatherDataEvent) : MatteryModelProvider(e
} }
} }
fun decorativeCubeAll(blocks: List<Block>) { fun decorativeCubeAll(subdir: String, suffix: String, vararg blocks: Block) {
for (it in blocks) {
cubeAll.add(CubeAllEntry(it.registryName!!.path, ResourceLocation("overdrive_that_matters:block/decorative/${subdir}/${it.registryName!!.path}$suffix")))
}
}
fun decorativeCubeAll(blocks: Collection<Block>) {
for (it in blocks) { for (it in blocks) {
cubeAll.add(CubeAllEntry(it.registryName!!.path, ResourceLocation("overdrive_that_matters:block/decorative/${it.registryName!!.path}"))) cubeAll.add(CubeAllEntry(it.registryName!!.path, ResourceLocation("overdrive_that_matters:block/decorative/${it.registryName!!.path}")))
} }
} }
fun decorativeCubeAll(block: Block, texture: String) {
cubeAll.add(CubeAllEntry(block.registryName!!.path, ResourceLocation("overdrive_that_matters:block/decorative/$texture")))
}
fun column(it: Block, end: String, side: String) { fun column(it: Block, end: String, side: String) {
cubeColumn.add(CubeColumnEntry(it.registryName!!.path, ResourceLocation(DataGen.MOD_ID, end), ResourceLocation(DataGen.MOD_ID, side))) cubeColumn.add(CubeColumnEntry(it.registryName!!.path, ResourceLocation(DataGen.MOD_ID, end), ResourceLocation(DataGen.MOD_ID, side)))
} }

View File

@ -121,21 +121,19 @@ fun addCraftingTableRecipes(consumer: Consumer<FinishedRecipe>) {
ShapelessRecipeBuilder(other, 1).requires(item).unlockedBy(other).save(consumer, ResourceLocation(OverdriveThatMatters.MOD_ID, "${other.registryName!!.path}_from_alt")) ShapelessRecipeBuilder(other, 1).requires(item).unlockedBy(other).save(consumer, ResourceLocation(OverdriveThatMatters.MOD_ID, "${other.registryName!!.path}_from_alt"))
} }
for ((crate, color) in listOf( MatteryRecipe(MRegistry.DECORATIVE_CRATE.item, 24)
MItems.CRATE_RED to Tags.Items.DYES_RED, .rowB(MItemTags.PLATE_IRON)
MItems.CRATE_BLUE to Tags.Items.DYES_BLUE,
MItems.CRATE_YELLOW to Tags.Items.DYES_YELLOW,
MItems.CRATE_GREEN to Tags.Items.DYES_GREEN,
MItems.CRATE_BLACK to Tags.Items.DYES_BLACK,
MItems.CRATE_PINK to Tags.Items.DYES_PINK,
MItems.CRATE_PURPLE to Tags.Items.DYES_PURPLE,
)) {
MatteryRecipe(crate, 24)
.rowBC(MItemTags.PLATE_IRON, color)
.row(MItemTags.PLATE_IRON, COBBLESTONE, MItemTags.PLATE_IRON) .row(MItemTags.PLATE_IRON, COBBLESTONE, MItemTags.PLATE_IRON)
.rowB(MItemTags.PLATE_IRON) .rowB(MItemTags.PLATE_IRON)
.unlockedBy(MItemTags.PLATE_IRON) .unlockedBy(MItemTags.PLATE_IRON)
.unlockedBy(color) .build(consumer)
for ((color, crate) in MRegistry.DECORATIVE_CRATE.items) {
MatteryRecipe(crate, 8)
.row(MRegistry.DECORATIVE_CRATE.item, MRegistry.DECORATIVE_CRATE.item, MRegistry.DECORATIVE_CRATE.item)
.row(MRegistry.DECORATIVE_CRATE.item, color.tag, MRegistry.DECORATIVE_CRATE.item)
.row(MRegistry.DECORATIVE_CRATE.item, MRegistry.DECORATIVE_CRATE.item, MRegistry.DECORATIVE_CRATE.item)
.unlockedBy(MRegistry.DECORATIVE_CRATE.item)
.build(consumer) .build(consumer)
} }

View File

@ -60,19 +60,19 @@ fun addTags(tagsProvider: TagsProvider) {
tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_BLOCK, Tiers.IRON) tagsProvider.requiresPickaxe(MBlocks.TRITANIUM_STRIPED_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MBlocks.CARBON_FIBRE_BLOCK, Tiers.IRON) tagsProvider.requiresPickaxe(MBlocks.CARBON_FIBRE_BLOCK, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.CARGO_CRATES.blocks.values, Tiers.IRON) tagsProvider.requiresPickaxe(MRegistry.CARGO_CRATES.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.VENT.blocks.values, Tiers.IRON) tagsProvider.requiresPickaxe(MRegistry.VENT.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.VENT_ALTERNATIVE.blocks.values, Tiers.IRON) tagsProvider.requiresPickaxe(MRegistry.VENT_ALTERNATIVE.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_BLOCK.blocks.values, Tiers.IRON) tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_BLOCK.allBlocks.values, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_BLOCK.flatBlocks, Tiers.IRON) tagsProvider.requiresPickaxe(MRegistry.TRITANIUM_STRIPED_BLOCK.flatBlocks, Tiers.IRON)
tagsProvider.requiresPickaxe(MRegistry.FLOOR_TILES.blocks.values)
tagsProvider.requiresPickaxe(MRegistry.FLOOR_TILES.blocks.values)
tagsProvider.requiresShovel(MRegistry.UNREFINED_FLOOR_TILES.blocks.values) tagsProvider.requiresShovel(MRegistry.UNREFINED_FLOOR_TILES.blocks.values)
tagsProvider.requiresPickaxe(MRegistry.INDUSTRIAL_GLASS.blocks.values, Tiers.STONE) tagsProvider.requiresPickaxe(MRegistry.INDUSTRIAL_GLASS.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MRegistry.INDUSTRIAL_GLASS_PANE.blocks.values, Tiers.STONE) tagsProvider.requiresPickaxe(MRegistry.INDUSTRIAL_GLASS_PANE.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(MBlocks.CRATE_LIST, Tiers.STONE) tagsProvider.requiresPickaxe(MRegistry.DECORATIVE_CRATE.allBlocks.values, Tiers.STONE)
tagsProvider.requiresPickaxe(listOf( tagsProvider.requiresPickaxe(listOf(
MBlocks.GRAVITATION_STABILIZER, MBlocks.GRAVITATION_STABILIZER,

View File

@ -95,6 +95,7 @@ object MBlocks {
) } ) }
init { init {
MRegistry.CARGO_CRATES.registerBlocks(registry)
MRegistry.TRITANIUM_BLOCK.registerBlocks(registry) MRegistry.TRITANIUM_BLOCK.registerBlocks(registry)
} }
@ -115,32 +116,13 @@ object MBlocks {
) } ) }
init { init {
MRegistry.CARGO_CRATES.registerBlocks(registry)
MRegistry.INDUSTRIAL_GLASS.registerBlocks(registry) MRegistry.INDUSTRIAL_GLASS.registerBlocks(registry)
MRegistry.INDUSTRIAL_GLASS_PANE.registerBlocks(registry) MRegistry.INDUSTRIAL_GLASS_PANE.registerBlocks(registry)
MRegistry.UNREFINED_FLOOR_TILES.registerBlocks(registry) MRegistry.UNREFINED_FLOOR_TILES.registerBlocks(registry)
MRegistry.FLOOR_TILES.registerBlocks(registry) MRegistry.FLOOR_TILES.registerBlocks(registry)
MRegistry.VENT.registerBlocks(registry) MRegistry.VENT.registerBlocks(registry)
MRegistry.VENT_ALTERNATIVE.registerBlocks(registry) MRegistry.VENT_ALTERNATIVE.registerBlocks(registry)
MRegistry.DECORATIVE_CRATE.registerBlocks(registry)
MRegistry.TRITANIUM_STRIPED_BLOCK.registerBlocks(registry) MRegistry.TRITANIUM_STRIPED_BLOCK.registerBlocks(registry)
} }
val CRATE_RED: Block by registry.register(MRegistry.CRATE_RED.name) { MRegistry.CRATE_RED.makeBlock() }
val CRATE_BLUE: Block by registry.register(MRegistry.CRATE_BLUE.name) { MRegistry.CRATE_BLUE.makeBlock() }
val CRATE_YELLOW: Block by registry.register(MRegistry.CRATE_YELLOW.name) { MRegistry.CRATE_YELLOW.makeBlock() }
val CRATE_GREEN: Block by registry.register(MRegistry.CRATE_GREEN.name) { MRegistry.CRATE_GREEN.makeBlock() }
val CRATE_BLACK: Block by registry.register(MRegistry.CRATE_BLACK.name) { MRegistry.CRATE_BLACK.makeBlock() }
val CRATE_PINK: Block by registry.register(MRegistry.CRATE_PINK.name) { MRegistry.CRATE_PINK.makeBlock() }
val CRATE_PURPLE: Block by registry.register(MRegistry.CRATE_PURPLE.name) { MRegistry.CRATE_PURPLE.makeBlock() }
val CRATE_LIST = LazyList(
{ CRATE_RED },
{ CRATE_BLUE },
{ CRATE_YELLOW },
{ CRATE_GREEN },
{ CRATE_BLACK },
{ CRATE_PINK },
{ CRATE_PURPLE },
)
} }

View File

@ -260,27 +260,8 @@ object MItems {
val NUTRIENT_PASTE: Item by registry.register(MNames.NUTRIENT_PASTE) { Item(Item.Properties().stacksTo(64).food( val NUTRIENT_PASTE: Item by registry.register(MNames.NUTRIENT_PASTE) { Item(Item.Properties().stacksTo(64).food(
FoodProperties.Builder().meat().nutrition(8).saturationMod(0.9F).build()).tab(OverdriveThatMatters.INSTANCE.CREATIVE_TAB)) } FoodProperties.Builder().meat().nutrition(8).saturationMod(0.9F).build()).tab(OverdriveThatMatters.INSTANCE.CREATIVE_TAB)) }
val CRATE_RED: Item by registry.register(MRegistry.CRATE_RED.name) { BlockItem(MBlocks.CRATE_RED, DEFAULT_PROPERTIES_DECORATIVE) }
val CRATE_BLUE: Item by registry.register(MRegistry.CRATE_BLUE.name) { BlockItem(MBlocks.CRATE_BLUE, DEFAULT_PROPERTIES_DECORATIVE) }
val CRATE_YELLOW: Item by registry.register(MRegistry.CRATE_YELLOW.name) { BlockItem(MBlocks.CRATE_YELLOW, DEFAULT_PROPERTIES_DECORATIVE) }
val CRATE_GREEN: Item by registry.register(MRegistry.CRATE_GREEN.name) { BlockItem(MBlocks.CRATE_GREEN, DEFAULT_PROPERTIES_DECORATIVE) }
val CRATE_BLACK: Item by registry.register(MRegistry.CRATE_BLACK.name) { BlockItem(MBlocks.CRATE_BLACK, DEFAULT_PROPERTIES_DECORATIVE) }
val CRATE_PINK: Item by registry.register(MRegistry.CRATE_PINK.name) { BlockItem(MBlocks.CRATE_PINK, DEFAULT_PROPERTIES_DECORATIVE) }
val CRATE_PURPLE: Item by registry.register(MRegistry.CRATE_PURPLE.name) { BlockItem(MBlocks.CRATE_PURPLE, DEFAULT_PROPERTIES_DECORATIVE) }
val CRATE_LIST = LazyList(
{ CRATE_RED },
{ CRATE_BLUE },
{ CRATE_YELLOW },
{ CRATE_GREEN },
{ CRATE_BLACK },
{ CRATE_PINK },
{ CRATE_PURPLE },
)
init { init {
MRegistry.CARGO_CRATES.registerItems(registry) MRegistry.CARGO_CRATES.registerItems(registry)
MRegistry.TRITANIUM_BLOCK.registerItems(registry) MRegistry.TRITANIUM_BLOCK.registerItems(registry)
} }
@ -294,6 +275,7 @@ object MItems {
MRegistry.FLOOR_TILES.registerItems(registry) MRegistry.FLOOR_TILES.registerItems(registry)
MRegistry.VENT.registerItems(registry) MRegistry.VENT.registerItems(registry)
MRegistry.VENT_ALTERNATIVE.registerItems(registry) MRegistry.VENT_ALTERNATIVE.registerItems(registry)
MRegistry.DECORATIVE_CRATE.registerItems(registry)
MRegistry.TRITANIUM_STRIPED_BLOCK.registerItems(registry) MRegistry.TRITANIUM_STRIPED_BLOCK.registerItems(registry)
} }
} }

View File

@ -34,6 +34,7 @@ object MNames {
const val GRAVITATION_STABILIZER_LENS = "gravitation_stabilizer_lens" const val GRAVITATION_STABILIZER_LENS = "gravitation_stabilizer_lens"
const val CARGO_CRATE = "cargo_crate" const val CARGO_CRATE = "cargo_crate"
const val DECORATIVE_CRATE = "decorative_crate"
const val STORAGE_BUS = "storage_bus" const val STORAGE_BUS = "storage_bus"
const val STORAGE_IMPORTER = "storage_importer" const val STORAGE_IMPORTER = "storage_importer"

View File

@ -101,12 +101,20 @@ object MRegistry {
val CARGO_CRATES = DecorativeBlock(MNames.CARGO_CRATE, ::CargoCrateBlock, baseItemGroup = OverdriveThatMatters.INSTANCE.CREATIVE_TAB) val CARGO_CRATES = DecorativeBlock(MNames.CARGO_CRATE, ::CargoCrateBlock, baseItemGroup = OverdriveThatMatters.INSTANCE.CREATIVE_TAB)
val DECORATIVE_CRATE = DecorativeBlock.simple(MNames.DECORATIVE_CRATE, {
BlockBehaviour.Properties.of(Material.METAL, it?.materialColor ?: MaterialColor.SNOW)
.sound(SoundType.METAL)
.requiresCorrectToolForDrops()
.explosionResistance(10f)
.strength(1f)
})
val TRITANIUM_BLOCK = DecorativeBlock.simple(MNames.TRITANIUM_BLOCK, { val TRITANIUM_BLOCK = DecorativeBlock.simple(MNames.TRITANIUM_BLOCK, {
BlockBehaviour.Properties.of(Material.METAL, it?.materialColor ?: MaterialColor.COLOR_LIGHT_BLUE) BlockBehaviour.Properties.of(Material.METAL, it?.materialColor ?: MaterialColor.COLOR_LIGHT_BLUE)
.sound(SoundType.BASALT) .sound(SoundType.BASALT)
.requiresCorrectToolForDrops() .requiresCorrectToolForDrops()
.explosionResistance(80f) .explosionResistance(80f)
.strength(4f) .strength(2.5f)
}) })
val VENT = DecorativeBlock.simple(MNames.VENT, { val VENT = DecorativeBlock.simple(MNames.VENT, {
@ -129,13 +137,13 @@ object MRegistry {
BlockBehaviour.Properties.of(Material.STONE, it.materialColor) BlockBehaviour.Properties.of(Material.STONE, it.materialColor)
.sound(SoundType.STONE) .sound(SoundType.STONE)
.requiresCorrectToolForDrops() .requiresCorrectToolForDrops()
.strength(2f, 1.5f) .strength(1.5f, 6f)
}) })
val UNREFINED_FLOOR_TILES = ColoredDecorativeBlock.simple(MNames.UNREFINED_FLOOR_TILES, { val UNREFINED_FLOOR_TILES = ColoredDecorativeBlock.simple(MNames.UNREFINED_FLOOR_TILES, {
BlockBehaviour.Properties.of(Material.CLAY, it.materialColor) BlockBehaviour.Properties.of(Material.CLAY, it.materialColor)
.sound(SoundType.GRAVEL) .sound(SoundType.GRAVEL)
.strength(1f, 1f) .strength(1f, 2f)
}) })
val INDUSTRIAL_GLASS = DecorativeBlock(MNames.INDUSTRIAL_GLASS, { color -> val INDUSTRIAL_GLASS = DecorativeBlock(MNames.INDUSTRIAL_GLASS, { color ->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 595 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB