Skip to content

Commit

Permalink
fixed trap door render
Browse files Browse the repository at this point in the history
  • Loading branch information
baguchan committed Jul 23, 2022
1 parent 9731d56 commit 36e296f
Show file tree
Hide file tree
Showing 25 changed files with 60 additions and 48 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.19 2022-07-23T15:19:24.9047811 TofuCraftReload blockstates and block models
// 1.19 2022-07-23T22:21:15.6749975 TofuCraftReload blockstates and block models
b9743b4d9c39871589a2170799bd9215025634e2 assets/tofucraft/blockstates/antenna_basic.json
c9d84981f89ce9f145b28ea484564125b6879a8f assets/tofucraft/blockstates/blockleek.json
8fa7fb7b02f0ab80a292053f713e914e5fae7d52 assets/tofucraft/blockstates/blocktofudiamond.json
Expand Down Expand Up @@ -267,24 +267,24 @@ e9cf22b38a8618eec54a6bb12871757ca19ce683 assets/tofucraft/models/block/tofustem.
b24f9d6296ef8c765e2a1297fb83ea03ec4c52e4 assets/tofucraft/models/block/tofutorch_kinu.json
ed7ff5c5f2274d19a60676f1da5e83af8fd77c52 assets/tofucraft/models/block/tofutorch_metal.json
17eeb4a400dd051280fdeb385018e7d8f05754e6 assets/tofucraft/models/block/tofutorch_momen.json
868b1467bd6b109fb666a288abfd8c738aa92714 assets/tofucraft/models/block/tofutrapdoor_hell_bottom.json
f8539c7226ccce5dfdfaf6d058c9112ca3a5786d assets/tofucraft/models/block/tofutrapdoor_hell_open.json
0e7a4d995a7bd245ad36818f6ba663d9bb91f1f5 assets/tofucraft/models/block/tofutrapdoor_hell_top.json
ecc43e70e6774b7c530602d0f5940823a849f05a assets/tofucraft/models/block/tofutrapdoor_ishi_bottom.json
79811c6712446cc0b2bc1aba849140bffe91594c assets/tofucraft/models/block/tofutrapdoor_ishi_open.json
66ad31a24b32e2ee38ee7c64dc4f77615abae407 assets/tofucraft/models/block/tofutrapdoor_ishi_top.json
98643e776ffcb0176ea463aa7f9e4d8e98e01169 assets/tofucraft/models/block/tofutrapdoor_kinu_bottom.json
75091be45b463301fb64e9da1f248446fd548995 assets/tofucraft/models/block/tofutrapdoor_kinu_open.json
6b5dcdc6b920043537614710a34d1286bddadb35 assets/tofucraft/models/block/tofutrapdoor_kinu_top.json
1cbbd899376ca5654b30235b3bf46e79b85a14d9 assets/tofucraft/models/block/tofutrapdoor_metal_bottom.json
5dd3792e3e15ef3f9b97c9f5488f61ae32ee323d assets/tofucraft/models/block/tofutrapdoor_metal_open.json
0443f42082f5b70d3d7a7bef344fe14645acee83 assets/tofucraft/models/block/tofutrapdoor_metal_top.json
04e5835ba3347caa07b10f6270b0b77e6ac8fe76 assets/tofucraft/models/block/tofutrapdoor_momen_bottom.json
66f99ed7472a49ce06a4ac980db403681f3d1b93 assets/tofucraft/models/block/tofutrapdoor_momen_open.json
cdd6907ed46aeedc18aa1d04abb9c356ca67da39 assets/tofucraft/models/block/tofutrapdoor_momen_top.json
ff70cd292474d5748e0d089b98a83720c09ae15b assets/tofucraft/models/block/tofutrapdoor_soul_bottom.json
320990a513834dbcf450c53ee5d18cfe6d20f7aa assets/tofucraft/models/block/tofutrapdoor_soul_open.json
d5069bdd75bc9e423fc76603e90c94f082a4e928 assets/tofucraft/models/block/tofutrapdoor_soul_top.json
8c1d940d579a2335fb4ca50515c85c9aa5367719 assets/tofucraft/models/block/tofutrapdoor_hell_bottom.json
f74b4efb1f0fc195d9c3c3f98806749ff03c539c assets/tofucraft/models/block/tofutrapdoor_hell_open.json
f3b03996ef17cbe4af29944fc90ab58878ebea6b assets/tofucraft/models/block/tofutrapdoor_hell_top.json
49b146a5e7ea8a189dd47891ef51b06c898eac74 assets/tofucraft/models/block/tofutrapdoor_ishi_bottom.json
1e5e9fb6b35e977be0594ceed2e604a212476e3b assets/tofucraft/models/block/tofutrapdoor_ishi_open.json
4f1bd25cc194d81e0058b5c0537e010c9667945e assets/tofucraft/models/block/tofutrapdoor_ishi_top.json
eacdb16c45aa0837fff53c670b89c391d95e4e89 assets/tofucraft/models/block/tofutrapdoor_kinu_bottom.json
3414cddb18ddf07949ea498360e86a622824aeb6 assets/tofucraft/models/block/tofutrapdoor_kinu_open.json
59e51d61a91e82660a100a2f8da73bfb6175a75a assets/tofucraft/models/block/tofutrapdoor_kinu_top.json
c6194a3b80459185c1637f9b1134dcd39c30a7be assets/tofucraft/models/block/tofutrapdoor_metal_bottom.json
30a024617e21caa504375a9b86d890ad80521941 assets/tofucraft/models/block/tofutrapdoor_metal_open.json
c527d158a6309e8282005c71dcc235b0a0ec44c1 assets/tofucraft/models/block/tofutrapdoor_metal_top.json
f36d9560e2019013025d52cf9b0d9e90a6854cf3 assets/tofucraft/models/block/tofutrapdoor_momen_bottom.json
3d771ab97dca188aeecde2cdbc8da0f343b16c0d assets/tofucraft/models/block/tofutrapdoor_momen_open.json
3ddd697331cdabdcd4fed74359581bc9abb089aa assets/tofucraft/models/block/tofutrapdoor_momen_top.json
99b774cc612e49e83310a0c2c9e23f0a83d65af8 assets/tofucraft/models/block/tofutrapdoor_soul_bottom.json
96893f6a30641cb7f14ca21ad343fc3fe9f9c02d assets/tofucraft/models/block/tofutrapdoor_soul_open.json
4f62d8cb49752ed126b53a8fae0c2a3b9d150116 assets/tofucraft/models/block/tofutrapdoor_soul_top.json
8c20263b67df8ddf484531f7af20eeb833ee4c4b assets/tofucraft/models/block/tofu_bedrock.json
51dbd88df28048d44b0f102d259df88c837fadd9 assets/tofucraft/models/block/tofu_terrain.json
051a28d5fb809924e20b3055a8087f5243c7299d assets/tofucraft/models/block/walltofutorch_ishi.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_bottom",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_hell"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_open",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_hell"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_top",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_hell"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_bottom",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_ishi"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_open",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_ishi"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_top",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_ishi"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_bottom",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_kinu"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_open",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_kinu"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_top",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_kinu"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_bottom",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_metal"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_open",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_metal"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_top",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_metal"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_bottom",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_momen"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_open",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_momen"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_top",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_momen"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_bottom",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_soul"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_open",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_soul"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"parent": "minecraft:block/template_orientable_trapdoor_top",
"render_type": "minecraft:cutout",
"textures": {
"texture": "tofucraft:block/tofutrapdoor_soul"
}
Expand Down
12 changes: 4 additions & 8 deletions src/main/java/baguchan/tofucraft/data/BlockstateGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,7 @@ public void wall(Supplier<? extends WallBlock> wall, Supplier<? extends Block> f
}

