Re-added the testing tools

Re-named to made tab completion of init.lua better
master
qwertymine3 2015-10-17 16:12:29 +01:00
parent 1010d8bba6
commit bab2d89830
1 changed files with 26 additions and 0 deletions

26
testtools.lua Normal file
View File

@ -0,0 +1,26 @@
local seed = minetest.get_mapgen_params().seed
minetest.register_craftitem("vcnlib:biome_wand", {
description = "Biome Wand",
inventory_image = "farming_tool_diamondhoe.png",
on_place = function(itemstack, placer, pointed_thing)
--test_biomed_points(pointed_thing.above)
--minetest.chat_send_all((vcnlib.test))
--minetest.chat_send_all(vcnlib.pos_to_sector(pointed_thing.above,vcnlib.test).x)
local pos = pointed_thing.above
local scale = vcnlib.layers.test.scale
if scale then
minetest.chat_send_all(vcnlib.get_node_biome(({x=math.floor(pos.x/scale),y=math.floor(pos.y/scale),z=math.floor(pos.z/scale)}),seed,vcnlib.layers.test))
else
minetest.chat_send_all(vcnlib.get_node_biome(pos,seed,vcnlib.layers.test))
end
end,
})
minetest.register_craft({
output = "vcnlib:biome_wand",
recipe = {
{"default:diamond","default:diamond","default:diamond"},
{"default:diamond","default:stick", "default:diamond"},
{"default:diamond","default:stick", "default:diamond"},
},
})