From b5e2b24dd54a98066abbda143454ff9d5d41036c Mon Sep 17 00:00:00 2001 From: GearShocky Date: Thu, 27 Feb 2025 15:53:59 +0500 Subject: [PATCH] Good morning --- .../mc/otm/datagen/blocks/BlockModels.kt | 5 ++- .../datagen/models/MatteryModelProvider.kt | 11 +++---- .../models/block/frame_block.json | 31 ++++++++++--------- 3 files changed, 23 insertions(+), 24 deletions(-) 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 2bf209a12..bbf8da1e4 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 @@ -26,9 +26,8 @@ fun addBlockModels(provider: MatteryBlockModelProvider) { orientable(MBlocks.FLYWHEEL_BATTERY,"block/flywheel_housing","block/flywheel_controller") column(MBlocks.GENERATOR_BLOCK, "block/generator_block","block/generator_block_top") - - cubeAllCutout(MBlocks.MODULAR_FRAME) - cubeAllCutout(MBlocks.HEAVY_MODULAR_FRAME) + cubeAllFramed("modular_frame", "block/modular_frame") + cubeAllFramed("heavy_modular_frame", "block/heavy_modular_frame") cubeAll(MBlocks.ENERGY_INPUT_INTERFACE) cubeAll(MBlocks.ENERGY_OUTPUT_INTERFACE) 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 773bad392..29d81d18d 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 @@ -42,12 +42,11 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve } } - 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 cubeAllFramed(modelName: String, textureName: String) { + exec { + withExistingParent(modelName, modLocation("block/frame_block")) + .texture("texture", textureName) + .renderType("cutout_mipped") } } 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 index d207d3e77..bb93e21d1 100644 --- 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 @@ -1,31 +1,32 @@ { + "parent": "block/block", "textures": { - "particle": "#texture", + "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"} + "north": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "north"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "east"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "south"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "west"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "up"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "down"} } }, { - "from": [15.999, 15.999, 15.999], - "to": [0.001, 0.001, 0.001], + "from": [15.9994, 15.9994, 15.9994], + "to": [0.0004, 0.0004, 0.0004], "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"} + "north": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "south"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "west"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "north"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "east"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "down"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#texture", "cullface": "up"} } } ]