From de1eb1af194beea4e14b566ae3f1c441c926c468 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 16 May 2022 14:46:33 +0700 Subject: [PATCH] Storage bus/i/o blockstates --- .../ru/dbotthepony/mc/otm/datagen/DataGen.kt | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) 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 5cb26ab11..c034d0c84 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -225,6 +225,50 @@ object DataGen { } } } + + lambda { + with(it.getMultipartBuilder(MBlocks.STORAGE_BUS)) { + for (dir in Direction.values()) { + part().modelFile(models().getExistingFile(ResourceLocation(OverdriveThatMatters.MOD_ID, "storage_bus"))) + .rotationX(dir.toXRotBlockstate()) + .rotationY(dir.toYRotBlockstate()) + .addModel() + .condition(RotatableMatteryBlock.FACING_FULL, dir) + .end() + } + + part().modelFile(models().getExistingFile(ResourceLocation(OverdriveThatMatters.MOD_ID, "storage_cable_core"))) + .addModel().end() + } + + with(it.getMultipartBuilder(MBlocks.STORAGE_IMPORTER)) { + for (dir in Direction.values()) { + part().modelFile(models().getExistingFile(ResourceLocation(OverdriveThatMatters.MOD_ID, "storage_importer"))) + .rotationX(dir.toXRotBlockstate()) + .rotationY(dir.toYRotBlockstate()) + .addModel() + .condition(RotatableMatteryBlock.FACING_FULL, dir) + .end() + } + + part().modelFile(models().getExistingFile(ResourceLocation(OverdriveThatMatters.MOD_ID, "storage_cable_core"))) + .addModel().end() + } + + with(it.getMultipartBuilder(MBlocks.STORAGE_EXPORTER)) { + for (dir in Direction.values()) { + part().modelFile(models().getExistingFile(ResourceLocation(OverdriveThatMatters.MOD_ID, "storage_exporter"))) + .rotationX(dir.toXRotBlockstate()) + .rotationY(dir.toYRotBlockstate()) + .addModel() + .condition(RotatableMatteryBlock.FACING_FULL, dir) + .end() + } + + part().modelFile(models().getExistingFile(ResourceLocation(OverdriveThatMatters.MOD_ID, "storage_cable_core"))) + .addModel().end() + } + } } with(itemModelProvider) { @@ -293,6 +337,10 @@ object DataGen { block(MItems.PLATE_PRESS, "plate_press_idle") block(MItems.STORAGE_POWER_SUPPLIER, "storage_power_supplier") block(MItems.MATTER_RECYCLER, "matter_recycler_working") + + block(MItems.STORAGE_BUS) + block(MItems.STORAGE_IMPORTER) + block(MItems.STORAGE_EXPORTER) } blockStateProvider.lambda { provider ->