forked from wintersknight94/NodeCore-Additions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sapnode.lua
42 lines (42 loc) · 1.42 KB
/
sapnode.lua
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
-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore
= minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
local modname = minetest.get_current_modname()
-- <>==============================================================<> --
minetest.register_node(modname.. ":sapnode", {
description = "Resin",
tiles = {modname.. "_sap.png"},
-- use_texture_alpha = "blend", --enabling this causes weird xray veiwing through the node
groups = {
crumbly = 2,
flammable = 2,
fire_fuel = 8,
sapnode = 1
},
sounds = nodecore.sounds("nc_terrain_crunchy")
})
-- <>==============================================================<> --
nodecore.register_craft({
label = "break sapnode to lumps",
action = "pummel",
indexkeys = {"group:sapnode"},
nodes = {{match = {groups = {sapnode = true}}, replace = "air"}},
items = {{name = modname .. ":lump_sap", count = 8, scatter = 5}},
toolgroups = {crumbly = 2},
itemscatter = 5
})
------------------------------------------------------------------------
nodecore.register_craft({
label = "pack sap lumps",
action = "pummel",
toolgroups = {thumpy = 2},
indexkeys = {modname .. ":lump_sap"},
nodes = {
{
match = {name = modname .. ":lump_sap", count = 8},
replace = modname.. ":sapnode"
}
}
})
-- <>==============================================================<> --