mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Add spawner placement instructions
This commit is contained in:
parent
3845369237
commit
f1215ca989
1 changed files with 7 additions and 0 deletions
|
@ -202,6 +202,12 @@ local spawn_monsters = function(pos, elapsed)
|
|||
|
||||
end
|
||||
|
||||
-- The monster spawner node.
|
||||
-- PLACEMENT INSTRUCTIONS:
|
||||
-- If this node is placed by a player, minetest.item_place, etc. default settings are applied
|
||||
-- automatially.
|
||||
-- IF this node is placed by ANY other method (e.g. minetest.set_node, LuaVoxelManip), you
|
||||
-- MUST call mcl_mobspawners.setup_spawner right after the spawner has been placed.
|
||||
minetest.register_node("mcl_mobspawners:spawner", {
|
||||
tiles = {"mob_spawner.png"},
|
||||
drawtype = "glasslike",
|
||||
|
@ -214,6 +220,7 @@ minetest.register_node("mcl_mobspawners:spawner", {
|
|||
is_ground_content = false,
|
||||
drop = "",
|
||||
|
||||
-- If placed by player, setup spawner with default settings
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local node_under = minetest.get_node(pointed_thing.under)
|
||||
local new_itemstack, success = minetest.item_place(itemstack, placer, pointed_thing)
|
||||
|
|
Loading…
Reference in a new issue