Upgrading to GitLab 11.10.0. Expect errors and see debian-infrastructure-announce@lists.debian.org for further information.

Commit e78fc43d authored by Petter Reinholdtsen's avatar Petter Reinholdtsen

New upstream version 0.15

parent 8cbb6138
......@@ -35,6 +35,7 @@ block.GOLD_ORE =Block(14)
block.IRON_ORE =Block(15)
block.COAL_ORE =Block(16)
block.WOOD =Block(17)
block.WOOD2 =Block(162)
block.LEAVES =Block(18)
block.GLASS =Block(20)
block.LAPIS_LAZULI_ORE =Block(21)
......@@ -232,7 +233,7 @@ translate(block.GRAVEL,"default:gravel")
translate(block.GOLD_ORE,"default:stone_with_gold")
translate(block.IRON_ORE,"default:stone_with_iron")
translate(block.COAL_ORE,"default:stone_with_coal")
translate(block.WOOD,"default:wood")
translate(block.WOOD,"default:tree")
translate(block.LEAVES,"default:leaves")
translate(block.GLASS,"default:glass")
translate(block.LAPIS_LAZULI_ORE,"wool:blue") -- fix
......@@ -492,12 +493,26 @@ defineStair(164, "stairs:stair_wood") -- fix: dark oak
defineStair(180, "stairs:stair_sandstone") -- fix: red sandstone
defineStair(203, "stairs:stair_wood") -- fix: purpur
local function defineWood(main, subtype, node_name)
translate(Block(main, subtype), node_name)
translate(Block(main, subtype + 1 * 4), node_name, 12)
translate(Block(main, subtype + 2 * 4), node_name, 4)
translate(Block(main, subtype + 3 * 4), node_name) -- fix: all bark
end
defineWood(block.WOOD, 0, "default:tree") -- oak
defineWood(block.WOOD, 1, "default:pine_tree") -- spruce
defineWood(block.WOOD, 2, "default:tree") -- fix: birch
defineWood(block.WOOD, 3, "default:jungletree")
defineWood(block.WOOD2, 0, "default:acacia_tree")
defineWood(block.WOOD2, 1, "default:tree") -- fix: dark oak
function block.node_to_id_meta(node)
if node.name == "air" or node.name == "ignore" then
return "0"
return 0,0
end
local entry=node.name .. " " .. node.param2
local entry=node.name .. " " .. node.param2
if from_node[entry] then
return unBlock(from_node[entry])
end
......
......@@ -521,6 +521,12 @@ function handle_world(cmd, args)
elseif cmd == "getNode" then
local node = minetest.get_node({x=tonumber(args[1]),y=tonumber(args[2]),z=-tonumber(args[3])})
return node.name .. "," .. node.param2
elseif cmd == "getAllNodes" then
local nodes = {}
for name,_ in pairs(minetest.registered_nodes) do
table.insert(nodes,name)
end
return table.concat(nodes,'|')
elseif cmd == "getBlockWithData" or cmd == "getBlock" then
local node = minetest.get_node({x=tonumber(args[1]),y=tonumber(args[2]),z=-tonumber(args[3])})
local id, meta = block.node_to_id_meta(node)
......
from mc import *
from random import choice,randint
mc = Minecraft()
nodes = mc.conn.sendReceive("world.getAllNodes").split("|")
pos = mc.player.getTilePos()
for i in range(1000):
n = choice(nodes)
if "lava" in n or "fire" in n or "water" in n: continue
mc.conn.send("world.setNode", pos.x+randint(0,29), pos.y+randint(0,29),
pos.z+randint(0,29), n)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment