Add beds
This commit is contained in:
parent
3b526a7276
commit
edb02e9d33
24 changed files with 564 additions and 0 deletions
36
game_api.txt
36
game_api.txt
|
@ -24,6 +24,42 @@ The bucket API allows registering new types of buckets for non-default liquids.
|
|||
"Lava Bucket" -- Bucket description
|
||||
)
|
||||
|
||||
Beds API
|
||||
--------
|
||||
beds.register_bed(
|
||||
"beds:bed", -- Bed name
|
||||
def: See [#Bed definition] -- Bed definition
|
||||
)
|
||||
|
||||
beds.read_spawns() -- returns a table containing players respawn positions
|
||||
beds.kick_players() -- forces all players to leave bed
|
||||
beds.skip_night() -- sets world time to morning and saves respawn position of all players currently sleeping
|
||||
|
||||
#Bed definition
|
||||
---------------
|
||||
{
|
||||
description = "Simple Bed",
|
||||
inventory_image = "beds_bed.png",
|
||||
wield_image = "beds_bed.png",
|
||||
tiles = {
|
||||
bottom = {[Tile definition],
|
||||
^ the tiles of the bottom part of the bed
|
||||
},
|
||||
top = {[Tile definition],
|
||||
^ the tiles of the bottom part of the bed
|
||||
}
|
||||
},
|
||||
nodebox = {
|
||||
bottom = regular nodebox, see [Node boxes], -- bottm part of bed
|
||||
top = regular nodebox, see [Node boxes], -- top part of bed
|
||||
},
|
||||
selectionbox = regular nodebox, see [Node boxes], -- for both nodeboxes
|
||||
recipe = { -- Craft recipe
|
||||
{"group:wool", "group:wool", "group:wool"},
|
||||
{"group:wood", "group:wood", "group:wood"}
|
||||
}
|
||||
}
|
||||
|
||||
Doors API
|
||||
---------
|
||||
The doors mod allows modders to register custom doors and trapdoors.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue