From a5d688883e358cbb1ed092fc0de81e45c3a12b02 Mon Sep 17 00:00:00 2001 From: Vincent Lee Date: Sat, 23 Jul 2016 15:31:18 -0500 Subject: [PATCH] Fix some walls being flipped, separate the models out --- .../client/core/handler/ModelHandler.java | 12 ++++-- .../botania/blockstates/dreamwood0Wall.json | 43 ++++++------------- .../botania/blockstates/livingrock0Wall.json | 43 ++++++------------- .../botania/blockstates/livingwood0Wall.json | 43 ++++++------------- .../models/block/dreamwood_wall_post.json | 6 +++ .../models/block/dreamwood_wall_side.json | 6 +++ .../models/block/livingrock_wall_post.json | 6 +++ .../models/block/livingrock_wall_side.json | 6 +++ .../models/block/livingwood_wall_post.json | 6 +++ .../models/block/livingwood_wall_side.json | 6 +++ .../botania/models/item/dreamwood_wall.json | 6 +++ .../botania/models/item/livingrock_wall.json | 6 +++ .../botania/models/item/livingwood_wall.json | 6 +++ 13 files changed, 105 insertions(+), 90 deletions(-) create mode 100644 src/main/resources/assets/botania/models/block/dreamwood_wall_post.json create mode 100644 src/main/resources/assets/botania/models/block/dreamwood_wall_side.json create mode 100644 src/main/resources/assets/botania/models/block/livingrock_wall_post.json create mode 100644 src/main/resources/assets/botania/models/block/livingrock_wall_side.json create mode 100644 src/main/resources/assets/botania/models/block/livingwood_wall_post.json create mode 100644 src/main/resources/assets/botania/models/block/livingwood_wall_side.json create mode 100644 src/main/resources/assets/botania/models/item/dreamwood_wall.json create mode 100644 src/main/resources/assets/botania/models/item/livingrock_wall.json create mode 100644 src/main/resources/assets/botania/models/item/livingwood_wall.json diff --git a/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java b/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java index 938ccbea4..77d47b9de 100644 --- a/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java +++ b/src/main/java/vazkii/botania/client/core/handler/ModelHandler.java @@ -811,9 +811,9 @@ public final class ModelHandler { ModelLoader.setCustomModelResourceLocation(item, variant.ordinal() - 8, new ModelResourceLocation("botania:biomeStoneA0Wall", variantName)); } - registerItemModel(ModFluffBlocks.livingrockWall); - registerItemModel(ModFluffBlocks.livingwoodWall); - registerItemModel(ModFluffBlocks.dreamwoodWall); + registerBlock(ModFluffBlocks.livingrockWall, "livingrock_wall"); + registerBlock(ModFluffBlocks.livingwoodWall, "livingwood_wall"); + registerBlock(ModFluffBlocks.dreamwoodWall, "dreamwood_wall"); } private static void registerPanes() { @@ -883,6 +883,12 @@ public final class ModelHandler { } } + private static void registerBlock(Block b, String name) { + ModelLoader.setCustomModelResourceLocation( + Item.getItemFromBlock(b), 0, + new ModelResourceLocation(LibMisc.MOD_ID + ":" + name, "inventory")); + } + private static void registerItemModel(Block b) { registerItemModel(Item.getItemFromBlock(b)); } diff --git a/src/main/resources/assets/botania/blockstates/dreamwood0Wall.json b/src/main/resources/assets/botania/blockstates/dreamwood0Wall.json index 7ba7ff648..f11b7c08a 100644 --- a/src/main/resources/assets/botania/blockstates/dreamwood0Wall.json +++ b/src/main/resources/assets/botania/blockstates/dreamwood0Wall.json @@ -1,34 +1,19 @@ { - "forge_marker": 1, - "defaults": { - "model": "botania:dummy", - "uvlock": true, - "transform": "forge:default-block", - "textures": { "particle": "#wall", "wall": "botania:blocks/dreamwood0" } - }, - "variants": { - "north": { - "true": { "submodel": "minecraft:wall_side" }, - "false": {} + "multipart": [ + { "when": { "up": "true" }, + "apply": { "model": "botania:dreamwood_wall_post" } }, - "south": { - "true": { "submodel": "minecraft:wall_side", "y": 180 }, - "false": {} + { "when": { "north": "true" }, + "apply": { "model": "botania:dreamwood_wall_side", "uvlock": true } }, - "west": { - "true": { "submodel": "minecraft:wall_side", "y": 270 }, - "false": {} + { "when": { "east": "true" }, + "apply": { "model": "botania:dreamwood_wall_side", "y": 90, "uvlock": true } }, - "east": { - "true": { "submodel": "minecraft:wall_side", "y": 90 }, - "false": {} + { "when": { "south": "true" }, + "apply": { "model": "botania:dreamwood_wall_side", "y": 180, "uvlock": true } }, - "up": { - "true": { "submodel": "minecraft:wall_post" }, - "false": {} - }, - "inventory": [{ - "model": "minecraft:wall_inventory" - }] - } -} \ No newline at end of file + { "when": { "west": "true" }, + "apply": { "model": "botania:dreamwood_wall_side", "y": 270, "uvlock": true } + } + ] +} diff --git a/src/main/resources/assets/botania/blockstates/livingrock0Wall.json b/src/main/resources/assets/botania/blockstates/livingrock0Wall.json index aa60e4087..ddc9bd49c 100644 --- a/src/main/resources/assets/botania/blockstates/livingrock0Wall.json +++ b/src/main/resources/assets/botania/blockstates/livingrock0Wall.json @@ -1,34 +1,19 @@ { - "forge_marker": 1, - "defaults": { - "model": "botania:dummy", - "uvlock": true, - "transform": "forge:default-block", - "textures": { "particle": "#wall", "wall": "botania:blocks/livingrock0" } - }, - "variants": { - "north": { - "true": { "submodel": "minecraft:wall_side" }, - "false": {} + "multipart": [ + { "when": { "up": "true" }, + "apply": { "model": "botania:livingrock_wall_post" } }, - "south": { - "true": { "submodel": "minecraft:wall_side", "y": 180 }, - "false": {} + { "when": { "north": "true" }, + "apply": { "model": "botania:livingrock_wall_side", "uvlock": true } }, - "west": { - "true": { "submodel": "minecraft:wall_side", "y": 270 }, - "false": {} + { "when": { "east": "true" }, + "apply": { "model": "botania:livingrock_wall_side", "y": 90, "uvlock": true } }, - "east": { - "true": { "submodel": "minecraft:wall_side", "y": 90 }, - "false": {} + { "when": { "south": "true" }, + "apply": { "model": "botania:livingrock_wall_side", "y": 180, "uvlock": true } }, - "up": { - "true": { "submodel": "minecraft:wall_post" }, - "false": {} - }, - "inventory": [{ - "model": "minecraft:wall_inventory" - }] - } -} \ No newline at end of file + { "when": { "west": "true" }, + "apply": { "model": "botania:livingrock_wall_side", "y": 270, "uvlock": true } + } + ] +} diff --git a/src/main/resources/assets/botania/blockstates/livingwood0Wall.json b/src/main/resources/assets/botania/blockstates/livingwood0Wall.json index 84cd1fa66..7a78863c4 100644 --- a/src/main/resources/assets/botania/blockstates/livingwood0Wall.json +++ b/src/main/resources/assets/botania/blockstates/livingwood0Wall.json @@ -1,34 +1,19 @@ { - "forge_marker": 1, - "defaults": { - "model": "botania:dummy", - "uvlock": true, - "transform": "forge:default-block", - "textures": { "particle": "#wall", "wall": "botania:blocks/livingwood0" } - }, - "variants": { - "north": { - "true": { "submodel": "minecraft:wall_side" }, - "false": {} + "multipart": [ + { "when": { "up": "true" }, + "apply": { "model": "botania:livingwood_wall_post" } }, - "south": { - "true": { "submodel": "minecraft:wall_side", "y": 180 }, - "false": {} + { "when": { "north": "true" }, + "apply": { "model": "botania:livingwood_wall_side", "uvlock": true } }, - "west": { - "true": { "submodel": "minecraft:wall_side", "y": 270 }, - "false": {} + { "when": { "east": "true" }, + "apply": { "model": "botania:livingwood_wall_side", "y": 90, "uvlock": true } }, - "east": { - "true": { "submodel": "minecraft:wall_side", "y": 90 }, - "false": {} + { "when": { "south": "true" }, + "apply": { "model": "botania:livingwood_wall_side", "y": 180, "uvlock": true } }, - "up": { - "true": { "submodel": "minecraft:wall_post" }, - "false": {} - }, - "inventory": [{ - "model": "minecraft:wall_inventory" - }] - } -} \ No newline at end of file + { "when": { "west": "true" }, + "apply": { "model": "botania:livingwood_wall_side", "y": 270, "uvlock": true } + } + ] +} diff --git a/src/main/resources/assets/botania/models/block/dreamwood_wall_post.json b/src/main/resources/assets/botania/models/block/dreamwood_wall_post.json new file mode 100644 index 000000000..451c92071 --- /dev/null +++ b/src/main/resources/assets/botania/models/block/dreamwood_wall_post.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_post", + "textures": { + "wall": "botania:blocks/dreamwood0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/block/dreamwood_wall_side.json b/src/main/resources/assets/botania/models/block/dreamwood_wall_side.json new file mode 100644 index 000000000..2f5e5ae88 --- /dev/null +++ b/src/main/resources/assets/botania/models/block/dreamwood_wall_side.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_side", + "textures": { + "wall": "botania:blocks/dreamwood0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/block/livingrock_wall_post.json b/src/main/resources/assets/botania/models/block/livingrock_wall_post.json new file mode 100644 index 000000000..ea11aa2fa --- /dev/null +++ b/src/main/resources/assets/botania/models/block/livingrock_wall_post.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_post", + "textures": { + "wall": "botania:blocks/livingrock0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/block/livingrock_wall_side.json b/src/main/resources/assets/botania/models/block/livingrock_wall_side.json new file mode 100644 index 000000000..7102bcfdf --- /dev/null +++ b/src/main/resources/assets/botania/models/block/livingrock_wall_side.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_side", + "textures": { + "wall": "botania:blocks/livingrock0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/block/livingwood_wall_post.json b/src/main/resources/assets/botania/models/block/livingwood_wall_post.json new file mode 100644 index 000000000..ff3d1f95c --- /dev/null +++ b/src/main/resources/assets/botania/models/block/livingwood_wall_post.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_post", + "textures": { + "wall": "botania:blocks/livingwood0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/block/livingwood_wall_side.json b/src/main/resources/assets/botania/models/block/livingwood_wall_side.json new file mode 100644 index 000000000..50761f621 --- /dev/null +++ b/src/main/resources/assets/botania/models/block/livingwood_wall_side.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_side", + "textures": { + "wall": "botania:blocks/livingwood0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/item/dreamwood_wall.json b/src/main/resources/assets/botania/models/item/dreamwood_wall.json new file mode 100644 index 000000000..0bcdda9a9 --- /dev/null +++ b/src/main/resources/assets/botania/models/item/dreamwood_wall.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_inventory", + "textures": { + "wall": "botania:blocks/dreamwood0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/item/livingrock_wall.json b/src/main/resources/assets/botania/models/item/livingrock_wall.json new file mode 100644 index 000000000..bc8157d2a --- /dev/null +++ b/src/main/resources/assets/botania/models/item/livingrock_wall.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_inventory", + "textures": { + "wall": "botania:blocks/livingrock0" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/botania/models/item/livingwood_wall.json b/src/main/resources/assets/botania/models/item/livingwood_wall.json new file mode 100644 index 000000000..8f6d35e18 --- /dev/null +++ b/src/main/resources/assets/botania/models/item/livingwood_wall.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/wall_inventory", + "textures": { + "wall": "botania:blocks/livingwood0" + } +} \ No newline at end of file