nodes affected by rotate_and_place (mainly *_tree) are now handled correctly in creative_enhanced

master
raphael leroux 2015-12-11 12:22:58 +01:00
parent 494194b739
commit 49fd6910bd
1 changed files with 9 additions and 0 deletions

View File

@ -47,4 +47,13 @@ minetest.register_on_placenode(function(pos, newnode, placer, oldnode, itemstack
end
end)
-- overwrite core function and use own gamemode check
old_rotate_and_place = minetest.rotate_and_place
minetest.rotate_and_place = function(itemstack, placer, pointed_thing,infinitestacks, orient_flags)
if creative_enhanced.player_gamemode_is_creative(placer:get_player_name()) then
infinitestacks = true
end
return old_rotate_and_place(itemstack, placer, pointed_thing,infinitestacks, orient_flags)
end
minetest.log("action","creative_enhanced loaded")