Skip to content

Commit 271604a

Browse files
committed
update: a ton of stuff
1 parent 03ce161 commit 271604a

File tree

167 files changed

+3791
-1763
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+3791
-1763
lines changed

definitions/gfx/Texture.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
declare class Texture {
2+
/**
3+
* Loads a texture from file.
4+
* @param filePath The file path to the texture, could be absolute or relative to the script folder
5+
*/
6+
public static load(filePath: string): Texture;
7+
8+
/**
9+
* Gets a Minecraft texture. Can only be drawn with the Minecraft renderer
10+
* @param textureName The texture name, example: `"textures/items/arrow"`
11+
*/
12+
public static get(textureName: string): Texture;
13+
14+
/**
15+
* Reloads the (Minecraft renderer) texture.
16+
*/
17+
public reload(): void;
18+
19+
/**
20+
* Destroys the texture. It's highly recommended to set the texture to `null` after you call this
21+
*/
22+
public dispose(): void;
23+
}

definitions/gfx/graphics.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,16 @@ declare interface Graphics {
137137
* @param verticalAlignment The vertical alignment
138138
*/
139139
drawTextFull(area: Rect, text: string, size: number, color: Color, alignment: TextAlignment, verticalAlignment: VerticalAlignment): void;
140+
141+
/**
142+
* Draws a texture.
143+
* @param texture The texture to draw
144+
* @param pos The position to draw the texture
145+
* @param sizeX The size of the texture in pixels
146+
* @param sizeY The size of the texture in pixels
147+
* @param color The overlay color of the texture (defaults to white)
148+
*/
149+
drawTexture(texture: Texture, pos: Vector2, sizeX: number, sizeY: number, color?: Color): void;
140150
}
141151

142152
declare const graphics: Graphics;

definitions/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
/// <reference path="./gfx/graphics.d.ts" />
1717
/// <reference path="./gfx/graphics3.d.ts" />
18+
/// <reference path="./gfx/Texture.d.ts" />
1819

1920

2021
/// <reference path="./feature/command.d.ts" />

definitions/script.d.ts

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,27 @@
1-
interface Script {
2-
/**
3-
* Prints to chat, and logs the contents to file. They are seperated by new lines.
4-
* @param contents The contents to log.
5-
*/
6-
log(... contents: any[]): void;
7-
8-
name: string;
9-
author: string;
10-
version: string;
11-
description: string;
12-
}
13-
declare var script: Script;
14-
151
interface EngineLibraries {
162
"filesystem": include.Filesystem
173
"http": include.HTTP
184
"clipboard": include.Clipboard
195
}
206

7+
/**
8+
* Prints to chat.
9+
* @param contents The contents to log.
10+
*/
11+
declare function clientMessage(... contents: any[]): void;
12+
2113
/**
2214
* Load a specified library.
2315
* @param path The filepath, HTTP or HTTPS link to the JS file.
2416
* @throws Invalid filepath or Non-OK HTTP/HTTPS error code
2517
*/
2618
declare function require<K extends keyof EngineLibraries>(path: K): EngineLibraries[K];
2719

28-
29-
/**
30-
* @deprecated use require("http")
31-
*/
32-
declare function require(path: "network"): include.HTTP
33-
3420
/**
35-
* Load a specified script from filesystem or web.
36-
* @param path The filepath, HTTP or HTTPS link to the JS file.
37-
* @throws Invalid filepath or Non-OK HTTP/HTTPS error code
21+
*
22+
* @param path The path to load the library
3823
*/
39-
declare function require(path: string): object;
24+
declare function require(path: string): any;
4025

4126
/**
4227
* Stops execution for a specified amount of time.
@@ -60,4 +45,13 @@ declare function setTimeout(func: () => void, timeout: number): number;
6045
* @param timeout The time in milliseconds
6146
* @returns The Timeout ID
6247
*/
63-
declare function setInterval(func: () => void, timeout: number): number;
48+
declare function setInterval(func: () => void, timeout: number): number;
49+
50+
interface ScriptModule {
51+
/**
52+
* What the script exports.
53+
*/
54+
exports: {}
55+
}
56+
57+
declare const module: ScriptModule;

docs-markdown/exports.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [feature/module](module.feature_module/index.md)
1717
- [feature/setting](module.feature_setting/index.md)
1818
- [game](module.game/index.md)
19+
- [gfx/Texture](module.gfx_Texture/index.md)
1920
- [gfx/graphics](module.gfx_graphics/index.md)
2021
- [gfx/graphics3](module.gfx_graphics3/index.md)
2122
- [index](module.index/index.md)

docs-markdown/module.api_TextColor/interfaces/interface.ITextColor.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -8,221 +8,221 @@
88

