mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2025-04-04 05:11:27 +02:00
Disabled grass path making when sneaking
This commit is contained in:
@ -171,7 +171,7 @@ local make_grass_path = function(itemstack, placer, pointed_thing)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Remove grass paths
|
-- Remove grass paths
|
||||||
if (minetest.get_item_group(node.name, "path_remove_possible") == 1) and placer:get_player_control().sneak == true then
|
if (minetest.get_item_group(node.name, "path_remove_possible") == 1) and placer:get_player_control().sneak then
|
||||||
local above = table.copy(pointed_thing.under)
|
local above = table.copy(pointed_thing.under)
|
||||||
above.y = above.y + 1
|
above.y = above.y + 1
|
||||||
if minetest.get_node(above).name == "air" then
|
if minetest.get_node(above).name == "air" then
|
||||||
@ -194,7 +194,7 @@ local make_grass_path = function(itemstack, placer, pointed_thing)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Make grass paths
|
-- Make grass paths
|
||||||
if (minetest.get_item_group(node.name, "path_creation_possible") == 1) then
|
if (minetest.get_item_group(node.name, "path_creation_possible") == 1) and not placer:get_player_control().sneak then
|
||||||
local above = table.copy(pointed_thing.under)
|
local above = table.copy(pointed_thing.under)
|
||||||
above.y = above.y + 1
|
above.y = above.y + 1
|
||||||
if minetest.get_node(above).name == "air" then
|
if minetest.get_node(above).name == "air" then
|
||||||
|
Reference in New Issue
Block a user