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
|
||||
animations = { -- animation used if defined <optional>
|
||||
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>
|
||||
range = <number>, -- defines an area (in blocks/nodes) within mobs are spawned
|
||||
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>
|
||||
^ range -- table {min = <value>, max = <value>}
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ function creatures.register_egg(egg_def)
|
||||
end
|
||||
|
||||
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,
|
||||
liquids_pointable = false,
|
||||
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)
|
||||
|
||||
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",
|
||||
tiles = {"creatures_spawner.png"},
|
||||
is_ground_content = true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user