Last active
May 3, 2017 21:33
-
-
Save red-001/7bf17b9ec5cb1e5b370f50cfc6c69e6f to your computer and use it in GitHub Desktop.
test code for #5255
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core.register_chatcommand("test_pr", { | |
func = function(name, _) | |
local player = core.get_player_by_name(name) | |
local pos = player:getpos() | |
pos = {x = math.floor(pos.x+0.5),y=math.floor(pos.y+0.5),z=math.floor(pos.z+0.5)} | |
print("pos:" .. dump(pos)) | |
print("test1:" .. dump(minetest.find_node_near(pos, 4, "default:water_source", true))) | |
print("test2:" .. dump(minetest.find_node_near(pos, 4, "default:water_source", false))) | |
print("test3:" .. dump(minetest.find_node_near(pos, 4, "default:water_source"))) | |
end, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment