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 ef839348e..37cd0efe8 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -93,6 +93,11 @@ object DataGen { blockStateProvider.simpleBlockM(*blocks) } + fun decorativeCubeAllCutout(vararg blocks: Block) { + blockModelProvider.decorativeCubeAllCutout(*blocks) + blockStateProvider.simpleBlockM(*blocks) + } + fun decorativeCubeAll(subdir: String, vararg blocks: Block) { blockModelProvider.decorativeCubeAll(subdir, *blocks) blockStateProvider.simpleBlockM(*blocks) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DecorativeData.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DecorativeData.kt index 886c9ce79..44f383f0f 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DecorativeData.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DecorativeData.kt @@ -35,6 +35,7 @@ fun addDecorativeData(blockStateProvider: MatteryBlockStateProvider, itemModelPr } DataGen.decorativeCubeAll(MBlocks.CARBON_FIBRE_BLOCK) + DataGen.decorativeCubeAllCutout(MBlocks.METAL_MESH) DataGen.decoratives(MRegistry.TRITANIUM_BLOCK) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/blocks/BlockModels.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/blocks/BlockModels.kt index 3e5ae73c2..2bf209a12 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/blocks/BlockModels.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/blocks/BlockModels.kt @@ -27,6 +27,9 @@ fun addBlockModels(provider: MatteryBlockModelProvider) { column(MBlocks.GENERATOR_BLOCK, "block/generator_block","block/generator_block_top") + cubeAllCutout(MBlocks.MODULAR_FRAME) + cubeAllCutout(MBlocks.HEAVY_MODULAR_FRAME) + cubeAll(MBlocks.ENERGY_INPUT_INTERFACE) cubeAll(MBlocks.ENERGY_OUTPUT_INTERFACE) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/blocks/BlockStates.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/blocks/BlockStates.kt index 7716ea4ce..597b94ab4 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/blocks/BlockStates.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/blocks/BlockStates.kt @@ -31,7 +31,6 @@ fun addBlockStates(provider: MatteryBlockStateProvider) { provider.ore(MBlocks.TRITANIUM_ORE) provider.ore(MBlocks.TRITANIUM_RAW_BLOCK) provider.block(MBlocks.TRITANIUM_INGOT_BLOCK) - provider.block(MBlocks.METAL_MESH) provider.ore(MBlocks.DILITHIUM_ORE) provider.ore(MBlocks.DEEPSLATE_DILITHIUM_ORE) diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt index 645325e3a..773bad392 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/models/MatteryModelProvider.kt @@ -34,6 +34,23 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve } } + fun cubeAllCutout(vararg blocks: Block) { + for (block in blocks) { + exec { + cubeAll(block.registryName!!.path, modLocation("block/${block.registryName!!.path}")).renderType("cutout_mipped") + } + } + } + + fun cubeallFramed(vararg blocks: Block) { + for (block in blocks) { + exec { + //cubeAll(block.registryName!!.path, modLocation("block/${block.registryName!!.path}")).renderType("cutout_mipped") + withExistingParent(block.registryName!!.path, modLocation("block/frame_block")).renderType("cutout_mipped") + } + } + } + fun decorativeGlassAll(blocks: Collection) { for (block in blocks) { exec { @@ -58,6 +75,14 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve } } + fun decorativeCubeAllCutout(vararg blocks: Block) { + for (block in blocks) { + exec { + cubeAll(block.registryName!!.path, modLocation("block/decorative/${block.registryName!!.path}")).renderType("cutout_mipped") + } + } + } + fun decorativeCubeAll(subdir: String, vararg blocks: Block) { for (block in blocks) { exec { diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/frame_block.json b/src/main/resources/assets/overdrive_that_matters/models/block/frame_block.json new file mode 100644 index 000000000..d207d3e77 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/block/frame_block.json @@ -0,0 +1,32 @@ +{ + "textures": { + "particle": "#texture", + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#texture"} + } + }, + { + "from": [15.999, 15.999, 15.999], + "to": [0.001, 0.001, 0.001], + "rotation": {"angle": 0, "axis": "y", "origin": [16, 16, 16]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#texture"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#texture"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/metal_mesh.json b/src/main/resources/assets/overdrive_that_matters/models/block/metal_mesh.json deleted file mode 100644 index b18a8d695..000000000 --- a/src/main/resources/assets/overdrive_that_matters/models/block/metal_mesh.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "parent": "minecraft:block/cube_all", - "render_type": "cutout", - "textures": { - "all": "overdrive_that_matters:block/decorative/metal_mesh" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/textures/block/heavy_modular_frame.png b/src/main/resources/assets/overdrive_that_matters/textures/block/heavy_modular_frame.png index fbfa9954f..b9f799747 100644 Binary files a/src/main/resources/assets/overdrive_that_matters/textures/block/heavy_modular_frame.png and b/src/main/resources/assets/overdrive_that_matters/textures/block/heavy_modular_frame.png differ