mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-30 06:21:05 +01:00
21 lines
728 B
Markdown
21 lines
728 B
Markdown
|
# mcl_compass
|
||
|
|
||
|
# Compass API
|
||
|
|
||
|
##mcl_compass.stereotype = "mcl_compass:" .. stereotype_frame
|
||
|
Default compass craftitem. This is also the image that is shown in the inventory.
|
||
|
|
||
|
##mcl_compass/init.lua:function mcl_compass.get_compass_itemname(pos, dir, itemstack)
|
||
|
Returns the itemname of a compass with needle direction matching the
|
||
|
current compass position.
|
||
|
|
||
|
pos: position of the compass;
|
||
|
dir: rotational orientation of the compass;
|
||
|
itemstack: the compass including its optional lodestone metadata.
|
||
|
|
||
|
##mcl_compass/init.lua:function mcl_compass.get_compass_image(pos, dir)
|
||
|
-- Returns partial itemname of a compass with needle direction matching compass position.
|
||
|
-- Legacy compatibility function for mods using older api.
|
||
|
|
||
|
|