diff --git a/minetest.conf b/minetest.conf index 0040c17..1fcf38b 100644 --- a/minetest.conf +++ b/minetest.conf @@ -13,3 +13,5 @@ mg_name = singlenode # Enable testing mod. The mod for tools to be removed in the future. testing_mod = false + +enable_build_where_you_stand = true diff --git a/mods/creative/init.lua b/mods/creative/init.lua index e69de29..5da2d17 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -0,0 +1,13 @@ +if minetest.setting_getbool("creative_mode") then + +-- Place node at player pos +minetest.nodedef_default.on_place = function(itemstack, user, pointed) + local pos = user:getpos() + local inv = user:get_inventory() + local idx = user:get_wield_index() + local stack = inv:get_stack("main", idx) + local s_name = stack:get_name() + minetest.set_node(pos, {name = s_name}) +end + +end