Skip to content

Commit

Permalink
Fixed trapdoor rendering problems - they now render correctly both in…
Browse files Browse the repository at this point in the history
… inventory (item model) and as a block (blockstate)
  • Loading branch information
alcatrazEscapee committed Dec 12, 2018
1 parent 07e0142 commit 9881e20
Show file tree
Hide file tree
Showing 39 changed files with 64 additions and 40 deletions.
9 changes: 7 additions & 2 deletions generateResources.py
Expand Up @@ -13,6 +13,7 @@
import time
import zipfile


def zipfolder(zip_name, target_dir):
zipobj = zipfile.ZipFile(zip_name, 'w', zipfile.ZIP_DEFLATED)
rootlen = len(target_dir) + 1
Expand Down Expand Up @@ -730,9 +731,10 @@ def item(filename_parts, *layers, parent='item/generated'):
})
cube_all(('slab', 'full', 'wood', wood_type), 'tfc:blocks/wood/planks/%s' % wood_type)

# TRAPDOORS
# (WOOD) TRAPDOORS
blockstate(('wood', 'trapdoor', wood_type), None, textures={
'texture': 'tfc:blocks/wood/trapdoor/%s' % wood_type,
'all': 'tfc:blocks/wood/trapdoor/%s' % wood_type,
}, variants=TRAPDOOR_VARIANTS)

# CHESTS
Expand Down Expand Up @@ -805,7 +807,10 @@ def item(filename_parts, *layers, parent='item/generated'):
for wood_type in WOOD_TYPES:
item(('wood', 'log', wood_type), 'tfc:items/wood/log/%s' % wood_type)
item(('wood', 'door', wood_type), 'tfc:items/wood/door/%s' % wood_type)
item(('wood', 'trapdoor', wood_type), 'tfc:blocks/wood/trapdoor/%s' % wood_type, parent='block/trapdoor_bottom')

# Trapdoors are special - their item model needs to reference the blockstate #texture
model(('item', 'wood', 'trapdoor', wood_type), 'block/trapdoor_bottom',
{'texture': 'tfc:blocks/wood/trapdoor/%s' % wood_type})

# GEMS
for gem in GEM_TYPES:
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/acacia"
"texture": "tfc:blocks/wood/trapdoor/acacia",
"all": "tfc:blocks/wood/trapdoor/acacia"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/ash"
"texture": "tfc:blocks/wood/trapdoor/ash",
"all": "tfc:blocks/wood/trapdoor/ash"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/aspen"
"texture": "tfc:blocks/wood/trapdoor/aspen",
"all": "tfc:blocks/wood/trapdoor/aspen"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/birch"
"texture": "tfc:blocks/wood/trapdoor/birch",
"all": "tfc:blocks/wood/trapdoor/birch"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/blackwood"
"texture": "tfc:blocks/wood/trapdoor/blackwood",
"all": "tfc:blocks/wood/trapdoor/blackwood"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/chestnut"
"texture": "tfc:blocks/wood/trapdoor/chestnut",
"all": "tfc:blocks/wood/trapdoor/chestnut"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/douglas_fir"
"texture": "tfc:blocks/wood/trapdoor/douglas_fir",
"all": "tfc:blocks/wood/trapdoor/douglas_fir"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/hickory"
"texture": "tfc:blocks/wood/trapdoor/hickory",
"all": "tfc:blocks/wood/trapdoor/hickory"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/kapok"
"texture": "tfc:blocks/wood/trapdoor/kapok",
"all": "tfc:blocks/wood/trapdoor/kapok"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/maple"
"texture": "tfc:blocks/wood/trapdoor/maple",
"all": "tfc:blocks/wood/trapdoor/maple"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/oak"
"texture": "tfc:blocks/wood/trapdoor/oak",
"all": "tfc:blocks/wood/trapdoor/oak"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/palm"
"texture": "tfc:blocks/wood/trapdoor/palm",
"all": "tfc:blocks/wood/trapdoor/palm"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/pine"
"texture": "tfc:blocks/wood/trapdoor/pine",
"all": "tfc:blocks/wood/trapdoor/pine"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/rosewood"
"texture": "tfc:blocks/wood/trapdoor/rosewood",
"all": "tfc:blocks/wood/trapdoor/rosewood"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/sequoia"
"texture": "tfc:blocks/wood/trapdoor/sequoia",
"all": "tfc:blocks/wood/trapdoor/sequoia"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/spruce"
"texture": "tfc:blocks/wood/trapdoor/spruce",
"all": "tfc:blocks/wood/trapdoor/spruce"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/sycamore"
"texture": "tfc:blocks/wood/trapdoor/sycamore",
"all": "tfc:blocks/wood/trapdoor/sycamore"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/white_cedar"
"texture": "tfc:blocks/wood/trapdoor/white_cedar",
"all": "tfc:blocks/wood/trapdoor/white_cedar"
}
},
"variants": {
Expand Down
Expand Up @@ -3,7 +3,8 @@
"forge_marker": 1,
"defaults": {
"textures": {
"texture": "tfc:blocks/wood/trapdoor/willow"
"texture": "tfc:blocks/wood/trapdoor/willow",
"all": "tfc:blocks/wood/trapdoor/willow"
}
},
"variants": {
Expand Down
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/acacia"
"texture": "tfc:blocks/wood/trapdoor/acacia"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/ash"
"texture": "tfc:blocks/wood/trapdoor/ash"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/aspen"
"texture": "tfc:blocks/wood/trapdoor/aspen"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/birch"
"texture": "tfc:blocks/wood/trapdoor/birch"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/blackwood"
"texture": "tfc:blocks/wood/trapdoor/blackwood"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/chestnut"
"texture": "tfc:blocks/wood/trapdoor/chestnut"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/douglas_fir"
"texture": "tfc:blocks/wood/trapdoor/douglas_fir"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/hickory"
"texture": "tfc:blocks/wood/trapdoor/hickory"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/kapok"
"texture": "tfc:blocks/wood/trapdoor/kapok"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/maple"
"texture": "tfc:blocks/wood/trapdoor/maple"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/oak"
"texture": "tfc:blocks/wood/trapdoor/oak"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/palm"
"texture": "tfc:blocks/wood/trapdoor/palm"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/pine"
"texture": "tfc:blocks/wood/trapdoor/pine"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/rosewood"
"texture": "tfc:blocks/wood/trapdoor/rosewood"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/sequoia"
"texture": "tfc:blocks/wood/trapdoor/sequoia"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/spruce"
"texture": "tfc:blocks/wood/trapdoor/spruce"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/sycamore"
"texture": "tfc:blocks/wood/trapdoor/sycamore"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/white_cedar"
"texture": "tfc:blocks/wood/trapdoor/white_cedar"
}
}
Expand Up @@ -2,6 +2,6 @@
"__comment": "Generated by generateResources.py function: model",
"parent": "block/trapdoor_bottom",
"textures": {
"layer0": "tfc:blocks/wood/trapdoor/willow"
"texture": "tfc:blocks/wood/trapdoor/willow"
}
}

0 comments on commit 9881e20

Please sign in to comment.