2018-06-20 05:43:52 +02:00
|
|
|
Notes
|
|
|
|
|
2019-01-07 01:26:02 +01:00
|
|
|
# Lua API integration
|
|
|
|
|
|
|
|
## HUD
|
|
|
|
```lua
|
2019-01-07 03:55:37 +01:00
|
|
|
local hud = LuaHUD.new()
|
2019-01-07 01:26:02 +01:00
|
|
|
|
2019-01-07 03:55:37 +01:00
|
|
|
hud:hotbar {
|
|
|
|
pos = {x = 42, y = 84},
|
|
|
|
texture = "default_hotbar.png",
|
|
|
|
slots = 8,
|
|
|
|
}
|
2019-01-07 01:26:02 +01:00
|
|
|
|
2019-01-07 03:55:37 +01:00
|
|
|
openminer:player():set_hud(hud)
|
|
|
|
```
|
2019-01-07 01:26:02 +01:00
|
|
|
## World
|
2019-01-07 03:55:37 +01:00
|
|
|
```lua
|
|
|
|
openminer:get_block(pos)
|
|
|
|
openminer:get_meta(pos)
|
|
|
|
openminer:get_inventory(pos)
|
|
|
|
```
|
2019-01-07 01:26:02 +01:00
|
|
|
* * *
|
|
|
|
|
|
|
|
# Old notes
|
|
|
|
|
2018-06-20 05:43:52 +02:00
|
|
|
• GUI Texture:
|
|
|
|
|
|
|
|
• Button: 200x20 (0;46, 0;66, 0;86)
|
|
|
|
• Hotbar: 182x22
|
|
|
|
• Selection: 24x24 (0;22)
|
|
|
|
|
2019-01-07 01:26:02 +01:00
|
|
|
> vim:ft=notes
|