isaacscript-common 15.4.1 → 15.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/index.d.ts +197 -95
  2. package/dist/isaacscript-common.lua +1019 -549
  3. package/dist/src/callbackClasses.d.ts +101 -0
  4. package/dist/src/callbackClasses.d.ts.map +1 -0
  5. package/dist/src/callbackClasses.lua +502 -0
  6. package/dist/src/callbacks.d.ts +101 -190
  7. package/dist/src/callbacks.d.ts.map +1 -1
  8. package/dist/src/callbacks.lua +101 -285
  9. package/dist/src/classes/callbacks/EntityTakeDmgFilter.d.ts +9 -0
  10. package/dist/src/classes/callbacks/EntityTakeDmgFilter.d.ts.map +1 -0
  11. package/dist/src/classes/callbacks/EntityTakeDmgFilter.lua +27 -0
  12. package/dist/src/classes/callbacks/PostNPCDeathFilter.d.ts +9 -0
  13. package/dist/src/classes/callbacks/PostNPCDeathFilter.d.ts.map +1 -0
  14. package/dist/src/classes/callbacks/PostNPCDeathFilter.lua +23 -0
  15. package/dist/src/classes/callbacks/PostNPCRenderFilter.d.ts +9 -0
  16. package/dist/src/classes/callbacks/PostNPCRenderFilter.d.ts.map +1 -0
  17. package/dist/src/classes/callbacks/PostNPCRenderFilter.lua +23 -0
  18. package/dist/src/classes/callbacks/PreNPCCollisionFilter.d.ts +9 -0
  19. package/dist/src/classes/callbacks/PreNPCCollisionFilter.d.ts.map +1 -0
  20. package/dist/src/classes/callbacks/PreNPCCollisionFilter.lua +21 -0
  21. package/dist/src/classes/callbacks/PreNPCUpdateFilter.d.ts +9 -0
  22. package/dist/src/classes/callbacks/PreNPCUpdateFilter.d.ts.map +1 -0
  23. package/dist/src/classes/callbacks/PreNPCUpdateFilter.lua +21 -0
  24. package/dist/src/enums/ModCallbackCustom.d.ts +160 -95
  25. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  26. package/dist/src/enums/ModCallbackCustom.lua +105 -95
  27. package/dist/src/functions/rooms.d.ts +6 -0
  28. package/dist/src/functions/rooms.d.ts.map +1 -1
  29. package/dist/src/functions/rooms.lua +15 -2
  30. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +30 -0
  31. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  32. package/dist/src/shouldFire.d.ts +8 -1
  33. package/dist/src/shouldFire.d.ts.map +1 -1
  34. package/dist/src/shouldFire.lua +5 -0
  35. package/package.json +1 -1
  36. package/src/callbackClasses.ts +103 -0
  37. package/src/callbacks.ts +105 -190
  38. package/src/classes/callbacks/EntityTakeDmgFilter.ts +25 -0
  39. package/src/classes/callbacks/PostNPCDeathFilter.ts +21 -0
  40. package/src/classes/callbacks/PostNPCRenderFilter.ts +21 -0
  41. package/src/classes/callbacks/PreNPCCollisionFilter.ts +20 -0
  42. package/src/classes/callbacks/PreNPCUpdateFilter.ts +19 -0
  43. package/src/enums/ModCallbackCustom.ts +70 -0
  44. package/src/functions/rooms.ts +11 -0
  45. package/src/interfaces/private/AddCallbackParametersCustom.ts +45 -0
  46. package/src/shouldFire.ts +25 -1
package/dist/index.d.ts CHANGED
@@ -84,6 +84,12 @@ export declare const ADD_CALLBACK_ARGS_KEY = "__addCallbackArgs";
84
84
  export declare const ADD_CALLBACK_CUSTOM_ARGS_KEY = "__addCallbackCustomArgs";
85
85
 
