Rework the overly weird vine growth algorithm
[MineClone/MineClone2.git] / API.md
blobb23c82e6594f1ee19a8af5ab3064805d2b010f87
1 # API
2 ## Groups
3 MineClone 2 makes very extensive use of groups. Making sure your items and objects have the correct group memberships is very important.
4 Groups are explained in `GROUPS.md`.
6 ## Mod naming convention
7 Mods mods in MineClone 2 follow a simple naming convention: Mods with the prefix “`mcl_`” are specific to MineClone 2, although they may be based on an existing standalone. Mods which lack this prefix are *usually* verbatim copies of a standalone mod. Some modifications may still have been applied, but the APIs are held compatible.
9 ## Adding items
10 ### Special fields
12 All nodes can have these fields:
14 * `_mcl_hardness`: Hardness of the block, ranges from 0 to infinity (represented by -1). Determines digging times. Default: 0
15 * `_mcl_blast_resistance`: How well this block blocks and resists explosions. Default: 0
17 Use the `mcl_sounds` mod for the sounds.
19 ## APIs
20 A lot of things are possible by using one of the APIs in the mods. Note that not all APIs are documented yet, but it is planned. The following APIs should be more or less stable but keep in mind that MineClone 2 is still unfinished. All directory names are relative to `mods/`
22 ### Items
23 * Doors: `ITEMS/mcl_doors`
24 * Fences and fence gates: `ITEMS/mcl_fences`
25 * Walls: `ITEMS/mcl_walls`
26 * Beds: `ITEMS/mcl_beds`
27 * Buckets: `ITEMS/mcl_buckets`
29 ## Mobs
30 * Mobs: `ENTITIES/mods`
32 MineClone 2 uses Mobs Redo [`mobs`] by TenPlus1, a very powerful mod for adding mods of various types.
33 There are modificiations from the original mod for MineClone 2 compability. Some items have been removed or moved to other mods, but the API is identical.
34 You can add your own mobs, spawn eggs and spawning rules with this mod.
35 API documnetation is included in `ENTITIES/mobs/api.txt`.
37 ### Help
38 * Item help texts: `HELP/doc/doc_items`
39 * Low-level help entry and category framework: `HELP/doc/doc`
40 * Support for lookup tool (required for all entities): `HELP/doc/doc_identifier`
42 ### HUD
43 * Statbars: `HUD/hudbars`
45 ### Utility APIs
46 * Select random treasures: `CORE/mcl_loot`
47 * Get flowing direction of liquids: `CORE/flowlib`
48 * `on_walk_over` callback for nodes: `CORE/walkover` 
49 * Get node names close to player (to reduce constant querying): `PLAYER/mcl_playerinfo`
51 ### Unstable APIs
52 The following APIs may be subject to change in future. You could already use these APIs but there will probably be breaking changes in the future, or the API is not as fleshed out as it should be. Use at your own risk!
54 * Panes (like glass panes and iron bars): `ITEMS/xpanes`
55 * Slabs and stairs: `ITEM/mcl_stairs` **and** `ITEMS/mcstair`
56 * `_on_ignite` callback: `ITEMS/mcl_fire`
57 * Farming: `ITEMS/mcl_farming`
58 * Anything related to redstone: Don't touch (yet)
59 * Any other mod not explicitly mentioned above
61 ### Planned APIs
63 * Flowers
64 * Saplings and trees
65 * Custom banner patterns
66 * Custom dimensions
67 * Custom portals
68 * Music discs
69 * Dispenser and dropper support
70 * Proper sky and weather APIs
71 * Explosion API