Skip to content

Commit b060121

Browse files
committed
Update autodoc.lua
1 parent 485bc09 commit b060121

1 file changed

Lines changed: 54 additions & 12 deletions

File tree

autodocs/autodoc.lua

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
--#region Information
44
-- GENERATED AUTODOC
5-
-- Generated: 2026-01-21T10:19:56.649403100
5+
-- Generated: 2026-01-24T19:31:15.033038100
66
-- Luafy Version: 2.0.0
77
-- Format: Lua LS library file
88
--#endregion
@@ -76,10 +76,16 @@ local Vec3d = {}
7676

7777
--- An object representing a mod installed on the server.
7878
---@class Mod
79-
---@field modid string The id of this mod.
80-
---@field version string The version of the mod currently installed.
8179
local Mod = {}
8280

81+
--- Gets the id of this mod.
82+
---@return string
83+
function Mod.get_mod_id() end
84+
85+
--- The version of the mod currently installed.
86+
---@return string
87+
function Mod.get_version() end
88+
8389

8490
--- Object representing the potential result of a script execution. Since scripts run asynchronously, this object allows for a result to be awaited if needed.
8591
---@class ScriptResult
@@ -157,6 +163,11 @@ function LivingEntity.kill(damage_type, source) end
157163
---@return nil
158164
function LivingEntity.teleport(pos, yaw, pitch, retain_velocity, dimension_id) end
159165

166+
--- Gets an itemstack from this entities inventory by an inventory slot reference.
167+
---@param slot_reference string Reference to the slot to get the stack from.
168+
---@return ItemStack
169+
function LivingEntity.get_stack(slot_reference) end
170+
160171

161172
--- A player.
162173
---@class Player: LivingEntity
@@ -183,7 +194,7 @@ local Block = {}
183194
local Item = {}
184195

185196
--- Creates an items stack of this item type.
186-
---@param count integer The number of items to create a stack of.
197+
---@param count integer | nil The number of items to create a stack of. Defaults to 1.
187198
---@return ItemStack
188199
function Item.create_stack(count) end
189200

@@ -192,6 +203,14 @@ function Item.create_stack(count) end
192203
---@class ItemStack
193204
local ItemStack = {}
194205

206+
--- Gets the item type of this stack.
207+
---@return Item
208+
function ItemStack.get_item_type() end
209+
210+
--- Gets the item id of this stack.
211+
---@return string
212+
function ItemStack.get_item_id() end
213+
195214
--- Gets the number of items in this stack.
196215
---@return integer
197216
function ItemStack.get_count() end
@@ -201,14 +220,6 @@ function ItemStack.get_count() end
201220
---@return nil
202221
function ItemStack.set_count(count) end
203222

204-
--- Gets the item type of this stack.
205-
---@return Item
206-
function ItemStack.get_item_type() end
207-
208-
--- Gets the item id of this stack.
209-
---@return string
210-
function ItemStack.get_item_id() end
211-
212223
--- Gets a component from this stack as NBT.
213224
---@param component_id string The id of the component type to fetch.
214225
---@return table
@@ -221,6 +232,37 @@ function ItemStack.get_component(component_id) end
221232
function ItemStack.set_component(component_id, nbt) end
222233

223234

235+
--- Text component.
236+
---@class TextComponent
237+
local TextComponent = {}
238+
239+
--- Serialises this text component to a JSON string.
240+
---@return string
241+
function TextComponent.serialise() end
242+
243+
--- Appends as literal text.
244+
---@param string string Literal text.
245+
---@return nil
246+
function TextComponent.append_literal(string) end
247+
248+
--- Appends as translatable text.
249+
---@param string string Translatable text.
250+
---@param args TextComponent[] | nil Components to pass as objects.
251+
---@return nil
252+
function TextComponent.append_translatable(string, args) end
253+
254+
--- Appends a sprite.
255+
---@param atlas string Sprite atlas.
256+
---@param id string Sprite identifer.
257+
---@return nil
258+
function TextComponent.append_sprite(atlas, id) end
259+
260+
--- Appends as a playerhead sprite.
261+
---@param username string Player username.
262+
---@return nil
263+
function TextComponent.append_sprite_player(username) end
264+
265+
224266
--#endregion
225267

226268
--#region Script Api

0 commit comments

Comments
 (0)