Nightblock added!
parent
0efcfd6eb9
commit
b52d0b8976
23
init.lua
23
init.lua
|
@ -1,7 +1,7 @@
|
|||
-- TIME OF DAY BLOCK MOD
|
||||
-- by whiskers75
|
||||
|
||||
local version = "1"
|
||||
local version = "1.1"
|
||||
|
||||
minetest.register_node ("dayblock:block", {
|
||||
drawtype = blocklike,
|
||||
|
@ -24,4 +24,25 @@ minetest.register_on_punchnode(function(pos, node, puncher)
|
|||
end)
|
||||
|
||||
|
||||
|
||||
minetest.register_node ("dayblock:nblock", {
|
||||
drawtype = blocklike,
|
||||
description = "Night Block",
|
||||
tile_images = {"night.png"},
|
||||
inventory_image = {"night.png"},
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = {dig_immediate=2},
|
||||
material = minetest.digprop_constanttime(1.0),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
if node.name == "dayblock:nblock" then
|
||||
minetest.env:set_timeofday(0)
|
||||
minetest.chat_send_all("Midnight set by nightblock")
|
||||
end
|
||||
end)
|
||||
|
||||
print("Dayblock Mod version "..version.." loaded!")
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
-- TIME OF DAY BLOCK MOD
|
||||
-- by whiskers75
|
||||
|
||||
local version = "1"
|
||||
|
||||
minetest.register_node ("dayblock:block", {
|
||||
drawtype = blocklike,
|
||||
description = "Day Block",
|
||||
tile_images = {"day.png"},
|
||||
inventory_image = {"day.png"},
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = {dig_immediate=2},
|
||||
material = minetest.digprop_constanttime(1.0),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
if node.name == "dayblock:block" then
|
||||
minetest.env:set_timeofday(0.5)
|
||||
minetest.chat_send_all("Midday set by dayblock")
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
print("Dayblock Mod version "..version.." loaded!")
|
||||
|
||||
minetest.register_node ("dayblock:nblock", {
|
||||
drawtype = blocklike,
|
||||
description = "Night Block",
|
||||
tile_images = {"night.png"},
|
||||
inventory_image = {"night.png"},
|
||||
sunlight_propagates = true,
|
||||
paramtype = 'light',
|
||||
walkable = true,
|
||||
groups = {dig_immediate=2},
|
||||
material = minetest.digprop_constanttime(1.0),
|
||||
})
|
||||
|
||||
|
||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||
if node.name == "dayblock:nblock" then
|
||||
minetest.env:set_timeofday(0)
|
||||
minetest.chat_send_all("Midnight set by nightblock")
|
||||
end
|
||||
end)
|
||||
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in New Issue