From 73145ed111dbeb78a4997b1e46279b7433ffb569 Mon Sep 17 00:00:00 2001 From: quat1024 Date: Tue, 11 Jul 2023 03:11:22 -0400 Subject: [PATCH] way more effort than this fuckin trapdoor model deserves --- .../cottonmc/templates/TemplatesClient.java | 2 +- .../templates/models/block/trapdoor_open.json | 51 +++++++++++++++++++ .../minecraft/tags/blocks/mineable/axe.json | 18 +++++++ .../tags/blocks/wooden_trapdoors.json | 6 +++ 4 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/assets/templates/models/block/trapdoor_open.json create mode 100644 src/main/resources/data/minecraft/tags/blocks/mineable/axe.json create mode 100644 src/main/resources/data/minecraft/tags/blocks/wooden_trapdoors.json diff --git a/src/main/java/io/github/cottonmc/templates/TemplatesClient.java b/src/main/java/io/github/cottonmc/templates/TemplatesClient.java index 34d6d6b..6c2e55b 100644 --- a/src/main/java/io/github/cottonmc/templates/TemplatesClient.java +++ b/src/main/java/io/github/cottonmc/templates/TemplatesClient.java @@ -86,7 +86,6 @@ public class TemplatesClient implements ClientModInitializer { provider.addTemplateModel(Templates.id("inner_stairs_special"), new UnbakedAutoRetexturedModel(new Identifier("block/inner_stairs"))); provider.addTemplateModel(Templates.id("outer_stairs_special"), new UnbakedAutoRetexturedModel(new Identifier("block/outer_stairs"))); provider.addTemplateModel(Templates.id("trapdoor_bottom_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_trapdoor_bottom"))); - provider.addTemplateModel(Templates.id("trapdoor_open_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_trapdoor_open"))); provider.addTemplateModel(Templates.id("trapdoor_top_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_trapdoor_top"))); provider.addTemplateModel(Templates.id("wall_post_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_wall_post"))); provider.addTemplateModel(Templates.id("wall_side_special"), new UnbakedAutoRetexturedModel(new Identifier("block/template_wall_side"))); @@ -94,6 +93,7 @@ public class TemplatesClient implements ClientModInitializer { //vanilla style models (using "special-sprite replacement" method) provider.addTemplateModel(Templates.id("lever_special"), new UnbakedJsonRetexturedModel(Templates.id("block/lever"))); + provider.addTemplateModel(Templates.id("trapdoor_open_special"), new UnbakedJsonRetexturedModel(Templates.id("block/trapdoor_open"))); provider.addTemplateModel(Templates.id("lever_on_special"), new UnbakedJsonRetexturedModel(Templates.id("block/lever_on"))); //mesh models diff --git a/src/main/resources/assets/templates/models/block/trapdoor_open.json b/src/main/resources/assets/templates/models/block/trapdoor_open.json new file mode 100644 index 0000000..8c4fb31 --- /dev/null +++ b/src/main/resources/assets/templates/models/block/trapdoor_open.json @@ -0,0 +1,51 @@ +{ + "parent": "block/block", + "textures": { + "down": "templates:templates_special/down", + "up": "templates:templates_special/up", + "north": "templates:templates_special/north", + "south": "templates:templates_special/south", + "west": "templates:templates_special/west", + "east": "templates:templates_special/east" + }, + "elements": [ + { + "from": [0, 0, 13], + "to": [16, 16, 16], + "faces": { + "down": { + "uv": [0, 16, 16, 13], + "texture": "#north", + "cullface": "down", + "rotation": 180 + }, + "up": { + "uv": [0, 16, 16, 13], + "texture": "#south", + "cullface": "up" + }, + "north": { + "uv": [0, 0, 16, 16], + "texture": "#down" + }, + "south": { + "uv": [0, 0, 16, 16], + "texture": "#up", + "cullface": "south" + }, + "west": { + "uv": [0, 16, 16, 13], + "texture": "#west", + "cullface": "west", + "rotation": 270 + }, + "east": { + "uv": [0, 16, 16, 13], + "texture": "#east", + "cullface": "east", + "rotation": 90 + } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json new file mode 100644 index 0000000..c88eb91 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -0,0 +1,18 @@ +{ + "replace": false, + "values": [ + "templates:button", + "templates:candle", + "templates:carpet", + "templates:cube", + "templates:fence", + "templates:fence_gate", + "templates:pane", + "templates:post", + "templates:slab", + "templates:slope", + "templates:stairs", + "templates:trapdoor", + "templates:wall" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/minecraft/tags/blocks/wooden_trapdoors.json b/src/main/resources/data/minecraft/tags/blocks/wooden_trapdoors.json new file mode 100644 index 0000000..d040e92 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/blocks/wooden_trapdoors.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "templates:trapdoor" + ] +} \ No newline at end of file