Interaksi tile
client:hit(point)
| Field | Type |
|---|---|
| Signature | (self: Client, point: Vec2i) → string? |
| Returns | string? — nil kalau sukses |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:place(point, blockType, invType?)
| Field | Type |
|---|---|
| Signature | (self: Client, point: Vec2i, blockType: number, invType: number?) → string? |
| Returns | string? — nil kalau sukses |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
invType ngikut InventoryItemType (default 0 = block). Kalau invType == InventoryItemType.seed, panggilan dirutekan ke paket yang sama dengan plant().
client:plant(point, blockType)
| Field | Type |
|---|---|
| Signature | (self: Client, point: Vec2i, blockType: number) → string? |
| Returns | string? — nil kalau sukses |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
Shorthand buat place(point, blockType, InventoryItemType.seed).
client:hitEnemy(x, y, aiId)
| Field | Type |
|---|---|
| Signature | (self: Client, x: number, y: number, aiId: number) → string? |
| Returns | string? — nil kalau sukses |
| Common errors | Errors.NOT_IN_WORLD, Errors.CANCELLED, Errors.DISCONNECTED |
| Async | yes |
client:hit(Vector2i.new(5, 3))
client:place(Vector2i.new(5, 3), blockType, inventoryType)
client:plant(Vector2i.new(5, 3), blockType)
client:hitEnemy(x, y, aiId)