summaryrefslogtreecommitdiff
path: root/mods/vzxv/nodes.lua
blob: c09fa17e404d9b29b1b4d94232b106a8d280e8db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

vzxv.mundane_block("vzxv:stone","Stone",nil,{groups={
	cracky=2,stone=1
}})
vzxv.mundane_block("vzxv:cobblestone","Cobblestone",nil,{groups={
	cracky=2,stone=1
}})
vzxv.mundane_block("vzxv:dirt","Dirt",nil,{groups={
	soil=1,crumbly=1,handy=1
}})
vzxv.slabs("vzxv:sand","Sand","sand",{groups={
	crumbly=1,handy=1
}})
vzxv.slabs("vzxv:moistdirt","Dirt","moistdirt",{groups={
	soil=2,crumbly=1,handy=1
}})
vzxv.slabs("vzxv:moistgrass","Grass",{"vzxvmoistgrass.png","vzxvmoistdirt.png","vzxvmoistgrass.png"},{groups={
	plant=1,crumbly=2,soil=1,grassy=1
}})
local dry_grass = "vzxvmoistgrass.png^[colorize:#F05:25"
vzxv.slabs("vzxv:grass","Grass",{dry_grass,"vzxvdirt.png",dry_grass},{groups={
	plant=1,crumbly=2,soil=1,grassy=1
}})

vzxv.mundane_block("vzxv:planks","Planks",nil,{groups={
	choppy=1,
}})

vzxv.mundane_block("vzxv:stick","Stick",{"vzxvlog.png","vzxvlog.png","vzxvbark.png"},{
    groups={
        choppy=1,handy=3
    },
    node_box = {type="fixed",fixed={-0.05,-0.5,-0.05,0.05,0.5,0.05}},
    drawtype = "nodebox"
})

minetest.register_node("vzxv:water", {
	description = "Water",
	tiles={"vzxvwater.png"},
	walkable = false,
	liquidtype = "source",
	drawtype = "liquid",
	use_texture_alpha = "blend",
	liquid_viscocity = 7,
	move_resistance = 1,
	liquid_alternative_source = "vzxv:water",
	liquid_alternative_flowing = "vzxv:flowingwater",
	paramtype="light",
	sunlight_propagates=false,
	diggable=false,
	pointable=false,
})
minetest.register_node("vzxv:flowingwater", {
	description = "Water",
	tiles={"vzxvwater.png"},
	walkable = false,
	liquidtype = "flowing",
	drawtype = "liquid",
	use_texture_alpha = "blend",
	liquid_viscocity = 7,
	move_resistance = 1,
	liquid_alternative_source = "vzxv:water",
	liquid_alternative_flowing = "vzxv:flowingwater",
	paramtype="light",
	sunlight_propagates=false,
	diggable=false,
	pointable=false,
})

minetest.register_craftitem("vzxv:apioform", {
    description = "Apioform",
    inventory_image = "vzxvapioform.png",
	on_use = function(itemstack, user, pointed_thing)
		local pos = minetest.get_pointed_thing_position(pointed_thing)
		local meta = vzxv.meta(pos)
		minetest.chat_send_player(user:get_player_name(), "metadata: "..dump(meta))
	end,
})

minetest.register_craftitem("vzxv:grassseeds", {
    description = "Grass seeds",
    inventory_image = "vzxvgrassseeds.png",
})