86
86
  declare interface AddCallbackParametersCustom {
87
+ [ModCallbackCustom.ENTITY_TAKE_DMG_FILTER]: [
88
+ callback: (entity: Entity, amount: float, damageFlags: BitFlags<DamageFlag>, source: EntityRef, countdownFrames: int) => boolean | undefined,
89
+ entityType?: EntityType,
90
+ variant?: number,
91
+ subType?: number
92
+ ];
87
93
  [ModCallbackCustom.POST_AMBUSH_FINISHED]: [
88
94
  callback: (ambushType: AmbushType) => void,
89
95
  ambushType?: AmbushType
@@ -271,6 +277,12 @@ declare interface AddCallbackParametersCustom {
271
277
  [ModCallbackCustom.POST_NEW_LEVEL_REORDERED]: [callback: () => void];
272
278
  [ModCallbackCustom.POST_NEW_ROOM_EARLY]: [callback: () => void];
273
279
  [ModCallbackCustom.POST_NEW_ROOM_REORDERED]: [callback: () => void];
280
+ [ModCallbackCustom.POST_NPC_DEATH_FILTER]: [
281
+ callback: (npc: EntityNPC) => void,
282
+ entityType?: EntityType,
283
+ variant?: int,
284
+ subType?: int
285
+ ];
274
286
  [ModCallbackCustom.POST_NPC_INIT_FILTER]: [
275
287
  callback: (npc: EntityNPC) => void,
276
288
  entityType?: EntityType,
@@ -283,6 +295,12 @@ declare interface AddCallbackParametersCustom {
283
295
  variant?: int,
284
296
  subType?: int
285
297
  ];
298
+ [ModCallbackCustom.POST_NPC_RENDER_FILTER]: [
299
+ callback: (npc: EntityNPC, renderOffset: Vector) => void,
300
+ entityType?: EntityType,
301
+ variant?: int,
302
+ subType?: int
303
+ ];
286
304
  [ModCallbackCustom.POST_NPC_STATE_CHANGED]: [
287
305
  callback: (npc: EntityNPC, previousState: int, currentState: int) => void,
288
306
  entityType?: EntityType,
@@ -508,6 +526,18 @@ declare interface AddCallbackParametersCustom {
508
526
  trinketType?: TrinketType
509
527
  ];
510
528
  [ModCallbackCustom.PRE_NEW_LEVEL]: [callback: (player: EntityPlayer) => void];
529
+ [ModCallbackCustom.PRE_NPC_COLLISION_FILTER]: [
530
+ callback: (npc: EntityNPC, collider: Entity, low: boolean) => undefined | boolean,
531
+ entityType?: EntityType,
532
+ variant?: int,
533
+ subType?: int
534
+ ];
535
+ [ModCallbackCustom.PRE_NPC_UPDATE_FILTER]: [
536
+ callback: (npc: EntityNPC) => undefined | boolean,
537
+ entityType?: EntityType,
538
+ variant?: int,
539
+ subType?: int
540
+ ];
511
541
  }
512
542
 
513
543
  /**
@@ -7653,6 +7683,13 @@ export declare function isRoomInsideGrid(roomGridIndex?: int): boolean;
7653
7683
  */
7654
7684
  export declare function isRoomShapeDoubleCharge(roomShape: RoomShape): boolean;
7655
7685
 
7686
+ /**
7687
+ * Helper function to check if the current room matches one of the given room types.
7688
+ *
7689
+ * This function is variadic, which means you can pass as many room types as you want to match for.
7690
+ */
7691
+ export declare function isRoomType(...roomTypes: RoomType[]): boolean;
7692
+
7656
7693
  /** Returns true for cards that have `CardType.RUNE`. */
7657
7694
  export declare function isRune(cardType: CardType): boolean;
7658
7695
 
@@ -8504,6 +8541,19 @@ export declare const MINUTE_IN_MILLISECONDS: number;
8504
8541
  * - You must upgrade your mod with the `upgradeMod` helper function before using a custom callback.
8505
8542
  */
8506
8543
  export declare enum ModCallbackCustom {
8544
+ /**
8545
+ * The exact same thing as the vanilla `ENTITY_TAKE_DMG` callback, except this callback allows you
8546
+ * to specify extra arguments for additional filtration.
8547
+ *
8548
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
8549
+ * - You can provide an optional third argument that will make the callback only fire if it
8550
+ * matches the `EntityType` provided.
8551
+ * - You can provide an optional fourth argument that will make the callback only fire if it
8552
+ * matches the variant provided.
8553
+ * - You can provide an optional fifth argument that will make the callback only fire if it
8554
+ * matches the sub-type provided.
8555
+ */
8556
+ ENTITY_TAKE_DMG_FILTER = 0,
8507
8557
  /**
8508
8558
  * Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is started.
8509
8559
  * Specifically, this happens on the first frame that `Room.IsAmbushDone` is true.
@@ -8516,7 +8566,7 @@ export declare enum ModCallbackCustom {
8516
8566
  * function postAmbushFinished(ambushType: AmbushType): void {}
8517
8567
  * ```
8518
8568
  */
8519
- POST_AMBUSH_FINISHED = 0,
8569
+ POST_AMBUSH_FINISHED = 1,
8520
8570
  /**
8521
8571
  * Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is completed.
8522
8572
  * Specifically, this happens on the first frame that `Room.IsAmbushActive` is true.
@@ -8529,7 +8579,7 @@ export declare enum ModCallbackCustom {
8529
8579
  * function postAmbushStarted(ambushType: AmbushType): void {}
8530
8580
  * ```
8531
8581
  */
8532
- POST_AMBUSH_STARTED = 1,
8582
+ POST_AMBUSH_STARTED = 2,
8533
8583
  /**
8534
8584
  * Fires on the `POST_BOMB_UPDATE` callback that it explodes.
8535
8585
  *
@@ -8543,7 +8593,7 @@ export declare enum ModCallbackCustom {
8543
8593
  * function postBombDetonated(bomb: EntityBomb): void {}
8544
8594
  * ```
8545
8595
  */
8546
- POST_BOMB_EXPLODED = 2,
8596
+ POST_BOMB_EXPLODED = 3,
8547
8597
  /**
8548
8598
  * Fires on the first `POST_BOMB_UPDATE` frame for each bomb.
8549
8599
  *
@@ -8560,7 +8610,7 @@ export declare enum ModCallbackCustom {
8560
8610
  * function postBombInitLate(bomb: EntityBomb): void {}
8561
8611
  * ```
8562
8612
  */
8563
- POST_BOMB_INIT_LATE = 3,
8613
+ POST_BOMB_INIT_LATE = 4,
8564
8614
  /**
8565
8615
  * Fires from the `POST_RENDER` callback when one of Forgotten's bone clubs is swung or thrown.
8566
8616
  *
@@ -8568,7 +8618,7 @@ export declare enum ModCallbackCustom {
8568
8618
  * function postBoneSwing(boneClub: EntityKnife): void {}
8569
8619
  * ```
8570
8620
  */
8571
- POST_BONE_SWING = 4,
8621
+ POST_BONE_SWING = 5,
8572
8622
  /**
8573
8623
  * Fires from the `POST_PICKUP_UPDATE` callback when a collectible goes from a non-zero sub-type
8574
8624
  * to `CollectibleType.NULL` (i.e. an "empty" pedestal).
@@ -8584,7 +8634,7 @@ export declare enum ModCallbackCustom {
8584
8634
  * ): void {}
8585
8635
  * ```
8586
8636
  */
8587
- POST_COLLECTIBLE_EMPTY = 5,
8637
+ POST_COLLECTIBLE_EMPTY = 6,
8588
8638
  /**
8589
8639
  * Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
8590
8640
  * respective collectible on the run. For more details on how this is calculated, see the
@@ -8602,7 +8652,7 @@ export declare enum ModCallbackCustom {
8602
8652
  * function postCollectibleInitLate(collectible: EntityPickupCollectible): void {}
8603
8653
  * ```
8604
8654
  */
8605
- POST_COLLECTIBLE_INIT_FIRST = 6,
8655
+ POST_COLLECTIBLE_INIT_FIRST = 7,
8606
8656
  /**
8607
8657
  * Fires from the `POST_PLAYER_RENDER` callback on the first frame that the "TeleportUp" animation
8608
8658
  * begins playing after a player triggers a Cursed Eye teleport or a Cursed Skull teleport. (Both
@@ -8618,7 +8668,7 @@ export declare enum ModCallbackCustom {
8618
8668
  * function postCursedTeleport(player: EntityPlayer): void {}
8619
8669
  * ```
8620
8670
  */
8621
- POST_CURSED_TELEPORT = 7,
8671
+ POST_CURSED_TELEPORT = 8,
8622
8672
  /**
8623
8673
  * Fires from the `POST_PLAYER_UPDATE` callback after the player has finished the death animation,
8624
8674
  * has teleported to the previous room, and is ready to play the animation for the modded revival
@@ -8636,7 +8686,7 @@ export declare enum ModCallbackCustom {
8636
8686
  * function postCustomRevive(player: EntityPlayer, revivalType: int): void {}
8637
8687
  * ```
8638
8688
  */
8639
- POST_CUSTOM_REVIVE = 8,
8689
+ POST_CUSTOM_REVIVE = 9,
8640
8690
  /**
8641
8691
  * Fires from the `EFFECT_POST_UPDATE` callback after a player has entered the range of a Dice
8642
8692
  * Room floor.
@@ -8652,7 +8702,7 @@ export declare enum ModCallbackCustom {
8652
8702
  * ): void {}
8653
8703
  * ```
8654
8704
  */
8655
- POST_DICE_ROOM_ACTIVATED = 9,
8705
+ POST_DICE_ROOM_ACTIVATED = 10,
8656
8706
  /**
8657
8707
  * Fires from the `POST_RENDER` callback on every frame that a door exists.
8658
8708
  *
@@ -8664,7 +8714,7 @@ export declare enum ModCallbackCustom {
8664
8714
  * function postDoorRender(door: GridEntityDoor): void {}
8665
8715
  * ```
8666
8716
  */
8667
- POST_DOOR_RENDER = 10,
8717
+ POST_DOOR_RENDER = 11,
8668
8718
  /**
8669
8719
  * Fires from the `POST_UPDATE` callback on every frame that a door exists.
8670
8720
  *
@@ -8676,7 +8726,7 @@ export declare enum ModCallbackCustom {
8676
8726
  * function postDoorUpdate(door: GridEntityDoor): void {}
8677
8727
  * ```
8678
8728
  */
8679
- POST_DOOR_UPDATE = 11,
8729
+ POST_DOOR_UPDATE = 12,
8680
8730
  /**
8681
8731
  * Fires on the first `POST_EFFECT_UPDATE` frame for each effect.
8682
8732
  *
@@ -8693,7 +8743,7 @@ export declare enum ModCallbackCustom {
8693
8743
  * function postEffectInitLate(effect: EntityEffect): void {}
8694
8744
  * ```
8695
8745
  */
8696
- POST_EFFECT_INIT_LATE = 12,
8746
+ POST_EFFECT_INIT_LATE = 13,
8697
8747
  /**
8698
8748
  * Fires from the `POST_EFFECT_UPDATE` callback when an effect's state has changed from what it
8699
8749
  * was on the previous frame. (In this context, "state" refers to the `EntityEffect.State` field.)
@@ -8712,7 +8762,7 @@ export declare enum ModCallbackCustom {
8712
8762
  * ): void {}
8713
8763
  * ```
8714
8764
  */
8715
- POST_EFFECT_STATE_CHANGED = 13,
8765
+ POST_EFFECT_STATE_CHANGED = 14,
8716
8766
  /**
8717
8767
  * Fires one `POST_UPDATE` frame after the player has used the Esau Jr. item. (The player is not
8718
8768
  * updated to the new character until a game frame has passed.)
@@ -8721,7 +8771,7 @@ export declare enum ModCallbackCustom {
8721
8771
  * function postEsauJr(player: EntityPlayer): void {}
8722
8772
  * ```
8723
8773
  */
8724
- POST_ESAU_JR = 14,
8774
+ POST_ESAU_JR = 15,
8725
8775
  /**
8726
8776
  * Fires on the first `FAMILIAR_UPDATE` frame for each familiar.
8727
8777
  *
@@ -8738,7 +8788,7 @@ export declare enum ModCallbackCustom {
8738
8788
  * function postFamiliarInitLate(familiar: EntityFamiliar): void {}
8739
8789
  * ```
8740
8790
  */
8741
- POST_FAMILIAR_INIT_LATE = 15,
8791
+ POST_FAMILIAR_INIT_LATE = 16,
8742
8792
  /**
8743
8793
  * Fires from the `POST_FAMILIAR_UPDATE` callback when a familiar's state has changed from what it
8744
8794
  * was on the previous frame. (In this context, "state" refers to the `EntityFamiliar.State`
@@ -8758,7 +8808,7 @@ export declare enum ModCallbackCustom {
8758
8808
  * ): void {}
8759
8809
  * ```
8760
8810
  */
8761
- POST_FAMILIAR_STATE_CHANGED = 16,
8811
+ POST_FAMILIAR_STATE_CHANGED = 17,
8762
8812
  /**
8763
8813
  * Fires one `POST_UPDATE` frame after the player has first used the Esau Jr. item. (The player is
8764
8814
  * not updated to the new character until a game frame has passed.)
@@ -8770,7 +8820,7 @@ export declare enum ModCallbackCustom {
8770
8820
  * function postFirstEsauJr(player: EntityPlayer): void {}
8771
8821
  * ```
8772
8822
  */
8773
- POST_FIRST_ESAU_JR = 17,
8823
+ POST_FIRST_ESAU_JR = 18,
8774
8824
  /**
8775
8825
  * Fires after the player has used the Flip item for the first time. Unlike the vanilla `USE_ITEM`
8776
8826
  * callback, this callback will return the player object for the new Lazarus (not the one who used
@@ -8783,7 +8833,7 @@ export declare enum ModCallbackCustom {
8783
8833
  * function postFirstFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
8784
8834
  * ```
8785
8835
  */
8786
- POST_FIRST_FLIP = 18,
8836
+ POST_FIRST_FLIP = 19,
8787
8837
  /**
8788
8838
  * Fires after the player has used the Flip item. Unlike the vanilla `USE_ITEM` callback, this
8789
8839
  * callback will return the player object for the new Lazarus (not the one who used the Flip
@@ -8796,7 +8846,7 @@ export declare enum ModCallbackCustom {
8796
8846
  * function postFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
8797
8847
  * ```
8798
8848
  */
8799
- POST_FLIP = 19,
8849
+ POST_FLIP = 20,
8800
8850
  /**
8801
8851
  * Similar to the vanilla callback of the same name, but fires in the correct order with respect
8802
8852
  * to the `POST_NEW_LEVEL` and the `POST_NEW_ROOM` callbacks:
@@ -8807,7 +8857,7 @@ export declare enum ModCallbackCustom {
8807
8857
  * function postGameStartedReordered(isContinued: boolean): void {}
8808
8858
  * ```
8809
8859
  */
8810
- POST_GAME_STARTED_REORDERED = 20,
8860
+ POST_GAME_STARTED_REORDERED = 21,
8811
8861
  /**
8812
8862
  * Similar to the `POST_GAME_STARTED_REORDERED` callback, but fires after all of the subscribed
8813
8863
  * callbacks have finished firing. Thus, you can use this callback to do perform things after a
@@ -8818,7 +8868,7 @@ export declare enum ModCallbackCustom {
8818
8868
  * function postGameStartedReorderedLast(isContinued: boolean): void {}
8819
8869
  * ```
8820
8870
  */
8821
- POST_GAME_STARTED_REORDERED_LAST = 21,
8871
+ POST_GAME_STARTED_REORDERED_LAST = 22,
8822
8872
  /**
8823
8873
  * Fires from the `POST_UPDATE` callback when the Greed Mode wave increases.
8824
8874
  *
@@ -8826,7 +8876,7 @@ export declare enum ModCallbackCustom {
8826
8876
  * function postGreedModeWave(oldWave: int, newWave: int): void {}
8827
8877
  * ```
8828
8878
  */
8829
- POST_GREED_MODE_WAVE = 22,
8879
+ POST_GREED_MODE_WAVE = 23,
8830
8880
  /**
8831
8881
  * Fires from the `POST_UPDATE` callback when a grid entity changes to a state that corresponds to
8832
8882
  * the broken state for the respective grid entity type. (For example, this will fire for a
@@ -8845,7 +8895,7 @@ export declare enum ModCallbackCustom {
8845
8895
  * function postGridEntityBroken(gridEntity: GridEntity): void {}
8846
8896
  * ```
8847
8897
  */
8848
- POST_GRID_ENTITY_BROKEN = 23,
8898
+ POST_GRID_ENTITY_BROKEN = 24,
8849
8899
  /**
8850
8900
  * Fires from the `POST_UPDATE` callback when a new entity collides with a grid entity. (After
8851
8901
  * this, the callback will not continue to fire. It will only fire again once the entity moves out
@@ -8873,7 +8923,7 @@ export declare enum ModCallbackCustom {
8873
8923
  * ): void {}
8874
8924
  * ```
8875
8925
  */
8876
- POST_GRID_ENTITY_COLLISION = 24,
8926
+ POST_GRID_ENTITY_COLLISION = 25,
8877
8927
  /**
8878
8928
  * The same as the `POST_GRID_ENTITY_BROKEN` callback, but only fires for grid entities created
8879
8929
  * with the `spawnCustomGridEntity` helper function.
@@ -8890,7 +8940,7 @@ export declare enum ModCallbackCustom {
8890
8940
  * ): void {}
8891
8941
  * ```
8892
8942
  */
8893
- POST_GRID_ENTITY_CUSTOM_BROKEN = 25,
8943
+ POST_GRID_ENTITY_CUSTOM_BROKEN = 26,
8894
8944
  /**
8895
8945
  * The same as the `POST_GRID_ENTITY_COLLISION` callback, but only fires for grid entities created
8896
8946
  * with the `spawnCustomGridEntity` helper function.
@@ -8914,7 +8964,7 @@ export declare enum ModCallbackCustom {
8914
8964
  * ): void {}
8915
8965
  * ```
8916
8966
  */
8917
- POST_GRID_ENTITY_CUSTOM_COLLISION = 26,
8967
+ POST_GRID_ENTITY_CUSTOM_COLLISION = 27,
8918
8968
  /**
8919
8969
  * The same as the `POST_GRID_ENTITY_INIT` callback, but only fires for grid entities created with
8920
8970
  * the `spawnCustomGridEntity` helper function.
@@ -8931,7 +8981,7 @@ export declare enum ModCallbackCustom {
8931
8981
  * ): void {}
8932
8982
  * ```
8933
8983
  */
8934
- POST_GRID_ENTITY_CUSTOM_INIT = 27,
8984
+ POST_GRID_ENTITY_CUSTOM_INIT = 28,
8935
8985
  /**
8936
8986
  * The same as the `POST_GRID_ENTITY_REMOVE` callback, but only fires for grid entities created
8937
8987
  * with the `spawnCustomGridEntity` helper function.
@@ -8948,7 +8998,7 @@ export declare enum ModCallbackCustom {
8948
8998
  * ): void {}
8949
8999
  * ```
8950
9000
  */
8951
- POST_GRID_ENTITY_CUSTOM_REMOVE = 28,
9001
+ POST_GRID_ENTITY_CUSTOM_REMOVE = 29,
8952
9002
  /**
8953
9003
  * The same as the `POST_GRID_ENTITY_RENDER` callback, but only fires for grid entities created
8954
9004
  * with the `spawnCustomGridEntity` helper function.
@@ -8965,7 +9015,7 @@ export declare enum ModCallbackCustom {
8965
9015
  * ): void {}
8966
9016
  * ```
8967
9017
  */
8968
- POST_GRID_ENTITY_CUSTOM_RENDER = 29,
9018
+ POST_GRID_ENTITY_CUSTOM_RENDER = 30,
8969
9019
  /**
8970
9020
  * The same as the `POST_GRID_ENTITY_STATE_CHANGED` callback, but only fires for grid entities
8971
9021
  * created with the `spawnCustomGridEntity` helper function.
@@ -8984,7 +9034,7 @@ export declare enum ModCallbackCustom {
8984
9034
  * ): void {}
8985
9035
  * ```
8986
9036
  */
8987
- POST_GRID_ENTITY_CUSTOM_STATE_CHANGED = 30,
9037
+ POST_GRID_ENTITY_CUSTOM_STATE_CHANGED = 31,
8988
9038
  /**
8989
9039
  * The same as the `POST_GRID_ENTITY_UPDATE` callback, but only fires for grid entities created
8990
9040
  * with the `spawnCustomGridEntity` helper function.
@@ -9001,7 +9051,7 @@ export declare enum ModCallbackCustom {
9001
9051
  * ): void {}
9002
9052
  * ```
9003
9053
  */
9004
- POST_GRID_ENTITY_CUSTOM_UPDATE = 31,
9054
+ POST_GRID_ENTITY_CUSTOM_UPDATE = 32,
9005
9055
  /**
9006
9056
  * Fires when a new grid entity is initialized. Specifically, this is either:
9007
9057
  *
@@ -9023,7 +9073,7 @@ export declare enum ModCallbackCustom {
9023
9073
  * function postGridEntityInit(gridEntity: GridEntity): void {}
9024
9074
  * ```
9025
9075
  */
9026
- POST_GRID_ENTITY_INIT = 32,
9076
+ POST_GRID_ENTITY_INIT = 33,
9027
9077
  /**
9028
9078
  * Fires from the `POST_UPDATE` callback when a new grid entity is removed. Specifically, this on
9029
9079
  * the frame after it no longer exists (where it did exist a frame ago).
@@ -9048,7 +9098,7 @@ export declare enum ModCallbackCustom {
9048
9098
  * ): void {}
9049
9099
  * ```
9050
9100
  */
9051
- POST_GRID_ENTITY_REMOVE = 33,
9101
+ POST_GRID_ENTITY_REMOVE = 34,
9052
9102
  /**
9053
9103
  * Fires from the `POST_RENDER` callback on every frame that a grid entity exists.
9054
9104
  *
@@ -9065,7 +9115,7 @@ export declare enum ModCallbackCustom {
9065
9115
  * function postGridEntityRender(gridEntity: GridEntity): void {}
9066
9116
  * ```
9067
9117
  */
9068
- POST_GRID_ENTITY_RENDER = 34,
9118
+ POST_GRID_ENTITY_RENDER = 35,
9069
9119
  /**
9070
9120
  * Fires from the `POST_UPDATE` callback when a grid entity changes its state. (In this context,
9071
9121
  * "state" refers to the `GridEntity.State` field.)
@@ -9087,7 +9137,7 @@ export declare enum ModCallbackCustom {
9087
9137
  * ): void {}
9088
9138
  * ```
9089
9139
  */
9090
- POST_GRID_ENTITY_STATE_CHANGED = 35,
9140
+ POST_GRID_ENTITY_STATE_CHANGED = 36,
9091
9141
  /**
9092
9142
  * Fires from the `POST_UPDATE` callback on every frame that a grid entity exists.
9093
9143
  *
@@ -9104,7 +9154,7 @@ export declare enum ModCallbackCustom {
9104
9154
  * function postGridEntityUpdate(gridEntity: GridEntity): void {}
9105
9155
  * ```
9106
9156
  */
9107
- POST_GRID_ENTITY_UPDATE = 36,
9157
+ POST_GRID_ENTITY_UPDATE = 37,
9108
9158
  /**
9109
9159
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when the player loses a Holy Mantle
9110
9160
  * temporary collectible effect.
@@ -9127,7 +9177,7 @@ export declare enum ModCallbackCustom {
9127
9177
  * ): void {}
9128
9178
  * ```
9129
9179
  */
9130
- POST_HOLY_MANTLE_REMOVED = 37,
9180
+ POST_HOLY_MANTLE_REMOVED = 38,
9131
9181
  /**
9132
9182
  * Fires from `POST_PEFFECT_UPDATE_REORDERED` callback when the player loses charge on their
9133
9183
  * active collectible item, implying that the item was just used.
@@ -9150,7 +9200,7 @@ export declare enum ModCallbackCustom {
9150
9200
  * ): void {}
9151
9201
  * ```
9152
9202
  */
9153
- POST_ITEM_DISCHARGE = 38,
9203
+ POST_ITEM_DISCHARGE = 39,
9154
9204
  /**
9155
9205
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when an item is no longer queued (i.e.
9156
9206
  * when the animation of the player holding the item above their head is finished and the item is
@@ -9171,7 +9221,7 @@ export declare enum ModCallbackCustom {
9171
9221
  * ): void {}
9172
9222
  * ```
9173
9223
  */
9174
- POST_ITEM_PICKUP = 39,
9224
+ POST_ITEM_PICKUP = 40,
9175
9225
  /**
9176
9226
  * Fires on the first `POST_KNIFE_UPDATE` frame for each knife.
9177
9227
  *
@@ -9188,7 +9238,7 @@ export declare enum ModCallbackCustom {
9188
9238
  * function postKnifeInitLate(knife: EntityKnife): void {}
9189
9239
  * ```
9190
9240
  */
9191
- POST_KNIFE_INIT_LATE = 40,
9241
+ POST_KNIFE_INIT_LATE = 41,
9192
9242
  /**
9193
9243
  * Fires on the first `POST_LASER_UPDATE` frame for each laser.
9194
9244
  *
@@ -9205,7 +9255,7 @@ export declare enum ModCallbackCustom {
9205
9255
  * function postLaserInitLate(laser: EntityLaser): void {}
9206
9256
  * ```
9207
9257
  */
9208
- POST_LASER_INIT_LATE = 41,
9258
+ POST_LASER_INIT_LATE = 42,
9209
9259
  /**
9210
9260
  * The same as the vanilla callback of the same name, but fires in the correct order with respect
9211
9261
  * to the `POST_GAME_STARTED` and the `POST_NEW_ROOM` callbacks:
@@ -9222,7 +9272,7 @@ export declare enum ModCallbackCustom {
9222
9272
  * function postNewLevelReordered(): void {}
9223
9273
  * ```
9224
9274
  */
9225
- POST_NEW_LEVEL_REORDERED = 42,
9275
+ POST_NEW_LEVEL_REORDERED = 43,
9226
9276
  /**
9227
9277
  * Fires on the first `POST_NEW_ROOM` or `PRE_ENTITY_SPAWN` callback where being in a new room is
9228
9278
  * detected. This is useful because the vanilla `POST_NEW_ROOM` callback fires only after entities
@@ -9233,7 +9283,7 @@ export declare enum ModCallbackCustom {
9233
9283
  * function postNewRoomEarly(): void {}
9234
9284
  * ```
9235
9285
  */
9236
- POST_NEW_ROOM_EARLY = 43,
9286
+ POST_NEW_ROOM_EARLY = 44,
9237
9287
  /**
9238
9288
  * The same as the vanilla callback of the same name, but fires in the correct order with respect
9239
9289
  * to the `POST_GAME_STARTED` and the `POST_NEW_LEVEL` callbacks:
@@ -9250,7 +9300,20 @@ export declare enum ModCallbackCustom {
9250
9300
  * function postNewRoomReordered(): void {}
9251
9301
  * ```
9252
9302
  */
9253
- POST_NEW_ROOM_REORDERED = 44,
9303
+ POST_NEW_ROOM_REORDERED = 45,
9304
+ /**
9305
+ * The exact same thing as the vanilla `POST_NPC_DEATH` callback, except this callback allows you
9306
+ * to specify extra arguments for additional filtration.
9307
+ *
9308
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
9309
+ * - You can provide an optional third argument that will make the callback only fire if it
9310
+ * matches the `EntityType` provided.
9311
+ * - You can provide an optional fourth argument that will make the callback only fire if it
9312
+ * matches the variant provided.
9313
+ * - You can provide an optional fifth argument that will make the callback only fire if it
9314
+ * matches the sub-type provided.
9315
+ */
9316
+ POST_NPC_DEATH_FILTER = 46,
9254
9317
  /**
9255
9318
  * The exact same thing as the vanilla `POST_NPC_INIT` callback, except this callback allows you
9256
9319
  * to specify extra arguments for additional filtration.
@@ -9263,7 +9326,7 @@ export declare enum ModCallbackCustom {
9263
9326
  * - You can provide an optional fifth argument that will make the callback only fire if it
9264
9327
  * matches the sub-type provided.
9265
9328
  */
9266
- POST_NPC_INIT_FILTER = 45,
9329
+ POST_NPC_INIT_FILTER = 47,
9267
9330
  /**
9268
9331
  * Fires on the first `NPC_UPDATE` frame for each NPC.
9269
9332
  *
@@ -9282,7 +9345,20 @@ export declare enum ModCallbackCustom {
9282
9345
  * function postNPCInitLate(npc: EntityNPC): void {}
9283
9346
  * ```
9284
9347
  */
9285
- POST_NPC_INIT_LATE = 46,
9348
+ POST_NPC_INIT_LATE = 48,
9349
+ /**
9350
+ * The exact same thing as the vanilla `POST_NPC_RENDER` callback, except this callback allows you
9351
+ * to specify extra arguments for additional filtration.
9352
+ *
9353
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
9354
+ * - You can provide an optional third argument that will make the callback only fire if it
9355
+ * matches the `EntityType` provided.
9356
+ * - You can provide an optional fourth argument that will make the callback only fire if it
9357
+ * matches the variant provided.
9358
+ * - You can provide an optional fifth argument that will make the callback only fire if it
9359
+ * matches the sub-type provided.
9360
+ */
9361
+ POST_NPC_RENDER_FILTER = 49,
9286
9362
  /**
9287
9363
  * Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
9288
9364
  * the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
@@ -9303,7 +9379,7 @@ export declare enum ModCallbackCustom {
9303
9379
  * ): void {}
9304
9380
  * ```
9305
9381
  */
9306
- POST_NPC_STATE_CHANGED = 47,
9382
+ POST_NPC_STATE_CHANGED = 50,
9307
9383
  /**
9308
9384
  * The exact same thing as the vanilla `POST_NPC_UPDATE` callback, except this callback allows you
9309
9385
  * to specify extra arguments for additional filtration.
@@ -9316,7 +9392,7 @@ export declare enum ModCallbackCustom {
9316
9392
  * - You can provide an optional fifth argument that will make the callback only fire if it
9317
9393
  * matches the sub-type provided.
9318
9394
  */
9319
- POST_NPC_UPDATE_FILTER = 48,
9395
+ POST_NPC_UPDATE_FILTER = 51,
9320
9396
  /**
9321
9397
  * Similar to the vanilla callback of the same name, but fires after the
9322
9398
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -9341,7 +9417,7 @@ export declare enum ModCallbackCustom {
9341
9417
  * function postPEffectUpdateReordered(player: EntityPlayer): void {}
9342
9418
  * ```
9343
9419
  */
9344
- POST_PEFFECT_UPDATE_REORDERED = 49,
9420
+ POST_PEFFECT_UPDATE_REORDERED = 52,
9345
9421
  /**
9346
9422
  * Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
9347
9423
  *
@@ -9357,7 +9433,7 @@ export declare enum ModCallbackCustom {
9357
9433
  * function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
9358
9434
  * ```
9359
9435
  */
9360
- POST_PICKUP_COLLECT = 50,
9436
+ POST_PICKUP_COLLECT = 53,
9361
9437
  /**
9362
9438
  * Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
9363
9439
  * respective pickup on the run.
@@ -9375,7 +9451,7 @@ export declare enum ModCallbackCustom {
9375
9451
  * function postPickupInitFirst(pickup: EntityPickup): void {}
9376
9452
  * ```
9377
9453
  */
9378
- POST_PICKUP_INIT_FIRST = 51,
9454
+ POST_PICKUP_INIT_FIRST = 54,
9379
9455
  /**
9380
9456
  * Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
9381
9457
  *
@@ -9392,7 +9468,7 @@ export declare enum ModCallbackCustom {
9392
9468
  * function postPickupInitLate(pickup: EntityPickup): void {}
9393
9469
  * ```
9394
9470
  */
9395
- POST_PICKUP_INIT_LATE = 52,
9471
+ POST_PICKUP_INIT_LATE = 55,
9396
9472
  /**
9397
9473
  * Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
9398
9474
  * on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
@@ -9411,7 +9487,7 @@ export declare enum ModCallbackCustom {
9411
9487
  * ): void {}
9412
9488
  * ```
9413
9489
  */
9414
- POST_PICKUP_STATE_CHANGED = 53,
9490
+ POST_PICKUP_STATE_CHANGED = 56,
9415
9491
  /**
9416
9492
  * Fires from the `POST_RENDER` callback on every frame that a pit exists.
9417
9493
  *
@@ -9423,7 +9499,7 @@ export declare enum ModCallbackCustom {
9423
9499
  * function postPitRender(pit: GridEntityPit): void {}
9424
9500
  * ```
9425
9501
  */
9426
- POST_PIT_RENDER = 54,
9502
+ POST_PIT_RENDER = 57,
9427
9503
  /**
9428
9504
  * Fires from the `POST_UPDATE` callback on every frame that a pit exists.
9429
9505
  *
@@ -9435,7 +9511,7 @@ export declare enum ModCallbackCustom {
9435
9511
  * function postPitUpdate(pit: GridEntityPit): void {}
9436
9512
  * ```
9437
9513
  */
9438
- POST_PIT_UPDATE = 55,
9514
+ POST_PIT_UPDATE = 58,
9439
9515
  /**
9440
9516
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's health (i.e. hearts) is
9441
9517
  * different than what it was on the previous frame. For more information, see the `PlayerHealth`
@@ -9457,7 +9533,7 @@ export declare enum ModCallbackCustom {
9457
9533
  * ): void {}
9458
9534
  * ```
9459
9535
  */
9460
- POST_PLAYER_CHANGE_HEALTH = 56,
9536
+ POST_PLAYER_CHANGE_HEALTH = 59,
9461
9537
  /**
9462
9538
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when one of the player's stats change
9463
9539
  * from what they were on the previous frame.
@@ -9487,7 +9563,7 @@ export declare enum ModCallbackCustom {
9487
9563
  * ) => void {}
9488
9564
  * ```
9489
9565
  */
9490
- POST_PLAYER_CHANGE_STAT = 57,
9566
+ POST_PLAYER_CHANGE_STAT = 60,
9491
9567
  /**
9492
9568
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player entity changes its player
9493
9569
  * type
@@ -9510,7 +9586,7 @@ export declare enum ModCallbackCustom {
9510
9586
  * ): void {}
9511
9587
  * ```
9512
9588
  */
9513
- POST_PLAYER_CHANGE_TYPE = 58,
9589
+ POST_PLAYER_CHANGE_TYPE = 61,
9514
9590
  /**
9515
9591
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
9516
9592
  * higher than what it was on the previous frame, or when the active items change, or when the
@@ -9527,7 +9603,7 @@ export declare enum ModCallbackCustom {
9527
9603
  * ): void {}
9528
9604
  * ```
9529
9605
  */
9530
- POST_PLAYER_COLLECTIBLE_ADDED = 59,
9606
+ POST_PLAYER_COLLECTIBLE_ADDED = 62,
9531
9607
  /**
9532
9608
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
9533
9609
  * lower than what it was on the previous frame, or when the active items change, or when the
@@ -9544,7 +9620,7 @@ export declare enum ModCallbackCustom {
9544
9620
  * ): void {}
9545
9621
  * ```
9546
9622
  */
9547
- POST_PLAYER_COLLECTIBLE_REMOVED = 60,
9623
+ POST_PLAYER_COLLECTIBLE_REMOVED = 63,
9548
9624
  /**
9549
9625
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
9550
9626
  * prevent the fatal damage.
@@ -9562,7 +9638,7 @@ export declare enum ModCallbackCustom {
9562
9638
  * function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
9563
9639
  * ```
9564
9640
  */
9565
- POST_PLAYER_FATAL_DAMAGE = 61,
9641
+ POST_PLAYER_FATAL_DAMAGE = 64,
9566
9642
  /**
9567
9643
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
9568
9644
  * `POST_PLAYER_INIT_LATE` callback, with two changes:
@@ -9584,7 +9660,7 @@ export declare enum ModCallbackCustom {
9584
9660
  * function postPlayerInitFirst(player: EntityPlayer): void {}
9585
9661
  * ```
9586
9662
  */
9587
- POST_PLAYER_INIT_FIRST = 62,
9663
+ POST_PLAYER_INIT_FIRST = 65,
9588
9664
  /**
9589
9665
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
9590
9666
  *
@@ -9604,7 +9680,7 @@ export declare enum ModCallbackCustom {
9604
9680
  * function postPlayerInitLate(pickup: EntityPickup): void {}
9605
9681
  * ```
9606
9682
  */
9607
- POST_PLAYER_INIT_LATE = 63,
9683
+ POST_PLAYER_INIT_LATE = 66,
9608
9684
  /**
9609
9685
  * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
9610
9686
  * callback fires (if the player is spawning on the 0th game frame of the run).
@@ -9628,7 +9704,7 @@ export declare enum ModCallbackCustom {
9628
9704
  * function postPlayerRenderReordered(player: EntityPlayer): void {}
9629
9705
  * ```
9630
9706
  */
9631
- POST_PLAYER_RENDER_REORDERED = 64,
9707
+ POST_PLAYER_RENDER_REORDERED = 67,
9632
9708
  /**
9633
9709
  * Similar to the vanilla callback of the same name, but fires after the
9634
9710
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -9653,7 +9729,7 @@ export declare enum ModCallbackCustom {
9653
9729
  * function postPlayerUpdateReordered(player: EntityPlayer): void {}
9654
9730
  * ```
9655
9731
  */
9656
- POST_PLAYER_UPDATE_REORDERED = 65,
9732
+ POST_PLAYER_UPDATE_REORDERED = 68,
9657
9733
  /**
9658
9734
  * Fires from the `POST_RENDER` callback on every frame that a poop exists.
9659
9735
  *
@@ -9665,7 +9741,7 @@ export declare enum ModCallbackCustom {
9665
9741
  * function postPoopRender(poop: GridEntityPoop): void {}
9666
9742
  * ```
9667
9743
  */
9668
- POST_POOP_RENDER = 66,
9744
+ POST_POOP_RENDER = 69,
9669
9745
  /**
9670
9746
  * Fires from the `POST_UPDATE` callback on every frame that a poop exists.
9671
9747
  *
@@ -9677,7 +9753,7 @@ export declare enum ModCallbackCustom {
9677
9753
  * function postPoopUpdate(poop: GridEntityPoop): void {}
9678
9754
  * ```
9679
9755
  */
9680
- POST_POOP_UPDATE = 67,
9756
+ POST_POOP_UPDATE = 70,
9681
9757
  /**
9682
9758
  * Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
9683
9759
  *
@@ -9689,7 +9765,7 @@ export declare enum ModCallbackCustom {
9689
9765
  * function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
9690
9766
  * ```
9691
9767
  */
9692
- POST_PRESSURE_PLATE_RENDER = 68,
9768
+ POST_PRESSURE_PLATE_RENDER = 71,
9693
9769
  /**
9694
9770
  * Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
9695
9771
  *
@@ -9701,7 +9777,7 @@ export declare enum ModCallbackCustom {
9701
9777
  * function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
9702
9778
  * ```
9703
9779
  */
9704
- POST_PRESSURE_PLATE_UPDATE = 69,
9780
+ POST_PRESSURE_PLATE_UPDATE = 72,
9705
9781
  /**
9706
9782
  * Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
9707
9783
  *
@@ -9718,7 +9794,7 @@ export declare enum ModCallbackCustom {
9718
9794
  * function postProjectileInitLate(projectile: EntityProjectile): void {}
9719
9795
  * ```
9720
9796
  */
9721
- POST_PROJECTILE_INIT_LATE = 70,
9797
+ POST_PROJECTILE_INIT_LATE = 73,
9722
9798
  /**
9723
9799
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player first picks up a new
9724
9800
  * item. The pickup returned in the callback is assumed to be the first pickup that no longer
@@ -9734,7 +9810,7 @@ export declare enum ModCallbackCustom {
9734
9810
  * function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
9735
9811
  * ```
9736
9812
  */
9737
- POST_PURCHASE = 71,
9813
+ POST_PURCHASE = 74,
9738
9814
  /**
9739
9815
  * Fires from the `POST_RENDER` callback on every frame that a rock exists.
9740
9816
  *
@@ -9748,7 +9824,7 @@ export declare enum ModCallbackCustom {
9748
9824
  * function postRockRender(rock: GridEntityRock): void {}
9749
9825
  * ```
9750
9826
  */
9751
- POST_ROCK_RENDER = 72,
9827
+ POST_ROCK_RENDER = 75,
9752
9828
  /**
9753
9829
  * Fires from the `POST_UPDATE` callback on every frame that a rock exists.
9754
9830
  *
@@ -9762,7 +9838,7 @@ export declare enum ModCallbackCustom {
9762
9838
  * function postRockUpdate(rock: GridEntityRock): void {}
9763
9839
  * ```
9764
9840
  */
9765
- POST_ROCK_UPDATE = 73,
9841
+ POST_ROCK_UPDATE = 76,
9766
9842
  /**
9767
9843
  * Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
9768
9844
  * the `Room.IsClear` method).
@@ -9779,7 +9855,7 @@ export declare enum ModCallbackCustom {
9779
9855
  * function postRoomClearChanged(roomClear: boolean): void {}
9780
9856
  * ```
9781
9857
  */
9782
- POST_ROOM_CLEAR_CHANGED = 74,
9858
+ POST_ROOM_CLEAR_CHANGED = 77,
9783
9859
  /**
9784
9860
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
9785
9861
  * Room.
@@ -9794,7 +9870,7 @@ export declare enum ModCallbackCustom {
9794
9870
  * function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
9795
9871
  * ```
9796
9872
  */
9797
- POST_SACRIFICE = 75,
9873
+ POST_SACRIFICE = 78,
9798
9874
  /**
9799
9875
  * Fires from the `POST_RENDER` callback when a slot entity's animation changes.
9800
9876
  *
@@ -9808,7 +9884,7 @@ export declare enum ModCallbackCustom {
9808
9884
  * function postSlotAnimationChanged(slot: Entity): void {}
9809
9885
  * ```
9810
9886
  */
9811
- POST_SLOT_ANIMATION_CHANGED = 76,
9887
+ POST_SLOT_ANIMATION_CHANGED = 79,
9812
9888
  /**
9813
9889
  * Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
9814
9890
  * (It will not fire if any other type of entity collides with the slot entity.)
@@ -9832,7 +9908,7 @@ export declare enum ModCallbackCustom {
9832
9908
  * ): void {}
9833
9909
  * ```
9834
9910
  */
9835
- POST_SLOT_COLLISION = 77,
9911
+ POST_SLOT_COLLISION = 80,
9836
9912
  /**
9837
9913
  * Fires from the `POST_RENDER` callback when a slot plays the animation that indicates that it
9838
9914
  * has broken.
@@ -9847,7 +9923,7 @@ export declare enum ModCallbackCustom {
9847
9923
  * function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
9848
9924
  * ```
9849
9925
  */
9850
- POST_SLOT_DESTROYED = 78,
9926
+ POST_SLOT_DESTROYED = 81,
9851
9927
  /**
9852
9928
  * Fires when a new slot entity is initialized. Specifically, this is either:
9853
9929
  *
@@ -9866,7 +9942,7 @@ export declare enum ModCallbackCustom {
9866
9942
  * function postSlotInit(slot: Entity): void {}
9867
9943
  * ```
9868
9944
  */
9869
- POST_SLOT_INIT = 79,
9945
+ POST_SLOT_INIT = 82,
9870
9946
  /**
9871
9947
  * Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
9872
9948
  *
@@ -9880,7 +9956,7 @@ export declare enum ModCallbackCustom {
9880
9956
  * function postSlotRender(slot: Entity): void {}
9881
9957
  * ```
9882
9958
  */
9883
- POST_SLOT_RENDER = 80,
9959
+ POST_SLOT_RENDER = 83,
9884
9960
  /**
9885
9961
  * Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
9886
9962
  *
@@ -9894,7 +9970,7 @@ export declare enum ModCallbackCustom {
9894
9970
  * function postSlotUpdate(slot: Entity): void {}
9895
9971
  * ```
9896
9972
  */
9897
- POST_SLOT_UPDATE = 81,
9973
+ POST_SLOT_UPDATE = 84,
9898
9974
  /**
9899
9975
  * Fires from the `POST_RENDER` callback on every frame that spikes exist.
9900
9976
  *
@@ -9906,7 +9982,7 @@ export declare enum ModCallbackCustom {
9906
9982
  * function postSpikesRender(spikes: GridEntitySpikes): void {}
9907
9983
  * ```
9908
9984
  */
9909
- POST_SPIKES_RENDER = 82,
9985
+ POST_SPIKES_RENDER = 85,
9910
9986
  /**
9911
9987
  * Fires from the `POST_UPDATE` callback on every frame that spikes exist.
9912
9988
  *
@@ -9918,7 +9994,7 @@ export declare enum ModCallbackCustom {
9918
9994
  * function postSpikesUpdate(spikes: GridEntitySpikes): void {}
9919
9995
  * ```
9920
9996
  */
9921
- POST_SPIKES_UPDATE = 83,
9997
+ POST_SPIKES_UPDATE = 86,
9922
9998
  /**
9923
9999
  * Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
9924
10000
  * `EntityTear.FrameCount` is equal to 0).
@@ -9936,7 +10012,7 @@ export declare enum ModCallbackCustom {
9936
10012
  * function postTearInitLate(tear: EntityTear): void {}
9937
10013
  * ```
9938
10014
  */
9939
- POST_TEAR_INIT_LATE = 84,
10015
+ POST_TEAR_INIT_LATE = 87,
9940
10016
  /**
9941
10017
  * Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
9942
10018
  * `EntityTear.FrameCount` is equal to 1).
@@ -9953,7 +10029,7 @@ export declare enum ModCallbackCustom {
9953
10029
  * function postTearInitVeryLate(tear: EntityTear): void {}
9954
10030
  * ```
9955
10031
  */
9956
- POST_TEAR_INIT_VERY_LATE = 85,
10032
+ POST_TEAR_INIT_VERY_LATE = 88,
9957
10033
  /**
9958
10034
  * Fires from the `POST_RENDER` callback on every frame that a TNT exists.
9959
10035
  *
@@ -9965,7 +10041,7 @@ export declare enum ModCallbackCustom {
9965
10041
  * function postTNTRender(tnt: GridEntityTNT): void {}
9966
10042
  * ```
9967
10043
  */
9968
- POST_TNT_RENDER = 86,
10044
+ POST_TNT_RENDER = 89,
9969
10045
  /**
9970
10046
  * Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
9971
10047
  *
@@ -9977,7 +10053,7 @@ export declare enum ModCallbackCustom {
9977
10053
  * function postTNTUpdate(tnt: GridEntityTNT): void {}
9978
10054
  * ```
9979
10055
  */
9980
- POST_TNT_UPDATE = 87,
10056
+ POST_TNT_UPDATE = 90,
9981
10057
  /**
9982
10058
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player gains or loses a new
9983
10059
  * transformation.
@@ -9996,7 +10072,7 @@ export declare enum ModCallbackCustom {
9996
10072
  * ): void {}
9997
10073
  * ```
9998
10074
  */
9999
- POST_TRANSFORMATION = 88,
10075
+ POST_TRANSFORMATION = 91,
10000
10076
  /**
10001
10077
  * Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
10002
10078
  *
@@ -10011,7 +10087,7 @@ export declare enum ModCallbackCustom {
10011
10087
  * ): void {}
10012
10088
  * ```
10013
10089
  */
10014
- POST_TRINKET_BREAK = 89,
10090
+ POST_TRINKET_BREAK = 92,
10015
10091
  /**
10016
10092
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback on the frame before a Berserk effect
10017
10093
  * ends when the player is predicted to die (e.g. they currently have no health left or they took
@@ -10027,7 +10103,7 @@ export declare enum ModCallbackCustom {
10027
10103
  * function preBerserkDeath(player: EntityPlayer): void {}
10028
10104
  * ```
10029
10105
  */
10030
- PRE_BERSERK_DEATH = 90,
10106
+ PRE_BERSERK_DEATH = 93,
10031
10107
  /**
10032
10108
  * Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
10033
10109
  * to initiate a custom revival, return an integer that corresponds to the item or type of revival
@@ -10046,7 +10122,7 @@ export declare enum ModCallbackCustom {
10046
10122
  * function preCustomRevive(player: EntityPlayer): int | undefined {}
10047
10123
  * ```
10048
10124
  */
10049
- PRE_CUSTOM_REVIVE = 91,
10125
+ PRE_CUSTOM_REVIVE = 94,
10050
10126
  /**
10051
10127
  * Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
10052
10128
  * meets all of the conditions to pick it up.
@@ -10066,7 +10142,7 @@ export declare enum ModCallbackCustom {
10066
10142
  * function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
10067
10143
  * ```
10068
10144
  */
10069
- PRE_GET_PEDESTAL = 92,
10145
+ PRE_GET_PEDESTAL = 95,
10070
10146
  /**
10071
10147
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when an item becomes queued (i.e. when
10072
10148
  * the player begins to hold the item above their head).
@@ -10086,7 +10162,7 @@ export declare enum ModCallbackCustom {
10086
10162
  * ): void {}
10087
10163
  * ```
10088
10164
  */
10089
- PRE_ITEM_PICKUP = 93,
10165
+ PRE_ITEM_PICKUP = 96,
10090
10166
  /**
10091
10167
  * Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
10092
10168
  * player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
@@ -10100,7 +10176,33 @@ export declare enum ModCallbackCustom {
10100
10176
  * function preNewLevel(player: EntityPlayer): void {}
10101
10177
  * ```
10102
10178
  */
10103
- PRE_NEW_LEVEL = 94
10179
+ PRE_NEW_LEVEL = 97,
10180
+ /**
10181
+ * The exact same thing as the vanilla `PRE_NPC_COLLISION` callback, except this callback allows
10182
+ * you to specify extra arguments for additional filtration.
10183
+ *
10184
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
10185
+ * - You can provide an optional third argument that will make the callback only fire if it
10186
+ * matches the `EntityType` provided.
10187
+ * - You can provide an optional fourth argument that will make the callback only fire if it
10188
+ * matches the variant provided.
10189
+ * - You can provide an optional fifth argument that will make the callback only fire if it
10190
+ * matches the sub-type provided.
10191
+ */
10192
+ PRE_NPC_COLLISION_FILTER = 98,
10193
+ /**
10194
+ * The exact same thing as the vanilla `PRE_NPC_UPDATE` callback, except this callback allows you
10195
+ * to specify extra arguments for additional filtration.
10196
+ *
10197
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
10198
+ * - You can provide an optional third argument that will make the callback only fire if it
10199
+ * matches the `EntityType` provided.
10200
+ * - You can provide an optional fourth argument that will make the callback only fire if it
10201
+ * matches the variant provided.
10202
+ * - You can provide an optional fifth argument that will make the callback only fire if it
10203
+ * matches the sub-type provided.
10204
+ */
10205
+ PRE_NPC_UPDATE_FILTER = 99
10104
10206
  }
10105
10207
 
10106
10208
  /**