Skip to content

Commit 9878e8d

Browse files
dvereZeno-
authored andcommittedNov 25, 2014
Adjust the values of dirs1 and dirs2 so that rotate_and_place orients textures correctly
According to doc/lua_api.txt if paramtype2 == "facedir" the two least significant bits of parm2 orient the texture around the axis. For dirs1 (looking at a wall) these would be 0, 1, 2, 3 and for dirs2 (looking at the ceiling) 2, 1, 0, 3
1 parent a1db83e commit 9878e8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎builtin/common/misc_helpers.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -340,8 +340,8 @@ end
340340
--------------------------------------------------------------------------------
341341

342342
if INIT == "game" then
343-
local dirs1 = {9, 18, 7, 12}
344-
local dirs2 = {20, 23, 22, 21}
343+
local dirs1 = {8, 17, 6, 15}
344+
local dirs2 = {22, 21, 20, 23}
345345

346346
function core.rotate_and_place(itemstack, placer, pointed_thing,
347347
infinitestacks, orient_flags)

1 commit comments

Comments
 (1)

Megaf commented on Dec 11, 2014

@Megaf
Contributor

This breaks nodes rotation. #1939

Please sign in to comment.