99
**`Interface`**
1010

11-
**Source:** [api/TextColor.d.ts:1](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L1)
11+
**Source:** [api/TextColor.d.ts:1](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L1)
1212

1313
## Properties
1414

1515
### AQUA
1616

1717
> **AQUA**: `string`
1818
19-
**Source:** [api/TextColor.d.ts:24](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L24)
19+
**Source:** [api/TextColor.d.ts:24](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L24)
2020

2121
### BLACK
2222

2323
> **BLACK**: `string`
2424
25-
**Source:** [api/TextColor.d.ts:13](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L13)
25+
**Source:** [api/TextColor.d.ts:13](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L13)
2626

2727
### BLUE
2828

2929
> **BLUE**: `string`
3030
31-
**Source:** [api/TextColor.d.ts:22](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L22)
31+
**Source:** [api/TextColor.d.ts:22](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L22)
3232

3333
### BOLD
3434

3535
> **BOLD**: `string`
3636
37-
**Source:** [api/TextColor.d.ts:7](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L7)
37+
**Source:** [api/TextColor.d.ts:7](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L7)
3838

3939
### DARK_AQUA
4040

4141
> **DARK_AQUA**: `string`
4242
43-
**Source:** [api/TextColor.d.ts:16](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L16)
43+
**Source:** [api/TextColor.d.ts:16](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L16)
4444

4545
### DARK_BLUE
4646

4747
> **DARK_BLUE**: `string`
4848
49-
**Source:** [api/TextColor.d.ts:14](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L14)
49+
**Source:** [api/TextColor.d.ts:14](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L14)
5050

5151
### DARK_GRAY
5252

5353
> **DARK_GRAY**: `string`
5454
55-
**Source:** [api/TextColor.d.ts:21](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L21)
55+
**Source:** [api/TextColor.d.ts:21](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L21)
5656

5757
### DARK_GREEN
5858

5959
> **DARK_GREEN**: `string`
6060
61-
**Source:** [api/TextColor.d.ts:15](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L15)
61+
**Source:** [api/TextColor.d.ts:15](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L15)
6262

6363
### DARK_PURPLE
6464

6565
> **DARK_PURPLE**: `string`
6666
67-
**Source:** [api/TextColor.d.ts:18](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L18)
67+
**Source:** [api/TextColor.d.ts:18](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L18)
6868

6969
### DARK_RED
7070

7171
> **DARK_RED**: `string`
7272
73-
**Source:** [api/TextColor.d.ts:17](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L17)
73+
**Source:** [api/TextColor.d.ts:17](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L17)
7474

7575
### FORMAT_CHAR
7676

7777
> **FORMAT_CHAR**: `string`
7878
79-
**Source:** [api/TextColor.d.ts:2](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L2)
79+
**Source:** [api/TextColor.d.ts:2](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L2)
8080

8181
### GOLD
8282

8383
> **GOLD**: `string`
8484
85-
**Source:** [api/TextColor.d.ts:19](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L19)
85+
**Source:** [api/TextColor.d.ts:19](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L19)
8686

8787
### GRAY
8888

8989
> **GRAY**: `string`
9090
91-
**Source:** [api/TextColor.d.ts:20](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L20)
91+
**Source:** [api/TextColor.d.ts:20](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L20)
9292

9393
### GREEN
9494

9595
> **GREEN**: `string`
9696
97-
**Source:** [api/TextColor.d.ts:23](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L23)
97+
**Source:** [api/TextColor.d.ts:23](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L23)
9898

9999
### ITALIC
100100

101101
> **ITALIC**: `string`
102102
103-
**Source:** [api/TextColor.d.ts:8](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L8)
103+
**Source:** [api/TextColor.d.ts:8](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L8)
104104

105105
### LIGHT_PURPLE
106106

107107
> **LIGHT_PURPLE**: `string`
108108
109-
**Source:** [api/TextColor.d.ts:26](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L26)
109+
**Source:** [api/TextColor.d.ts:26](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L26)
110110

111111
### MATERIAL_AMETHYST
112112

113113
> **MATERIAL_AMETHYST**: `string`
114114
115115
1.20 ONLY
116116

117-
**Source:** [api/TextColor.d.ts:73](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L73)
117+
**Source:** [api/TextColor.d.ts:73](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L73)
118118

119119
### MATERIAL_COPPER
120120

121121
> **MATERIAL_COPPER**: `string`
122122
123123
1.20 ONLY
124124

125-
**Source:** [api/TextColor.d.ts:53](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L53)
125+
**Source:** [api/TextColor.d.ts:53](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L53)
126126

127127
### MATERIAL_DIAMOND
128128

