-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
3517 lines (3119 loc) · 105 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
///////////
// Utils //
///////////
type int = number;
type Int = number;
type char = number;
type byte = number;
type float = number;
type Float = number;
type double = number;
type Double = number;
type long = number;
type Long = number;
type JavaClass<T extends string> = any;
declare function test(f: float): Double;
//////////////////
// JAVA CLASSES //
//////////////////
//#region JavaClasses
declare class Thread {
constructor();
constructor(func: () => void);
constructor(func: () => void, name: string);
start(): void;
static sleep(millis: long): void;
static sleep(millis: long, nanos: int): void;
}
declare interface Keyboard {
EVENT_SIZE: int;
CHAR_NONE: int;
KEY_NONE: int;
KEY_ESCAPE: int;
KEY_0: int;
KEY_1: int;
KEY_2: int;
KEY_3: int;
KEY_4: int;
KEY_5: int;
KEY_6: int;
KEY_7: int;
KEY_8: int;
KEY_9: int;
KEY_MINUS: int;
KEY_EQUALS: int;
KEY_BACK: int;
KEY_TAB: int;
KEY_Q: int;
KEY_W: int;
KEY_E: int;
KEY_R: int;
KEY_T: int;
KEY_Y: int;
KEY_U: int;
KEY_I: int;
KEY_O: int;
KEY_P: int;
KEY_LBRACKET: int;
KEY_RBRACKET: int;
KEY_RETURN: int;
KEY_LCONTROL: int;
KEY_A: int;
KEY_S: int;
KEY_D: int;
KEY_F: int;
KEY_G: int;
KEY_H: int;
KEY_J: int;
KEY_K: int;
KEY_L: int;
KEY_SEMICOLON: int;
KEY_APOSTROPHE: int;
KEY_GRAVE: int;
KEY_LSHIFT: int;
KEY_BACKSLASH: int;
KEY_Z: int;
KEY_X: int;
KEY_C: int;
KEY_V: int;
KEY_B: int;
KEY_N: int;
KEY_M: int;
KEY_COMMA: int;
KEY_PERIOD: int;
KEY_SLASH: int;
KEY_RSHIFT: int;
KEY_MULTIPLY: int;
KEY_LMENU: int;
KEY_SPACE: int;
KEY_CAPITAL: int;
KEY_F1: int;
KEY_F2: int;
KEY_F3: int;
KEY_F4: int;
KEY_F5: int;
KEY_F6: int;
KEY_F7: int;
KEY_F8: int;
KEY_F9: int;
KEY_F10: int;
KEY_NUMLOCK: int;
KEY_SCROLL: int;
KEY_NUMPAD7: int;
KEY_NUMPAD8: int;
KEY_NUMPAD9: int;
KEY_SUBTRACT: int;
KEY_NUMPAD4: int;
KEY_NUMPAD5: int;
KEY_NUMPAD6: int;
KEY_ADD: int;
KEY_NUMPAD1: int;
KEY_NUMPAD2: int;
KEY_NUMPAD3: int;
KEY_NUMPAD0: int;
KEY_DECIMAL: int;
KEY_F11: int;
KEY_F12: int;
KEY_F13: int;
KEY_F14: int;
KEY_F15: int;
KEY_F16: int;
KEY_F17: int;
KEY_F18: int;
KEY_KANA: int;
KEY_F19: int;
KEY_CONVERT: int;
KEY_NOCONVERT: int;
KEY_YEN: int;
KEY_NUMPADEQUALS: int;
KEY_CIRCUMFLEX: int;
KEY_AT: int;
KEY_COLON: int;
KEY_UNDERLINE: int;
KEY_KANJI: int;
KEY_STOP: int;
KEY_AX: int;
KEY_UNLABELED: int;
KEY_NUMPADENTER: int;
KEY_RCONTROL: int;
KEY_SECTION: int;
KEY_NUMPADCOMMA: int;
KEY_DIVIDE: int;
KEY_SYSRQ: int;
KEY_RMENU: int;
KEY_FUNCTION: int;
KEY_PAUSE: int;
KEY_HOME: int;
KEY_UP: int;
KEY_PRIOR: int;
KEY_LEFT: int;
KEY_RIGHT: int;
KEY_END: int;
KEY_DOWN: int;
KEY_NEXT: int;
KEY_INSERT: int;
KEY_DELETE: int;
KEY_CLEAR: int;
KEY_LMETA: int;
KEY_LWIN: int;
KEY_RMETA: int;
KEY_RWIN: int;
KEY_APPS: int;
KEY_POWER: int;
KEY_SLEEP: int;
isCreated(): boolean;
poll(): void;
isKeyDown(key: int): boolean;
getKeyName(key: int): string;
getKeyIndex(key: int): int;
getNumKeyboardEvent(): int;
next(): boolean;
getKeyCount(): int;
getEventCharater(): char;
getEventKey(): int;
};
declare const Keyboard: Keyboard;
interface Iterator<T> {
hasNext(): boolean;
next(): T;
remove(): void;
forEachRemaining(func: (el: T) => void);
}
interface Iterable<T> {
iterator(): Iterator<T>;
forEach(func: (el: T) => void);
}
class BufferedImage {
// TODO:
}
/**
* A generic 3-element tuple that is represented by single precision-floating
* point x,y,z coordinates.
*/
interface Tuple3<T extends number> {
x: T;
y: T;
z: T;
/**
* Returns a string that contains the values of this Tuple3f.
* The form is (x,y,z).
* @return the String representation
*/
toString(): string;
set(x: T, y: T, z: T): void;
set(t: T[]): void;
set(t1: Tuple3f): void;
get(t: Tuple3f): void;
add(t1: Tuple3f): void;
add(t1: Tuple3f, t2: Tuple3f): void;
sub(t1: Tuple3f): void;
sub(t1: Tuple3f, t2: Tuple3f): void;
negate(t: Tuple3f): void
negate(): void;
scale(s: T, t: Tuple3f): void;
scale(s: T);
scaleAdd(s: T, t1: Tuple3f, t2: Tuple3f): void;
scaleAdd(s: T, t: Tuple3f): void;
equals(o: any): boolean;
clamp(min: T, max: T, t: Tuple3f): void;
clampMin(min: T, t: Tuple3f): void;
clampMax(max: T, t: Tuple3f): void;
absolute(t: Tuple3f): void;
clamp(min: T, max: T): void;
clampMin(min: T): void;
clampMax(max: T): void;
absolute(): void;
getX(): T;
getY(): T;
getZ(): T;
setX(x: T): void;
setY(y: T): void;
setZ(z: T): void;
}
interface Vector3<T extends number> extends Tuple3<T> {
lengthSquared(): T;
length(): T;
cross(v1: Vector3<T>, v2: Vector3<T>): void;
dot(v: Vector3<T>): void;
normalize(v: Vector3<T>): void;
normalize(): void;
angle(v: Vector3<T>): void;
}
interface Tuple2<T extends number> {
// TODO:
}
interface Vector2<T extends number> extends Tuple2<T> {
// TODO:
}
type Vector3d = Vector3<double>;
type Vector3f = Vector3<float>;
type Tuple3f = Tuple3<float>;
type Vector2d = Vector2<double>;
type Vector2f = Vector2<float>;
//#endregion
///////////////////////
// MINECRAFT CLASSES //
///////////////////////
//#region Minecraft Classes
interface ISoundCategory<Name extends string, Id extends int> {
getCategoryName(): Name;
getCategoryId(): Id;
getCategory(name: string): ISoundCategory<string, int>;
}
namespace SoundCategory {
declare const MASTER: ISoundCategory<'master', 0>;
declare const MUSIC: ISoundCategory<'music', 1>;
declare const RECORDS: ISoundCategory<'records', 2>;
declare const WEATHER: ISoundCategory<'weather', 3>;
declare const BLOCKS: ISoundCategory<'blocks', 4>;
declare const MOBS: ISoundCategory<'hostile', 5>;
declare const ANIMALS: ISoundCategory<'neutral', 6>;
declare const PLAYERS: ISoundCategory<'player', 7>;
declare const AMBIENT: ISoundCategory<'ambient', 8>;
}
type SoundCategoryStrings = keyof typeof SoundCategory;
//#endregion
////////////////////////
// OBFUSCATED CLASSES //
////////////////////////
//#region
// Basically just an annotation, acts as any but lets the user
// know the name of the returned class, and that it is obfuscated.
type ObfuscatedClass<T extends string> = {
[key: string]: any;
}
type ObfGuiScreen = ObfuscatedClass<'net.minecraft.client.gui.GuiScreen'>;
type ObfPacket = ObfuscatedClass<'net.minecraft.network.Packet'>;
type ObfEvent = ObfuscatedClass<'net.minecraftforge.fml.common.eventhandler.Event'>;
type ObfIChatComponent = ObfuscatedClass<'net.minecraft.util.IChatComponent'>;
type ObfMouseEvent = ObfuscatedClass<'net.minecraftforge.client.event.MouseEvent'>;
type ObfClientChatReceivedEvent = ObfuscatedClass<'net.minecraftforge.client.event.ClientChatReceivedEvent'>;
type ObfPlaySoundEvent = ObfuscatedClass<'net.minecraftforge.client.event.sound.PlaySoundEvent'>;
type ObfOnConfigChangedEvent = ObfuscatedClass<'net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent'>;
type ObfFontRenderer = ObfuscatedClass<'net.minecraft.client.gui.FontRenderer'>;
type ObfNBTTagList = ObfuscatedClass<'net.minecraft.nbt.NBTTagList'>;
type ObfKeyBinding = ObfuscatedClass<'net.minecraft.client.settings.KeyBinding'>;
type ObfDynamicTexture = ObfuscatedClass<'net.minecraft.client.renderer.texture.DynamicTexture'>;
type ObfEntityPlayer = ObfuscatedClass<'net.minecraft.entity.player.EntityPlayer'>;
type ObfMinecraft = ObfuscatedClass<'net.minecraft.client.Minecraft'>;
type ObfNetHandlerPlayClient = ObfuscatedClass<'net.minecraft.client.network.NetHandlerPlayClient'>;
type ObfGuiNewChat = ObfuscatedClass<'net.minecraft.client.gui.GuiNewChat'>;
type ObfGuiPlayerTabOverlay = ObfuscatedClass<'net.minecraft.client.gui.GuiPlayerTabOverlay'>;
type ObfPacket = ObfuscatedClass<'net.minecraft.network.Packet'>;
type ObfGameSettings = ObfuscatedClass<'net.minecraft.client.settings.GameSettings'>;
type ObfEnumPlayerModelParts = ObfuscatedClass<'net.minecraft.entity.player.EnumPlayerModelParts'>;
type ObfEnumChatVisibility = ObfuscatedClass<'net.minecraft.entity.player.EntityPlayer.EnumChatVisibility'>;
type ObfEntityPlayerSP = ObfuscatedClass<'net.minecraft.client.entity.EntityPlayerSP'>;
type ObfWorldClient = ObfuscatedClass<'net.minecraft.client.multiplayer.WorldClient'>;
type ObfIInventory = ObfuscatedClass<'net.minecraft.inventory.IInventory'>;
type ObfContainer = ObfuscatedClass<'net.minecraft.inventory.Container'>;
type ObfItem = ObfuscatedClass<'net.minecraft.items.Item'>;
type ObfItemStack = ObfuscatedClass<'net.minecraft.items.ItemStack'>;
//#endregion
//////////////
// TRIGGERS //
//////////////
//#region Triggers
/**
* Lowest is ran last
*/
declare enum Priority {
HIGHEST, HIGH, NORMAL, LOW, LOWEST
}
namespace OnTrigger {
/**
* Lowest is ran last
*/
declare enum Priority {
HIGHEST, HIGH, NORMAL, LOW, LOWEST
}
}
declare interface OnTrigger {
/**
* Sets a triggers priority using Priority.
* Highest runs first.
* @param priority the priority of the trigger
* @return the trigger for method chaining
*/
setPriority(priority: Priority): this;
/**
* Registers a trigger based on its type.
* This is done automatically with TriggerRegister.
* @return the trigger for method chaining
*/
register(): this;
/**
* Unregisters a trigger.
* @return the trigger for method chaining
*/
unregister(): this;
}
declare interface OnChatTrigger extends OnTrigger {
/**
* Sets if the chat trigger should run if the chat event has already been canceled.
* True by default.
* @param bool Boolean to set
* @return the trigger object for method chaining
*/
triggerIfCanceled(trigger: boolean): this;
/**
* Sets the chat criteria for `.matchesChatCriteria`.
* Arguments for the trigger's method can be passed in using ${variable}.
* Example: `OnChatTrigger.setChatCriteria("<${name}> ${message}");`
* Use ${*} to match a chat message but ignore the pass through.
* @param chatCriteria the chat criteria to set
* @return the trigger object for method chaining
*/
setChatCriteria(criteria: string | RegExp): this;
/**
* Alias for .setChatCriteria.
* @param chatCriteria the chat criteria to set
* @return the trigger object for method chaining
*/
setCriteria(criteria: string | RegExp): this;
/**
* Sets the chat parameter for `Parameter`.
* Clears current parameter list.
* @param parameter the chat parameter to set
* @return the trigger object for method chaining
*/
setParameter(parameter: string): this;
/**
* Sets multiple chat parameters for `Parameter`.
* Clears current parameter list.
* @param parameters the chat parameters to set
* @return the trigger object for method chaining
*/
setParameters(...parameters: string[]): this;
/**
* Adds chat parameter for `Parameter`.
* @param parameter the chat parameter to add
* @return the trigger object for method chaining
*/
addParameter(parameter: string): this;
/**
* Adds multiple chat parameters for `Parameter`.
* @param parameters the chat parameters to add
* @return the trigger object for method chaining
*/
addParameters(...parameters: string[]): this;
/**
* Adds the "start" parameter
* @return the trigger object for method chaining
*/
setStart(): this;
/**
* Adds the "contains" parameter
* @return the trigger object for method chaining
*/
setContains(): this;
/**
* Adds the "end" parameter
* @return the trigger object for method chaining
*/
setEnd(): this;
/**
* Makes the trigger match the entire chat message
* @return the trigger object for method chaining
*/
setExact(): this;
/**
* Makes the chat criteria case insensitive
* @return the trigger object for method chaining
*/
setCaseInsensitive(): this;
}
declare interface OnCommandTrigger extends OnTrigger {
/**
* Sets the command name.
* Example:
* OnCommandTrigger.setCommandName("test")
* would result in the command being /test
*
* @param commandName The command name
* @return the trigger for additional modification
*/
setCommandName(name: string): this;
/**
* Alias for .setCommandName
*
* @param commandName The command name
* @return the trigger for additional modification
*/
setName(name: string): this;
}
declare interface OnRegularTrigger extends OnTrigger { };
declare interface OnRenderTrigger extends OnTrigger {
/**
* Sets if the render trigger should run if the event has already been canceled.
* True by default.
* @param bool Boolean to set
* @return the trigger object for method chaining
*/
triggerIfCanceled(trigger: boolean): this;
}
declare interface OnSoundPlayTrigger extends OnTrigger {
soundNameCriteria: string;
/**
* Sets the sound name criteria.
* Short hand for `OnSoundPlayTrigger.setSoundNameCriteria`.
*
* @param soundNameCriteria the sound name
* @return the trigger for method chaining
*/
setCriteria(soundNameCriteria: string): this;
}
declare interface OnStepTrigger extends OnTrigger {
/**
* Sets the frames per second that the trigger activates.
* This has a maximum one step per second.
* @param fps the frames per second to set
* @return the trigger for method chaining
*/
setFps(fps: Long): this;
/**
* Sets the delay in seconds between the trigger activation.
* This has a minimum of one step every second. This will override `.setFps`.
* @param delay The delay in seconds
* @return the trigger for method chaining
*/
setDelay(delay: Long): this;
}
//#endregion
////////////
// ENGINE //
////////////
//#region Engine
interface CallbackInfoReturnable { }
interface CancellableEvent {
setCanceled(canceled: boolean): void;
setCancelled(cancelled: boolean): void;
isCancelable(): boolean;
isCancellable(): boolean;
isCanceled(): boolean;
isCancelled(): boolean;
}
declare enum InteractAction {
RIGHT_CLICK_BLOCK,
RIGHT_CLICK_EMPTY,
LEFT_CLICK_BLOCK,
RIGHT_CLICK_ENTITY,
RIGHT_CLICK_ITEM,
LEFT_CLICK_EMPTY,
UNKNOWN
}
interface EnumParticleTypes {
// TODO
}
enum Octave {
LOW,
MID,
HIGH
}
//#region IRegister
type TriggerTypeRenderOther = 'renderOverlay' | 'renderPlayerList' |
'renderCrosshair' | 'renderDebug' | 'renderBossHealth' | 'renderHealth' |
'renderArmor' | 'renderFood' | 'renderMountHealth' | 'renderExperience' |
'renderHotbar' | 'renderAir';
type ChatTriggerFunc = (...chatVariables: string[], event: ObfClientChatReceivedEvent) => void;
type CommandTriggerFunc = (...args: string[]) => void;
type SoundPlayTriggerFunc = (position: Vector3f, name: string, volume: float, pitch: float, category: SoundCategory, event: Event) => void;
type StepTriggerFunc = (steps: Long) => void;
type TickTriggerFunc = (ticks: Long) => void;
type RenderWorldFunc = (partialTicks: float) => void;
type RenderEntityFunc = (entity: Entity, position: Vector3d, partialTicks: float, event: CallbackInfoReturnable) => void;
type RenderOtherFunc = (event: CallbackInfoReturnable) => void;
type ClickedFunc = (x: Float, y: Float, button: Int, buttonIsDown: boolean) => void;
type DraggedFunc = (deltaX: Float, deltaY: Float, x: Float, y: Float, mouseButton: Int) => void;
type GuiOpenedFunc = (event: Event) => void;
type ScreenshotTakenFunc = (fileName: string, event: CallbackInfoReturnable) => void;
type PickupItemFunc = (item: Item, player: PlayerMP, position: Vector3d, motion: Vector3d, event: Event) => void;
type DropItemFunc = (item: Item, player: PlayerMP, event: CancellableEvent) => void;
type MessageSentFunc = (message: string, event: CallbackInfoReturnable) => void;
type ItemTooltipFunc = (lines: string[], item: Item, event: CancellableEvent) => void;
type PlayerInteractFunc = (action: InteractAction, position: Vector3d, event: Event) => void;
type GuiRenderFunc = (mouseX: int, mouseY: int, gui: ObfGuiScreen) => void;
type GuiKeyFunc = (eventCharacter: char, eventKey: int, gui: ObfGuiScreen, event: CallbackInfoReturnable) => void;
type GuiMouseClickFunc = (mouseX: int, mouseY: int, mouseButton: int, gui: ObfGuiScreen, event: CallbackInfoReturnable) => void;
type GuiMouseReleaseFunc = GuiMouseClickFunc;
type GuiMouseDragFunc = GuiMouseClickFunc;
type ChatComponentClickedFunc = (component: TextComponent, event: CallbackInfoReturnable) => void;
type ChatComponentHoveredFunc = (component: TextComponent, x: int, y: int, event: CallbackInfoReturnable) => void;
type PacketSentFunc = (packet: ObfPacket, event: CallbackInfoReturnable) => void;
type DrawBlockHighlightFunc = (position: Vector3d, event: Event) => void;
type PlayerJoinedFunc = (player: PlayerMP) => void;
type PlayerLeftFunc = PlayerJoinedFunc;
type NoteBlockPlayFunc = (position: Vector3d, noteName: string, octave: Octave, event: Event) => void;
type NoteBlockChangeFunc = NoteBlockPlayFunc;
type BlockBreakFunc = (block: Block, player: PlayerMP, event: Event) => void;
type SpawnParticleFunc = (particle: Particle, particleType: EnumParticleTypes, event: CallbackInfoReturnable) => void;
interface IRegisterFunction {
/**
* Registers a new trigger that runs before a chat message is received.
*
* Passes through multiple arguments:
* - Any number of chat criteria variables
* - The chat event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger#triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnChatTrigger.setChatCriteria` Sets the chat criteria
* - `OnChatTrigger.setParameter` Sets the chat parameter
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'chat', method: ChatTriggerFunc): OnChatTrigger;
/**
* Registers a new trigger that runs before an action bar message is received.
*
* Passes through multiple arguments:
* - Any number of chat criteria variables
* - The chat event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnChatTrigger.setChatCriteria` Sets the chat criteria
* - `OnChatTrigger.setParameter` Sets the chat parameter
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'actionBar', method: ChatTriggerFunc): OnChatTrigger;
/**
* Registers a new command that will run the method provided.
*
* Passes through multiple arguments:
* - The arguments supplied to the command by the user
*
* Available modifications:
* - `OnCommandTrigger.setCommandName` Sets the command name
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'command', method: CommandTriggerFunc): OnCommandTrigger;
/**
* Registers a new trigger that runs before a sound is played.
*
* Passes through six arguments:
* - The sound event's position
* - The sound event's name
* - The sound event's volume
* - The sound event's pitch
* - The sound event's category's name
* - The sound event, which can be cancelled
*
* Available modifications:
* - `OnSoundPlayTrigger.setCriteria` Sets the sound name criteria
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'soundPlay', method: SoundPlayTriggerFunc): OnSoundPlayTrigger;
/**
* Registers a new trigger that runs in predictable intervals. (60 per second by default)
*
* Passes through one argument:
* - Steps elapsed
*
* Available modifications:
* - `OnStepTrigger.setFps` Sets the fps, ie. how many times this trigger will fire
* per second
* - `OnStepTrigger.setDelay` Sets the delay in seconds, ie how many seconds it take
* to fire. Overrides `OnStepTrigger.setFps`.
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'step', method: StepTriggerFunc): OnStepTrigger;
/**
* Registers a new trigger that runs before every game tick.
*
* Passes through one argument:
* - Ticks elapsed
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'tick', method: TickTriggerFunc): OnRegularTrigger;
/**
* Registers a new trigger that runs before the world is drawn.
*
* Passes through one argument:
* - Partial ticks elapsed
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderWorld', method: RenderWorldFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs whenever an entity is rendered
*
* Passes through four arguments:
* - The `Entity`
* - The position as a Vector3d
* - The partial ticks
* - The event, which can be cancelled
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderEntity', method: RenderEntityFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the overlay is drawn.
*
* Passes through one argument:
* - The render event, which cannot be cancelled
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderOverlay', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the player list is being drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderPlayerList', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the crosshair is being drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderCrosshair', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a trigger that runs before the debug screen is being drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderDebug', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the boss health bar is being drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderBossHealth', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the player's health is being drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderHealth', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the player's armor bar is drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderArmor', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the player's food is being drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderFood', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the player's mount's health is being drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderMountHealth', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the player's experience is being drawn.
*
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderExperience', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the player's hotbar is drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderHotbar', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the player's air level is drawn.
*
* Passes through one argument:
* - The render event, which can be cancelled
*
* Available modifications:
* - `OnRenderTrigger.triggerIfCanceled` Sets if triggered if event is already cancelled
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'renderAir', method: RenderOtherFunc): OnRenderTrigger;
/**
* Registers a new trigger that runs before the block highlight box is drawn.
*
* Passes through two arguments:
* - The draw block highlight event's position
* - The draw block highlight event, which can be cancelled
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'drawBlockHighlight', method: DrawBlockHighlightFunc): OnRegularTrigger;
/**
* Registers a new trigger that runs after the game loads.
*
* This runs after the initial loading of the game directly after scripts are
* loaded and after "/ct loadExtra" happens.
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'gameLoad', method: () => void): OnRegularTrigger;
/**
* Registers a new trigger that runs before the game unloads.
*
* This runs before shutdown of the JVM and before "/ct loadExtra" happens.
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'gameUnload', method: () => void): OnRegularTrigger;
/**
* Registers a new trigger that runs before a mouse button is being pressed or released.
*
* Passes through four arguments:
* - The mouse x position
* - The mouse y position
* - The mouse button
* - The mouse button state (true if button is pressed, false otherwise)
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority
*
* @param method The name of the method to callback when the event is fired
* @return The trigger for additional modification
*/
(triggerType: 'clicked', method: ClickedFunc): OnRegularTrigger;
/**
* Registers a new trigger that runs while a mouse button is being held down.
*
* Passes through five arguments:
* - The mouse delta x position (relative to last frame)
* - The mouse delta y position (relative to last frame)
* - The mouse x position
* - The mouse y position
* - The mouse button
*
* Available modifications:
* - `OnTrigger.setPriority` Sets the priority