1
0
mirror of https://github.com/mt-mods/plantlife_modpack.git synced 2025-07-13 13:30:19 +02:00

2 Commits

Author SHA1 Message Date
622016713e respect protection when placing twigs 2020-12-02 10:05:01 -05:00
9963e588d6 add minimum minetest version key for contentdb 2020-06-03 13:00:31 -04:00
2 changed files with 9 additions and 0 deletions

1
modpack.conf Normal file
View File

@ -0,0 +1 @@
min_minetest_version = 5.2.0

View File

@ -42,6 +42,14 @@ for i in pairs(NoDe) do
liquids_pointable = true,
on_place = function(itemstack, placer, pointed_thing)
local pt = pointed_thing
if not placer then return end
local playername = placer:get_player_name()
if minetest.is_protected(pt.above, playername) then
minetest.record_protection_violation(pt.above, playername)
return
end
local direction = minetest.dir_to_facedir(placer:get_look_dir())
if minetest.get_node(pt.above).name=="air" then
minetest.swap_node(pt.above, {name="trunks:twig_"..math.random(1,4), param2=direction})