add water lily; fix 180 deg rotation of imported maps

master
Martin Doege 2015-04-29 12:21:53 +02:00
parent f966f7e9f1
commit 49572aa757
4 changed files with 44 additions and 1 deletions

1
mods/lilypad/depends.txt Normal file
View File

@ -0,0 +1 @@
default

41
mods/lilypad/init.lua Normal file
View File

@ -0,0 +1,41 @@
-- adapted from plantlife modpack
minetest.register_node("lilypad:waterlily", {
description = "Lily Pad",
drawtype = "nodebox",
tiles = {
"waterlily.png"
},
inventory_image = "waterlily.png",
wield_image = "waterlily.png",
sunlight_propagates = true,
paramtype = "light",
walkable = true,
groups = {snappy = 3,flammable=2},
sounds = default.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",
fixed = { -0.4, -0.5, -0.4, 0.4, -0.45, 0.4 },
},
node_box = {
type = "fixed",
fixed = { -0.5, -0.49, -0.5, 0.5, -0.49, 0.5 },
},
buildable_to = true,
liquids_pointable = true,
on_place = function(itemstack, placer, pointed_thing)
local pt = pointed_thing
local top_pos = {x=pt.under.x, y=pt.under.y+1, z=pt.under.z}
local under_node = minetest.get_node(pt.under)
if under_node.name ~= "default:water_source" then return end
minetest.set_node(top_pos, {name = "lilypad:waterlily"})
if not minetest.setting_getbool("creative_mode") then
itemstack:take_item()
end
return itemstack
end
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

View File

@ -259,6 +259,7 @@ conversionTable = [
(88 , -1, "nether:sand", "nether"),
(89 , -1, "nether:glowstone", "nether"),
(90 , -3, "nether:portal", "nether"),
(112, -1, "nether:brick", "nether"),
#Riesenpilz Section
# Reference: https://github.com/HybridDog/riesenpilz/blob/master/init.lua
@ -496,7 +497,7 @@ def perform(level, box, options):
if tt not in notfound:
notfound.append(tt)
continue
calcpos = (origin[0] - x, y - origin[1], z - origin[2])
calcpos = (x - origin[0], y - origin[1], origin[2] - z)
fmttpl = calcpos + (c[0], level.blockLightAt(x, y, z), c[1])
f.write("%d %d %d %s %d %d\n" % fmttpl)