Fix trapdoor side textures and orientations

Previously, opening a trapdoor caused the side textures to flip.

Fix the incorrect textures.
Also add a texture transform to a tile of the open trapdoor, such
that the closed trapdoor sides use the lower part of the texture
and the open trapdoor sides use the higher part.

Clean up some codestyle issues.
master
Paramat 2019-05-03 23:49:07 +01:00 committed by GitHub
parent 646e3f7eef
commit b2835df6b0
4 changed files with 19 additions and 10 deletions

View File

@ -40,8 +40,10 @@ Following textures created by PenguinDad (CC BY-SA 4.0):
Following textures created by sofar (CC-BY-SA-3.0):
doors_trapdoor_steel.png
doors_trapdoor_steel_side.png
Following textures created by paramat (CC-BY-SA-3.0):
door_trapdoor_side.png
doors_trapdoor_steel_side.png
Obsidian door textures by red-001 based on textures by Pilzadam and BlockMen (CC BY-SA 3.0):
door_obsidian_glass.png

View File

@ -642,10 +642,14 @@ function doors.register_trapdoor(name, def)
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -6/16, 0.5}
}
def_closed.tiles = {def.tile_front,
def.tile_front .. '^[transformFY',
def.tile_side, def.tile_side,
def.tile_side, def.tile_side}
def_closed.tiles = {
def.tile_front,
def.tile_front .. '^[transformFY',
def.tile_side,
def.tile_side,
def.tile_side,
def.tile_side
}
def_opened.node_box = {
type = "fixed",
@ -655,11 +659,14 @@ function doors.register_trapdoor(name, def)
type = "fixed",
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}
}
def_opened.tiles = {def.tile_side, def.tile_side,
def.tile_side .. '^[transform3',
def.tile_side .. '^[transform1',
def.tile_front .. '^[transform46',
def.tile_front .. '^[transform6'}
def_opened.tiles = {
def.tile_side,
def.tile_side .. '^[transform2',
def.tile_side .. '^[transform3',
def.tile_side .. '^[transform1',
def.tile_front .. '^[transform46',
def.tile_front .. '^[transform6'
}
def_opened.drop = name_closed
def_opened.groups.not_in_creative_inventory = 1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 B

After

Width:  |  Height:  |  Size: 98 B