Skip to content
Browse files

Fix Rotate Node Placement (#6424)

This properly checks for creative mode or privilege when using fixed rotate_node() function.
  • Loading branch information
tenplus1 authored and SmallJoker committed Sep 16, 2017
1 parent 45e9f80 commit 5b6d4482eeee1925331d6ec122dd10cdc1aa7a30
Showing with 6 additions and 2 deletions.
  1. +6 −2 builtin/common/misc_helpers.lua
@@ -425,11 +425,15 @@ if INIT == "game" then
--Wrapper for rotate_and_place() to check for sneak and assume Creative mode
--implies infinite stacks when performing a 6d rotation.

local creative_mode_cache = core.settings:get_bool("creative_mode")
local function is_creative(name)
return creative_mode_cache or
core.check_player_privs(name, {creative = true})

core.rotate_node = function(itemstack, placer, pointed_thing)
core.rotate_and_place(itemstack, placer, pointed_thing,
{invert_wall = placer:get_player_control().sneak})
return itemstack

0 comments on commit 5b6d448

Please sign in to comment.