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 a6b3eb704..4477a69a8 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 @@ -14,6 +14,7 @@ fun addBlockModels(provider: MatteryBlockModelProvider) { cable("regular_energy_cable", "block/power_cable_1") cable("advanced_energy_cable", "block/power_cable_2") cable("superconductor_energy_cable", "block/power_cable_3") + cable("matter_cable", "block/matter_cable", thin = true) cable("storage_cable", "block/storage_cable") colored(MBlocks.COBBLESTONE_GENERATOR, listOf("0", "particle")) 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 fb3880106..d84a54679 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 @@ -143,15 +143,17 @@ class MatteryBlockModelProvider(event: GatherDataEvent) : BlockModelProvider(eve } } - fun cable(modelName: String, textureName: String) { + fun cable(modelName: String, textureName: String, thin: Boolean = false) { + val baseName = if (thin) "base_cable_thin" else "base_cable" + exec { - withExistingParent("block/${modelName}_core", modLocation("block/base_cable_core")) + withExistingParent("block/${modelName}_core", modLocation("block/${baseName}_core")) .texture("0", textureName) - withExistingParent("block/${modelName}_connection", modLocation("block/base_cable_connection")) + withExistingParent("block/${modelName}_connection", modLocation("block/${baseName}_connection")) .texture("0", textureName) - withExistingParent("item/${modelName}", modLocation("item/base_cable")) + withExistingParent("item/${modelName}", modLocation("item/${baseName}")) .texture("0", textureName) } } diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/base_cable_thin_connection.json b/src/main/resources/assets/overdrive_that_matters/models/block/base_cable_thin_connection.json new file mode 100644 index 000000000..5b9c0fcd8 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/block/base_cable_thin_connection.json @@ -0,0 +1,19 @@ +{ + "parent": "block/block", + "texture_size": [16, 16], + "textures": { + "particle": "#0" + }, + "elements": [ + { + "from": [ 6, 6, 10 ], + "to": [ 10, 10, 16 ], + "faces": { + "east": {"uv": [10, 0, 16, 4], "texture": "#0"}, + "west": {"uv": [ 4, 0, 10, 4], "texture": "#0"}, + "up": {"uv": [ 4, 0, 10, 4], "rotation": 90, "texture": "#0"}, + "down": {"uv": [10, 0, 16, 4], "rotation": 90, "texture": "#0"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/base_cable_thin_core.json b/src/main/resources/assets/overdrive_that_matters/models/block/base_cable_thin_core.json new file mode 100644 index 000000000..68f3a5df5 --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/block/base_cable_thin_core.json @@ -0,0 +1,21 @@ +{ + "parent": "block/block", + "texture_size": [16, 16], + "textures": { + "particle": "#0" + }, + "elements": [ + { + "from": [ 6, 6, 6 ], + "to": [ 10, 10, 10 ], + "faces": { + "down": {"uv": [0, 0, 4, 4], "texture": "#0" }, + "up": {"uv": [0, 0, 4, 4], "texture": "#0" }, + "north": {"uv": [0, 0, 4, 4], "texture": "#0" }, + "south": {"uv": [0, 0, 4, 4], "texture": "#0" }, + "west": {"uv": [0, 0, 4, 4], "texture": "#0" }, + "east": {"uv": [0, 0, 4, 4], "texture": "#0" } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/matter_cable_connection.json b/src/main/resources/assets/overdrive_that_matters/models/block/matter_cable_connection.json deleted file mode 100644 index d849e1099..000000000 --- a/src/main/resources/assets/overdrive_that_matters/models/block/matter_cable_connection.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parent": "block/block", - "texture_size": [16, 16], - "textures": { - "connection": "overdrive_that_matters:block/matter_cable", - "particle": "overdrive_that_matters:block/matter_cable" - }, - "elements": [ - { - "from": [ 6, 6, 10 ], - "to": [ 10, 10, 16 ], - "faces": { - "down": {"uv": [4, 0, 16, 4],"rotation": 90, "texture": "#connection" }, - "up": {"uv": [4, 0, 16, 4],"rotation": 90, "texture": "#connection" }, - "west": {"uv": [4, 0, 16, 4], "texture": "#connection" }, - "east": {"uv": [4, 0, 16, 4], "texture": "#connection" } - } - } - ] -} diff --git a/src/main/resources/assets/overdrive_that_matters/models/block/matter_cable_core.json b/src/main/resources/assets/overdrive_that_matters/models/block/matter_cable_core.json deleted file mode 100644 index f030991d3..000000000 --- a/src/main/resources/assets/overdrive_that_matters/models/block/matter_cable_core.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "parent": "block/block", - "texture_size": [16, 16], - "textures": { - "core": "overdrive_that_matters:block/matter_cable", - "particle": "overdrive_that_matters:block/matter_cable" - }, - "elements": [ - { - "from": [ 6, 6, 6 ], - "to": [ 10, 10, 10 ], - "faces": { - "down": {"uv": [0, 0, 4, 4], "texture": "#core" }, - "up": {"uv": [0, 0, 4, 4], "texture": "#core" }, - "north": {"uv": [0, 0, 4, 4], "texture": "#core" }, - "south": {"uv": [0, 0, 4, 4], "texture": "#core" }, - "west": {"uv": [0, 0, 4, 4], "texture": "#core" }, - "east": {"uv": [0, 0, 4, 4], "texture": "#core" } - } - } - ] -} diff --git a/src/main/resources/assets/overdrive_that_matters/models/item/base_cable_thin.json b/src/main/resources/assets/overdrive_that_matters/models/item/base_cable_thin.json new file mode 100644 index 000000000..f78991b2d --- /dev/null +++ b/src/main/resources/assets/overdrive_that_matters/models/item/base_cable_thin.json @@ -0,0 +1,49 @@ +{ + "parent": "block/block", + "texture_size": [16, 16], + "textures": { + "particle": "#0" + }, + "elements": [ + { + "from": [6, 6, 6], + "to": [10, 10, 10], + "faces": { + "north": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "up": {"uv": [0, 0, 4, 4], "rotation": 180, "texture": "#0"}, + "down": {"uv": [0, 0, 4, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [0, 6, 6], + "to": [6, 10, 10], + "faces": { + "north": {"uv": [4, 0, 10, 4], "texture": "#0"}, + "south": {"uv": [4, 4, 10, 0], "rotation": 180, "texture": "#0"}, + "west": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "up": {"uv": [4, 0, 10, 4], "rotation": 180, "texture": "#0"}, + "down": {"uv": [4, 0, 10, 4], "rotation": 180, "texture": "#0"} + } + }, + { + "from": [10, 6, 6], + "to": [16, 10, 10], + "faces": { + "north": {"uv": [10, 0, 16, 4], "texture": "#0"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#0"}, + "south": {"uv": [10, 4, 16, 0], "rotation": 180, "texture": "#0"}, + "up": {"uv": [10, 0, 16, 4], "rotation": 180, "texture": "#0"}, + "down": {"uv": [10, 0, 16, 4], "rotation": 180, "texture": "#0"} + } + } + ], + "gui_light": "front", + "display": { + "gui": { + "rotation": [0, 0, 0], + "translation": [0, 0, 0], + "scale": [1, 1, 1] + } + } +} \ No newline at end of file