public void trapdoor(Supplier<? extends TrapDoorBlock> block) {
trapdoorBlock(block.get(), texture(name(block.get())), true);
}

public void trapdoor(Supplier<? extends TrapDoorBlock> block, String name) {
trapdoorBlock(block.get(), texture(name + "_trapdoor"), true);
trapdoor(block.get(), texture(name(block.get())), true);
}

public void trapdoor(TrapDoorBlock block, ResourceLocation texture, boolean orientable) {
Expand All @@ -302,9 +298,9 @@ public void trapdoor(TrapDoorBlock block, ResourceLocation texture, boolean orie


private void trapdoorBlockInternal(TrapDoorBlock block, String baseName, ResourceLocation texture, boolean orientable) {
ModelFile bottom = orientable ? models().trapdoorOrientableBottom(baseName + "_bottom", texture) : models().trapdoorBottom(baseName + "_bottom", texture).renderType("minecraft:cutout");
ModelFile top = orientable ? models().trapdoorOrientableTop(baseName + "_top", texture) : models().trapdoorTop(baseName + "_top", texture).renderType("minecraft:cutout");
ModelFile open = orientable ? models().trapdoorOrientableOpen(baseName + "_open", texture) : models().trapdoorOpen(baseName + "_open", texture).renderType("minecraft:cutout");
ModelFile bottom = orientable ? models().trapdoorOrientableBottom(baseName + "_bottom", texture).renderType("minecraft:cutout") : models().trapdoorBottom(baseName + "_bottom", texture).renderType("minecraft:cutout");
ModelFile top = orientable ? models().trapdoorOrientableTop(baseName + "_top", texture).renderType("minecraft:cutout") : models().trapdoorTop(baseName + "_top", texture).renderType("minecraft:cutout");
ModelFile open = orientable ? models().trapdoorOrientableOpen(baseName + "_open", texture).renderType("minecraft:cutout") : models().trapdoorOpen(baseName + "_open", texture).renderType("minecraft:cutout");
trapdoorBlock(block, bottom, top, open, orientable);
}

Expand Down

0 comments on commit 36e296f

Please sign in to comment.