129129
> **MATERIAL_DIAMOND**: `string`
130130
131131
1.20 ONLY
132132

133-
**Source:** [api/TextColor.d.ts:65](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L65)
133+
**Source:** [api/TextColor.d.ts:65](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L65)
134134

135135
### MATERIAL_EMERALD
136136

137137
> **MATERIAL_EMERALD**: `string`
138138
139139
1.20 ONLY
140140

141-
**Source:** [api/TextColor.d.ts:61](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L61)
141+
**Source:** [api/TextColor.d.ts:61](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L61)
142142

143143
### MATERIAL_GOLD
144144

145145
> **MATERIAL_GOLD**: `string`
146146
147147
1.20 ONLY
148148

149-
**Source:** [api/TextColor.d.ts:57](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L57)
149+
**Source:** [api/TextColor.d.ts:57](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L57)
150150

151151
### MATERIAL_IRON
152152

153153
> **MATERIAL_IRON**: `string`
154154
155155
1.20 ONLY
156156

157-
**Source:** [api/TextColor.d.ts:41](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L41)
157+
**Source:** [api/TextColor.d.ts:41](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L41)
158158

159159
### MATERIAL_LAPIS
160160

161161
> **MATERIAL_LAPIS**: `string`
162162
163163
1.20 ONLY
164164

165-
**Source:** [api/TextColor.d.ts:69](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L69)
165+
**Source:** [api/TextColor.d.ts:69](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L69)
166166

167167
### MATERIAL_NETHERITE
168168

169169
> **MATERIAL_NETHERITE**: `string`
170170
171171
1.20 ONLY
172172

173-
**Source:** [api/TextColor.d.ts:45](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L45)
173+
**Source:** [api/TextColor.d.ts:45](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L45)
174174

175175
### MATERIAL_QUARTZ
176176

177177
> **MATERIAL_QUARTZ**: `string`
178178
179179
1.20 ONLY
180180

181-
**Source:** [api/TextColor.d.ts:37](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L37)
181+
**Source:** [api/TextColor.d.ts:37](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L37)
182182

183183
### MATERIAL_REDSTONE
184184

185185
> **MATERIAL_REDSTONE**: `string`
186186
187187
1.20 ONLY
188188

189-
**Source:** [api/TextColor.d.ts:49](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L49)
189+
**Source:** [api/TextColor.d.ts:49](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L49)
190190

191191
### MINECOIN_GOLD
192192

193193
> **MINECOIN_GOLD**: `string`
194194
195-
**Source:** [api/TextColor.d.ts:32](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L32)
195+
**Source:** [api/TextColor.d.ts:32](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L32)
196196

197197
### OBFUSCATE
198198

199199
> **OBFUSCATE**: `string`
200200
201-
**Source:** [api/TextColor.d.ts:6](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L6)
201+
**Source:** [api/TextColor.d.ts:6](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L6)
202202

203203
### RED
204204

205205
> **RED**: `string`
206206
207-
**Source:** [api/TextColor.d.ts:25](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L25)
207+
**Source:** [api/TextColor.d.ts:25](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L25)
208208

209209
### RESET
210210

211211
> **RESET**: `string`
212212
213-
**Source:** [api/TextColor.d.ts:9](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L9)
213+
**Source:** [api/TextColor.d.ts:9](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L9)
214214

215215
### WHITE
216216

217217
> **WHITE**: `string`
218218
219-
**Source:** [api/TextColor.d.ts:28](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L28)
219+
**Source:** [api/TextColor.d.ts:28](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L28)
220220

221221
### YELLOW
222222

223223
> **YELLOW**: `string`
224224
225-
**Source:** [api/TextColor.d.ts:27](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L27)
225+
**Source:** [api/TextColor.d.ts:27](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L27)
226226

227227
## Methods
228228

@@ -232,7 +232,7 @@
232232
233233
Formats '&' into colorcoded string.
234234

235-
**Source:** [api/TextColor.d.ts:79](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L79)
235+
**Source:** [api/TextColor.d.ts:79](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L79)
236236

237237
#### Parameters
238238

docs-markdown/module.api_TextColor/variables/variable.TextColor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
> `const` **TextColor**: [`ITextColor`](../interfaces/interface.ITextColor.md)
1212
13-
**Source:** [api/TextColor.d.ts:82](https://github.com/LatiteScripting/latitescripting.github.io/blob/6e0c251/definitions/api/TextColor.d.ts#L82)
13+
**Source:** [api/TextColor.d.ts:82](https://github.com/LatiteScripting/latitescripting.github.io/blob/03ce161/definitions/api/TextColor.d.ts#L82)

0 commit comments

Comments
 (0)