Add spawner descriptions and update documentation
This commit is contained in:
parent
15099e9b7f
commit
986ffccb46
4
API.txt
4
API.txt
@ -103,7 +103,8 @@ and with a chance of 100% 2 items of type "default:stone"
|
|||||||
backface_culling = false, -- set true to enable backface culling
|
backface_culling = false, -- set true to enable backface culling
|
||||||
animations = { -- animation used if defined <optional>
|
animations = { -- animation used if defined <optional>
|
||||||
idle = {#AnimationDef}, -- see #AnimationDef
|
idle = {#AnimationDef}, -- see #AnimationDef
|
||||||
... -- depends on modes (must correspond to be used); supported "special modes": eat, follow, attack
|
... -- depends on modes (must correspond to be used);
|
||||||
|
^ supported "special modes": eat, follow, attack, death, swim, panic
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -158,6 +159,7 @@ and with a chance of 100% 2 items of type "default:stone"
|
|||||||
spawner = { -- is set a spawner_node is added to creative inventory <optional>
|
spawner = { -- is set a spawner_node is added to creative inventory <optional>
|
||||||
range = <number>, -- defines an area (in blocks/nodes) within mobs are spawned
|
range = <number>, -- defines an area (in blocks/nodes) within mobs are spawned
|
||||||
number = <number>, -- maxmimum number of mobs spawned in area defined via range
|
number = <number>, -- maxmimum number of mobs spawned in area defined via range
|
||||||
|
description = <desc>, -- Item description as string <optional>
|
||||||
light = <range>, -- min and max lightvalue at spawn position <optional>
|
light = <range>, -- min and max lightvalue at spawn position <optional>
|
||||||
^ range -- table {min = <value>, max = <value>}
|
^ range -- table {min = <value>, max = <value>}
|
||||||
}
|
}
|
||||||
|
@ -424,7 +424,7 @@ function creatures.register_egg(egg_def)
|
|||||||
end
|
end
|
||||||
|
|
||||||
core.register_craftitem(":" .. egg_def.mob_name .. "_spawn_egg", {
|
core.register_craftitem(":" .. egg_def.mob_name .. "_spawn_egg", {
|
||||||
description = egg_def.description,
|
description = egg_def.description or egg_def.mob_name .. " spawn egg",
|
||||||
inventory_image = egg_def.texture,
|
inventory_image = egg_def.texture,
|
||||||
liquids_pointable = false,
|
liquids_pointable = false,
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
@ -516,7 +516,7 @@ function creatures.register_spawner(spawner_def)
|
|||||||
makeSpawnerEntiy(spawner_def.mob_name, spawner_def.model)
|
makeSpawnerEntiy(spawner_def.mob_name, spawner_def.model)
|
||||||
|
|
||||||
core.register_node(":" .. spawner_def.mob_name .. "_spawner", {
|
core.register_node(":" .. spawner_def.mob_name .. "_spawner", {
|
||||||
description = spawner_def.mob_name .. " spawner",
|
description = spawner_def.description or spawner_def.mob_name .. " spawner",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
tiles = {"creatures_spawner.png"},
|
tiles = {"creatures_spawner.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user