isaacscript-common 13.3.4 → 14.0.0

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 (235) hide show
  1. package/dist/index.d.ts +576 -401
  2. package/dist/isaacscript-common.lua +14654 -13908
  3. package/dist/src/callbacks/postAmbush.d.ts.map +1 -1
  4. package/dist/src/callbacks/postAmbush.lua +7 -12
  5. package/dist/src/callbacks/postBombExploded.lua +3 -3
  6. package/dist/src/callbacks/postRoomClearChanged.d.ts.map +1 -1
  7. package/dist/src/callbacks/postRoomClearChanged.lua +3 -5
  8. package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts → postBombExploded.d.ts} +1 -1
  9. package/dist/src/callbacks/subscriptions/{postBoneExploded.d.ts.map → postBombExploded.d.ts.map} +1 -1
  10. package/dist/src/callbacks/subscriptions/{postBoneExploded.lua → postBombExploded.lua} +0 -0
  11. package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts +1 -1
  12. package/dist/src/callbacks/subscriptions/postCollectibleEmpty.d.ts.map +1 -1
  13. package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
  14. package/dist/src/callbacks/subscriptions/postCollectibleInitFirst.d.ts.map +1 -1
  15. package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts +4 -2
  16. package/dist/src/callbacks/subscriptions/postCursedTeleport.d.ts.map +1 -1
  17. package/dist/src/callbacks/subscriptions/postCursedTeleport.lua +13 -1
  18. package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.d.ts.map +1 -1
  19. package/dist/src/callbacks/subscriptions/postHolyMantleRemoved.lua +2 -2
  20. package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.d.ts.map +1 -1
  21. package/dist/src/callbacks/subscriptions/postPEffectUpdateReordered.lua +2 -2
  22. package/dist/src/classes/ModUpgraded.d.ts +9 -5
  23. package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
  24. package/dist/src/classes/ModUpgraded.lua +101 -14
  25. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts +12 -0
  26. package/dist/src/classes/callbacks/PostAmbushFinished.d.ts.map +1 -0
  27. package/dist/src/classes/callbacks/PostAmbushFinished.lua +37 -0
  28. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts +12 -0
  29. package/dist/src/classes/callbacks/PostAmbushStarted.d.ts.map +1 -0
  30. package/dist/src/classes/callbacks/PostAmbushStarted.lua +37 -0
  31. package/dist/src/classes/callbacks/PostBombExploded.d.ts +7 -0
  32. package/dist/src/classes/callbacks/PostBombExploded.d.ts.map +1 -0
  33. package/dist/src/classes/callbacks/PostBombExploded.lua +24 -0
  34. package/dist/src/classes/callbacks/PostBombInitLate.d.ts +12 -0
  35. package/dist/src/classes/callbacks/PostBombInitLate.d.ts.map +1 -0
  36. package/dist/src/classes/callbacks/PostBombInitLate.lua +27 -0
  37. package/dist/src/classes/callbacks/PostBoneSwing.d.ts +15 -0
  38. package/dist/src/classes/callbacks/PostBoneSwing.d.ts.map +1 -0
  39. package/dist/src/classes/callbacks/PostBoneSwing.lua +43 -0
  40. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +17 -0
  41. package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -0
  42. package/dist/src/classes/callbacks/PostCollectibleEmpty.lua +47 -0
  43. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts +13 -0
  44. package/dist/src/classes/callbacks/PostCollectibleInitFirst.d.ts.map +1 -0
  45. package/dist/src/classes/callbacks/PostCollectibleInitFirst.lua +32 -0
  46. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts +21 -0
  47. package/dist/src/classes/callbacks/PostCursedTeleport.d.ts.map +1 -0
  48. package/dist/src/classes/callbacks/PostCursedTeleport.lua +113 -0
  49. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts +12 -0
  50. package/dist/src/classes/callbacks/PostKnifeInitLate.d.ts.map +1 -0
  51. package/dist/src/classes/callbacks/PostKnifeInitLate.lua +27 -0
  52. package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts +14 -0
  53. package/dist/src/classes/callbacks/PostNewRoomEarly.d.ts.map +1 -0
  54. package/dist/src/classes/callbacks/PostNewRoomEarly.lua +65 -0
  55. package/dist/src/classes/callbacks/PostPitRender.d.ts +7 -0
  56. package/dist/src/classes/callbacks/PostPitRender.d.ts.map +1 -0
  57. package/dist/src/classes/callbacks/PostPitRender.lua +24 -0
  58. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +13 -0
  59. package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -0
  60. package/dist/src/classes/callbacks/PostRoomClearChanged.lua +33 -0
  61. package/dist/src/classes/callbacks/PostSpikesRender.d.ts +7 -0
  62. package/dist/src/classes/callbacks/PostSpikesRender.d.ts.map +1 -0
  63. package/dist/src/classes/callbacks/PostSpikesRender.lua +24 -0
  64. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts +10 -0
  65. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.d.ts.map +1 -0
  66. package/dist/src/classes/callbacks/validation/CustomCallbackAmbush.lua +19 -0
  67. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts +10 -0
  68. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.d.ts.map +1 -0
  69. package/dist/src/classes/callbacks/validation/CustomCallbackBomb.lua +19 -0
  70. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts +10 -0
  71. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.d.ts.map +1 -0
  72. package/dist/src/classes/callbacks/validation/CustomCallbackCollectible.lua +19 -0
  73. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts +10 -0
  74. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.d.ts.map +1 -0
  75. package/dist/src/classes/callbacks/validation/CustomCallbackKnife.lua +19 -0
  76. package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts +10 -0
  77. package/dist/src/classes/callbacks/validation/CustomCallbackPit.d.ts.map +1 -0
  78. package/dist/src/classes/callbacks/validation/CustomCallbackPit.lua +20 -0
  79. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts +10 -0
  80. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.d.ts.map +1 -0
  81. package/dist/src/classes/callbacks/validation/CustomCallbackPlayer.lua +23 -0
  82. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts +10 -0
  83. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.d.ts.map +1 -0
  84. package/dist/src/classes/callbacks/validation/CustomCallbackSpikes.lua +20 -0
  85. package/dist/src/classes/private/CustomCallback.d.ts +32 -0
  86. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -0
  87. package/dist/src/classes/private/CustomCallback.lua +53 -0
  88. package/dist/src/core/upgradeMod.d.ts.map +1 -1
  89. package/dist/src/core/upgradeMod.lua +16 -0
  90. package/dist/src/enums/IsaacScriptCommonFeature.d.ts +35 -0
  91. package/dist/src/enums/IsaacScriptCommonFeature.d.ts.map +1 -0
  92. package/dist/src/enums/IsaacScriptCommonFeature.lua +35 -0
  93. package/dist/src/enums/LadderSubTypeCustom.d.ts +17 -0
  94. package/dist/src/enums/LadderSubTypeCustom.d.ts.map +1 -0
  95. package/dist/src/enums/LadderSubTypeCustom.lua +19 -0
  96. package/dist/src/enums/ModCallbackCustom.d.ts +399 -327
  97. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  98. package/dist/src/enums/ModCallbackCustom.lua +85 -87
  99. package/dist/src/enums/ModCallbackCustom2.d.ts +17 -0
  100. package/dist/src/enums/ModCallbackCustom2.d.ts.map +1 -0
  101. package/dist/src/enums/ModCallbackCustom2.lua +30 -0
  102. package/dist/src/features/{setHotkey.d.ts → customHotkeys.d.ts} +1 -1
  103. package/dist/src/features/customHotkeys.d.ts.map +1 -0
  104. package/dist/src/features/{setHotkey.lua → customHotkeys.lua} +2 -2
  105. package/dist/src/features/customPickup.d.ts.map +1 -1
  106. package/dist/src/features/customPickup.lua +6 -2
  107. package/dist/src/features/customStage/backdrop.d.ts.map +1 -1
  108. package/dist/src/features/customStage/backdrop.lua +3 -1
  109. package/dist/src/features/customStage/shadows.d.ts.map +1 -1
  110. package/dist/src/features/customStage/shadows.lua +3 -1
  111. package/dist/src/features/customTrapdoor/init.lua +1 -7
  112. package/dist/src/features/firstLast.d.ts.map +1 -1
  113. package/dist/src/features/firstLast.lua +3 -3
  114. package/dist/src/features/saveDataManager/main.d.ts +5 -2
  115. package/dist/src/features/saveDataManager/main.d.ts.map +1 -1
  116. package/dist/src/features/saveDataManager/main.lua +3 -5
  117. package/dist/src/functions/ambush.d.ts +6 -0
  118. package/dist/src/functions/ambush.d.ts.map +1 -1
  119. package/dist/src/functions/ambush.lua +31 -0
  120. package/dist/src/functions/minimap.d.ts +4 -0
  121. package/dist/src/functions/minimap.d.ts.map +1 -1
  122. package/dist/src/functions/minimap.lua +4 -0
  123. package/dist/src/functions/roomTransition.d.ts +3 -4
  124. package/dist/src/functions/roomTransition.d.ts.map +1 -1
  125. package/dist/src/functions/roomTransition.lua +4 -32
  126. package/dist/src/functions/spawnCollectible.d.ts +24 -5
  127. package/dist/src/functions/spawnCollectible.d.ts.map +1 -1
  128. package/dist/src/functions/spawnCollectible.lua +44 -4
  129. package/dist/src/functions/utils.d.ts +7 -2
  130. package/dist/src/functions/utils.d.ts.map +1 -1
  131. package/dist/src/functions/utils.lua +7 -2
  132. package/dist/src/index.d.ts +4 -2
  133. package/dist/src/index.d.ts.map +1 -1
  134. package/dist/src/index.lua +26 -10
  135. package/dist/src/initCustomCallbacks.d.ts.map +1 -1
  136. package/dist/src/initCustomCallbacks.lua +0 -3
  137. package/dist/src/initFeatures.lua +3 -3
  138. package/dist/src/interfaces/private/{AddCallbackParameterCustom.d.ts → AddCallbackParametersCustom.d.ts} +3 -5
  139. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -0
  140. package/dist/src/interfaces/private/{AddCallbackParameterCustom.lua → AddCallbackParametersCustom.lua} +0 -0
  141. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts +55 -0
  142. package/dist/src/interfaces/private/AddCallbackParametersCustom2.d.ts.map +1 -0
  143. package/dist/src/interfaces/private/AddCallbackParametersCustom2.lua +4 -0
  144. package/dist/src/objects/callbackRegisterFunctions.d.ts +1 -1
  145. package/dist/src/objects/callbackRegisterFunctions.d.ts.map +1 -1
  146. package/dist/src/objects/callbackRegisterFunctions.lua +2 -5
  147. package/dist/src/types/private/AllButFirst.d.ts +5 -0
  148. package/dist/src/types/private/AllButFirst.d.ts.map +1 -0
  149. package/dist/src/types/private/AllButFirst.lua +2 -0
  150. package/dist/src/types/private/CallbackTuple.d.ts +20 -0
  151. package/dist/src/types/private/CallbackTuple.d.ts.map +1 -0
  152. package/dist/src/types/private/CallbackTuple.lua +2 -0
  153. package/dist/src/types/private/MatchingCallbackCustom.d.ts +14 -0
  154. package/dist/src/types/private/MatchingCallbackCustom.d.ts.map +1 -0
  155. package/dist/src/types/private/MatchingCallbackCustom.lua +2 -0
  156. package/package.json +2 -2
  157. package/src/callbacks/postAmbush.ts +7 -14
  158. package/src/callbacks/postBombExploded.ts +1 -1
  159. package/src/callbacks/postBoneSwing.ts +2 -1
  160. package/src/callbacks/postCollectibleEmpty.ts +2 -0
  161. package/src/callbacks/postCollectibleInitFirst.ts +2 -0
  162. package/src/callbacks/postNewRoomEarly.ts +1 -1
  163. package/src/callbacks/postRoomClearChanged.ts +3 -7
  164. package/src/callbacks/subscriptions/{postBoneExploded.ts → postBombExploded.ts} +0 -0
  165. package/src/callbacks/subscriptions/postCollectibleEmpty.ts +1 -1
  166. package/src/callbacks/subscriptions/postCollectibleInitFirst.ts +1 -1
  167. package/src/callbacks/subscriptions/postCursedTeleport.ts +24 -1
  168. package/src/callbacks/subscriptions/postHolyMantleRemoved.ts +9 -2
  169. package/src/callbacks/subscriptions/postPEffectUpdateReordered.ts +9 -2
  170. package/src/classes/ModUpgraded.ts +118 -27
  171. package/src/classes/callbacks/PostAmbushFinished.ts +39 -0
  172. package/src/classes/callbacks/PostAmbushStarted.ts +39 -0
  173. package/src/classes/callbacks/PostBombExploded.ts +21 -0
  174. package/src/classes/callbacks/PostBombInitLate.ts +28 -0
  175. package/src/classes/callbacks/PostBoneSwing.ts +58 -0
  176. package/src/classes/callbacks/PostCollectibleEmpty.ts +72 -0
  177. package/src/classes/callbacks/PostCollectibleInitFirst.ts +37 -0
  178. package/src/classes/callbacks/PostCursedTeleport.ts +183 -0
  179. package/src/classes/callbacks/PostKnifeInitLate.ts +28 -0
  180. package/src/classes/callbacks/PostNewRoomEarly.ts +93 -0
  181. package/src/classes/callbacks/PostPitRender.ts +21 -0
  182. package/src/classes/callbacks/PostRoomClearChanged.ts +40 -0
  183. package/src/classes/callbacks/PostSpikesRender.ts +21 -0
  184. package/src/classes/callbacks/validation/CustomCallbackAmbush.ts +28 -0
  185. package/src/classes/callbacks/validation/CustomCallbackBomb.ts +27 -0
  186. package/src/classes/callbacks/validation/CustomCallbackCollectible.ts +30 -0
  187. package/src/classes/callbacks/validation/CustomCallbackKnife.ts +27 -0
  188. package/src/classes/callbacks/validation/CustomCallbackPit.ts +28 -0
  189. package/src/classes/callbacks/validation/CustomCallbackPlayer.ts +37 -0
  190. package/src/classes/callbacks/validation/CustomCallbackSpikes.ts +28 -0
  191. package/src/classes/private/CustomCallback.ts +79 -0
  192. package/src/core/upgradeMod.ts +16 -2
  193. package/src/enums/IsaacScriptCommonFeature.ts +34 -0
  194. package/src/enums/LadderSubTypeCustom.ts +17 -0
  195. package/src/enums/ModCallbackCustom.ts +314 -243
  196. package/src/enums/ModCallbackCustom2.ts +17 -0
  197. package/src/features/{setHotkey.ts → customHotkeys.ts} +2 -2
  198. package/src/features/customPickup.ts +4 -2
  199. package/src/features/customStage/backdrop.ts +2 -1
  200. package/src/features/customStage/shadows.ts +2 -1
  201. package/src/features/customTrapdoor/init.ts +0 -1
  202. package/src/features/firstLast.ts +3 -7
  203. package/src/features/saveDataManager/main.ts +32 -21
  204. package/src/functions/ambush.ts +26 -1
  205. package/src/functions/minimap.ts +4 -0
  206. package/src/functions/roomTransition.ts +3 -27
  207. package/src/functions/spawnCollectible.ts +44 -4
  208. package/src/functions/utils.ts +7 -2
  209. package/src/index.ts +4 -2
  210. package/src/initCustomCallbacks.ts +1 -2
  211. package/src/initFeatures.ts +2 -2
  212. package/src/interfaces/private/{AddCallbackParameterCustom.ts → AddCallbackParametersCustom.ts} +2 -24
  213. package/src/interfaces/private/AddCallbackParametersCustom2.ts +79 -0
  214. package/src/objects/callbackRegisterFunctions.ts +2 -4
  215. package/src/types/private/AllButFirst.ts +6 -0
  216. package/src/types/private/CallbackTuple.ts +21 -0
  217. package/src/types/private/MatchingCallbackCustom.ts +26 -0
  218. package/dist/src/callbacks/postCustomDoorEnter.d.ts +0 -6
  219. package/dist/src/callbacks/postCustomDoorEnter.d.ts.map +0 -1
  220. package/dist/src/callbacks/postCustomDoorEnter.lua +0 -199
  221. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts +0 -9
  222. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.d.ts.map +0 -1
  223. package/dist/src/callbacks/subscriptions/postCustomDoorEnter.lua +0 -29
  224. package/dist/src/classes/CustomCallback.d.ts +0 -8
  225. package/dist/src/classes/CustomCallback.d.ts.map +0 -1
  226. package/dist/src/classes/CustomCallback.lua +0 -28
  227. package/dist/src/features/customDoor.d.ts +0 -51
  228. package/dist/src/features/customDoor.d.ts.map +0 -1
  229. package/dist/src/features/customDoor.lua +0 -53
  230. package/dist/src/features/setHotkey.d.ts.map +0 -1
  231. package/dist/src/interfaces/private/AddCallbackParameterCustom.d.ts.map +0 -1
  232. package/src/callbacks/postCustomDoorEnter.ts +0 -250
  233. package/src/callbacks/subscriptions/postCustomDoorEnter.ts +0 -42
  234. package/src/classes/CustomCallback.ts +0 -23
  235. package/src/features/customDoor.ts +0 -66
@@ -20,8 +20,9 @@ export enum ModCallbackCustom {
20
20
  * Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is started.
21
21
  * Specifically, this happens on the first frame that `Room.IsAmbushDone` is true.
22
22
  *
23
- * When registering the callback, takes an optional second argument that will make the callback
24
- * only fire if for the `AmbushType` provided.
23
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
24
+ * an optional third argument that will make the callback only fire if it matches the `AmbushType`
25
+ * provided.
25
26
  *
26
27
  * ```ts
27
28
  * function postAmbushFinished(ambushType: AmbushType): void {}
@@ -33,8 +34,9 @@ export enum ModCallbackCustom {
33
34
  * Fires from the `POST_UPDATE` callback when a Challenge Room or Boss Rush is completed.
34
35
  * Specifically, this happens on the first frame that `Room.IsAmbushActive` is true.
35
36
  *
36
- * When registering the callback, takes an optional second argument that will make the callback
37
- * only fire if for the `AmbushType` provided.
37
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
38
+ * an optional third argument that will make the callback only fire if it matches the `AmbushType`
39
+ * provided.
38
40
  *
39
41
  * ```ts
40
42
  * function postAmbushStarted(ambushType: AmbushType): void {}
@@ -45,8 +47,9 @@ export enum ModCallbackCustom {
45
47
  /**
46
48
  * Fires on the `POST_BOMB_UPDATE` callback that it explodes.
47
49
  *
48
- * When registering the callback, takes an optional second argument that will make the callback
49
- * only fire if the bomb variant matches the `BombVariant` provided.
50
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
51
+ * an optional third argument that will make the callback only fire if it matches the
52
+ * `BombVariant` provided.
50
53
  *
51
54
  * ```ts
52
55
  * function postBombDetonated(bomb: EntityBomb): void {}
@@ -60,8 +63,9 @@ export enum ModCallbackCustom {
60
63
  * This callback is useful because many attributes cannot be set or retrieved properly in the
61
64
  * normal `POST_BOMB_INIT` callback.
62
65
  *
63
- * When registering the callback, takes an optional second argument that will make the callback
64
- * only fire if the bomb variant matches the `BombVariant` provided.
66
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
67
+ * an optional third argument that will make the callback only fire if it matches the
68
+ * `BombVariant` provided.
65
69
  *
66
70
  * ```ts
67
71
  * function postBombInitLate(bomb: EntityBomb): void {}
@@ -82,8 +86,9 @@ export enum ModCallbackCustom {
82
86
  * Fires from the `POST_PICKUP_UPDATE` callback when a collectible goes from a non-zero sub-type
83
87
  * to `CollectibleType.NULL` (i.e. an "empty" pedestal).
84
88
  *
85
- * When registering the callback, takes an optional second argument that will make the callback
86
- * only fire if the collectible type changed from the `CollectibleType` provided.
89
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
90
+ * an optional third argument that will make the callback only fire if the pedestal changed from
91
+ * the `CollectibleType` provided.
87
92
  *
88
93
  * ```ts
89
94
  * function postCollectibleEmpty(
@@ -103,11 +108,12 @@ export enum ModCallbackCustom {
103
108
  * upon re-entering the room. Additionally, when playing as Tainted Isaac, the `POST_PICKUP_INIT`
104
109
  * callback will fire every time the item shifts.
105
110
  *
106
- * When registering the callback, takes an optional second argument that will make the callback
107
- * only fire if the collectible type matches the `CollectibleType` provided.
111
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
112
+ * an optional third argument that will make the callback only fire if it matches the
113
+ * `CollectibleType` provided.
108
114
  *
109
115
  * ```ts
110
- * function postCollectibleInitLate(collectible: EntityPickup): void {}
116
+ * function postCollectibleInitLate(collectible: EntityPickupCollectible): void {}
111
117
  * ```
112
118
  */
113
119
  POST_COLLECTIBLE_INIT_FIRST,
@@ -117,30 +123,18 @@ export enum ModCallbackCustom {
117
123
  * begins playing after a player triggers a Cursed Eye teleport or a Cursed Skull teleport. (Both
118
124
  * of these have the same effect in causing Isaac to be teleported to a random room.)
119
125
  *
126
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
127
+ * - You can provide an optional third argument that will make the callback only fire if it
128
+ * matches the `PlayerVariant` provided.
129
+ * - You can provide an optional fourth argument that will make the callback only fire if it
130
+ * matches the `PlayerType` provided.
131
+ *
120
132
  * ```ts
121
133
  * function postCursedTeleport(player: EntityPlayer): void {}
122
134
  * ```
123
135
  */
124
136
  POST_CURSED_TELEPORT,
125
137
 
126
- /**
127
- * Fires from the `POST_PEFFECT_UPDATE` callback when a player enters the loading zone of a custom
128
- * door created with the `spawnCustomDoor` helper function.
129
- *
130
- * When registering the callback, takes an optional second argument that will make the callback
131
- * only fire if it matches the `DoorVariant` provided.
132
- *
133
- * ```ts
134
- * function postCustomDoorEnter(
135
- * player: EntityPlayer,
136
- * effectVariant: int,
137
- * doorSlot: DoorSlot,
138
- * direction: Direction,
139
- * ): void {}
140
- * ```
141
- */
142
- POST_CUSTOM_DOOR_ENTER,
143
-
144
138
  /**
145
139
  * Fires from the `POST_PLAYER_UPDATE` callback after the player has finished the death animation,
146
140
  * has teleported to the previous room, and is ready to play the animation for the modded revival
@@ -150,8 +144,9 @@ export enum ModCallbackCustom {
150
144
  * `player.AnimateCollectible(CollectibleTypeCustom.COLLECTIBLE_MY_REVIVAL_ITEM);`, otherwise the
151
145
  * animation for a 1-Up will play.
152
146
  *
153
- * When registering the callback, takes an optional second argument that will make the callback
154
- * only fire if the revival type matches the one provided.
147
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
148
+ * an optional third argument that will make the callback only fire if the revival type matches
149
+ * the one provided.
155
150
  *
156
151
  * ```ts
157
152
  * function postCustomRevive(player: EntityPlayer, revivalType: int): void {}
@@ -163,8 +158,9 @@ export enum ModCallbackCustom {
163
158
  * Fires from the `EFFECT_POST_UPDATE` callback after a player has entered the range of a Dice
164
159
  * Room floor.
165
160
  *
166
- * When registering the callback, takes an optional second argument that will make the callback
167
- * only fire if the `DiceFloorSubType` type matches the one provided.
161
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
162
+ * an optional third argument that will make the callback only fire if it matches the
163
+ * `DiceFloorSubType` provided.
168
164
  *
169
165
  * ```ts
170
166
  * function postDiceRoomActivated(
@@ -178,8 +174,9 @@ export enum ModCallbackCustom {
178
174
  /**
179
175
  * Fires from the `POST_RENDER` callback on every frame that a door exists.
180
176
  *
181
- * When registering the callback, takes an optional second argument that will make the callback
182
- * only fire if it matches the variant provided.
177
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
178
+ * an optional third argument that will make the callback only fire if it matches the variant
179
+ * provided.
183
180
  *
184
181
  * ```ts
185
182
  * function postDoorRender(door: GridEntityDoor): void {}
@@ -190,8 +187,9 @@ export enum ModCallbackCustom {
190
187
  /**
191
188
  * Fires from the `POST_UPDATE` callback on every frame that a door exists.
192
189
  *
193
- * When registering the callback, takes an optional second argument that will make the callback
194
- * only fire if it matches the variant provided.
190
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
191
+ * an optional third argument that will make the callback only fire if it matches the variant
192
+ * provided.
195
193
  *
196
194
  * ```ts
197
195
  * function postDoorUpdate(door: GridEntityDoor): void {}
@@ -205,8 +203,9 @@ export enum ModCallbackCustom {
205
203
  * This callback is useful because many attributes cannot be set or retrieved properly in the
206
204
  * normal `POST_EFFECT_INIT` callback.
207
205
  *
208
- * When registering the callback, takes an optional second argument that will make the callback
209
- * only fire if the effect variant matches the `EffectVariant` provided.
206
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
207
+ * an optional third argument that will make the callback only fire if it matches the
208
+ * `EffectVariant` provided.
210
209
  *
211
210
  * ```ts
212
211
  * function postEffectInitLate(effect: EntityEffect): void {}
@@ -218,8 +217,9 @@ export enum ModCallbackCustom {
218
217
  * Fires from the `POST_EFFECT_UPDATE` callback when an effect's state has changed from what it
219
218
  * was on the previous frame. (In this context, "state" refers to the `EntityEffect.State` field.)
220
219
  *
221
- * When registering the callback, takes an optional second argument that will make the callback
222
- * only fire if it matches the `EffectVariant` provided.
220
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
221
+ * an optional third argument that will make the callback only fire if it matches the
222
+ * `EffectVariant` provided.
223
223
  *
224
224
  * ```ts
225
225
  * function postEffectStateChanged(
@@ -247,8 +247,9 @@ export enum ModCallbackCustom {
247
247
  * This callback is useful because many attributes cannot be set or retrieved properly in the
248
248
  * normal `POST_TEAR_INIT` callback.
249
249
  *
250
- * When registering the callback, takes an optional second argument that will make the callback
251
- * only fire if the familiar variant matches the `FamiliarVariant` provided.
250
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
251
+ * an optional third argument that will make the callback only fire if it matches the
252
+ * `FamiliarVariant` provided.
252
253
  *
253
254
  * ```ts
254
255
  * function postFamiliarInitLate(familiar: EntityFamiliar): void {}
@@ -261,8 +262,9 @@ export enum ModCallbackCustom {
261
262
  * was on the previous frame. (In this context, "state" refers to the `EntityFamiliar.State`
262
263
  * field.)
263
264
  *
264
- * When registering the callback, takes an optional second argument that will make the callback
265
- * only fire if it matches the `FamiliarVariant` provided.
265
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
266
+ * an optional third argument that will make the callback only fire if it matches the
267
+ * `FamiliarVariant` provided.
266
268
  *
267
269
  * ```ts
268
270
  * function postFamiliarStateChanged(
@@ -356,10 +358,11 @@ export enum ModCallbackCustom {
356
358
  * For grid entities created with `spawnCustomGridEntity`, use the
357
359
  * `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
358
360
  *
359
- * - When registering the callback, takes an optional second argument that will make the callback
360
- * only fire if it matches the `GridEntityType` provided.
361
- * - When registering the callback, takes an optional third argument that will make the callback
362
- * only fire if it matches the variant provided.
361
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
362
+ * - You can provide an optional third argument that will make the callback only fire if it
363
+ * matches the `GridEntityType` provided.
364
+ * - You can provide an optional fourth argument that will make the callback only fire if it
365
+ * matches the variant provided.
363
366
  *
364
367
  * ```ts
365
368
  * function postGridEntityBroken(gridEntity: GridEntity): void {}
@@ -375,14 +378,15 @@ export enum ModCallbackCustom {
375
378
  * For grid entities created with `spawnCustomGridEntity`, use the
376
379
  * `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
377
380
  *
378
- * - When registering the callback, takes an optional second argument that will make the callback
379
- * only fire if it matches the `GridEntityType` provided.
380
- * - When registering the callback, takes an optional third argument that will make the callback
381
- * only fire if it matches the variant provided (for the grid entity).
382
- * - When registering the callback, takes an optional fourth argument that will make the callback
383
- * only fire if the colliding entity matches the `EntityType` provided.
384
- * - When registering the callback, takes an optional fifth argument that will make the callback
385
- * only fire if the colliding entity matches the variant provided.
381
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
382
+ * - You can provide an optional third argument that will make the callback only fire if it
383
+ * matches the `GridEntityType` provided.
384
+ * - You can provide an optional fourth argument that will make the callback only fire if it
385
+ * matches the variant provided (for the grid entity).
386
+ * - You can provide an optional fifth argument that will make the callback only fire if the
387
+ * colliding entity matches the `EntityType` provided.
388
+ * - You can provide an optional sixth argument that will make the callback only fire if the
389
+ * colliding entity matches the variant provided.
386
390
  *
387
391
  * ```ts
388
392
  * function postGridEntityCollision(
@@ -397,9 +401,10 @@ export enum ModCallbackCustom {
397
401
  * The same as the `POST_GRID_ENTITY_BROKEN` callback, but only fires for grid entities created
398
402
  * with the `spawnCustomGridEntity` helper function.
399
403
  *
400
- * When registering the callback, takes an optional second argument that will make the callback
401
- * only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
402
- * variants, so there is no need for an optional third argument to filter by variant.)
404
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
405
+ * an optional third argument that will make the callback only fire if it matches the custom
406
+ * `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
407
+ * an optional argument to filter by variant.)
403
408
  *
404
409
  * ```ts
405
410
  * function postGridEntityCustomBroken(
@@ -414,13 +419,14 @@ export enum ModCallbackCustom {
414
419
  * The same as the `POST_GRID_ENTITY_COLLISION` callback, but only fires for grid entities created
415
420
  * with the `spawnCustomGridEntity` helper function.
416
421
  *
417
- * - When registering the callback, takes an optional second argument that will make the callback
418
- * only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
419
- * variants, so there is no need for an optional third argument to filter by variant.)
420
- * - When registering the callback, takes an optional third argument that will make the callback
421
- * only fire if the the colliding entity matches the `EntityType` provided.
422
- * - When registering the callback, takes an optional fourth argument that will make the callback
423
- * only fire if the the colliding entity matches the variant provided.
422
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
423
+ * - You can provide an optional third argument that will make the callback only fire if it
424
+ * matches the custom `GridEntityType` provided. (Custom grid entities do not have variants, so
425
+ * there is no need for an optional argument to filter by variant.)
426
+ * - You can provide an optional fourth argument that will make the callback only fire if the
427
+ * colliding entity matches the `EntityType` provided.
428
+ * - You can provide an optional fifth argument that will make the callback only fire if the
429
+ * colliding entity matches the variant provided.
424
430
  *
425
431
  * ```ts
426
432
  * function postGridEntityCustomCollision(
@@ -436,9 +442,10 @@ export enum ModCallbackCustom {
436
442
  * The same as the `POST_GRID_ENTITY_INIT` callback, but only fires for grid entities created with
437
443
  * the `spawnCustomGridEntity` helper function.
438
444
  *
439
- * When registering the callback, takes an optional second argument that will make the callback
440
- * only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
441
- * variants, so there is no need for an optional third argument to filter by variant.)
445
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
446
+ * an optional third argument that will make the callback only fire if it matches the custom
447
+ * `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
448
+ * an optional argument to filter by variant.)
442
449
  *
443
450
  * ```ts
444
451
  * function postGridEntityCustomInit(
@@ -453,9 +460,10 @@ export enum ModCallbackCustom {
453
460
  * The same as the `POST_GRID_ENTITY_REMOVE` callback, but only fires for grid entities created
454
461
  * with the `spawnCustomGridEntity` helper function.
455
462
  *
456
- * When registering the callback, takes an optional second argument that will make the callback
457
- * only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
458
- * variants, so there is no need for an optional third argument to filter by variant.)
463
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
464
+ * an optional third argument that will make the callback only fire if it matches the custom
465
+ * `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
466
+ * an optional argument to filter by variant.)
459
467
  *
460
468
  * ```ts
461
469
  * function postGridEntityCustomRemove(
@@ -470,9 +478,10 @@ export enum ModCallbackCustom {
470
478
  * The same as the `POST_GRID_ENTITY_RENDER` callback, but only fires for grid entities created
471
479
  * with the `spawnCustomGridEntity` helper function.
472
480
  *
473
- * When registering the callback, takes an optional second argument that will make the callback
474
- * only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
475
- * variants, so there is no need for an optional third argument to filter by variant.)
481
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
482
+ * an optional third argument that will make the callback only fire if it matches the custom
483
+ * `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
484
+ * an optional argument to filter by variant.)
476
485
  *
477
486
  * ```ts
478
487
  * function postGridEntityCustomRender(
@@ -487,9 +496,10 @@ export enum ModCallbackCustom {
487
496
  * The same as the `POST_GRID_ENTITY_STATE_CHANGED` callback, but only fires for grid entities
488
497
  * created with the `spawnCustomGridEntity` helper function.
489
498
  *
490
- * When registering the callback, takes an optional second argument that will make the callback
491
- * only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
492
- * variants, so there is no need for an optional third argument to filter by variant.)
499
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
500
+ * an optional third argument that will make the callback only fire if it matches the custom
501
+ * `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
502
+ * an optional argument to filter by variant.)
493
503
  *
494
504
  * ```ts
495
505
  * function postGridEntityCustomStateChanged(
@@ -506,9 +516,10 @@ export enum ModCallbackCustom {
506
516
  * The same as the `POST_GRID_ENTITY_UPDATE` callback, but only fires for grid entities created
507
517
  * with the `spawnCustomGridEntity` helper function.
508
518
  *
509
- * When registering the callback, takes an optional second argument that will make the callback
510
- * only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
511
- * variants, so there is no need for an optional third argument to filter by variant.)
519
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
520
+ * an optional third argument that will make the callback only fire if it matches the custom
521
+ * `GridEntityType` provided. (Custom grid entities do not have variants, so there is no need for
522
+ * an optional argument to filter by variant.)
512
523
  *
513
524
  * ```ts
514
525
  * function postGridEntityCustomUpdate(
@@ -530,10 +541,11 @@ export enum ModCallbackCustom {
530
541
  * For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
531
542
  * callback instead.
532
543
  *
533
- * - When registering the callback, takes an optional second argument that will make the callback
534
- * only fire if it matches the `GridEntityType` provided.
535
- * - When registering the callback, takes an optional third argument that will make the callback
536
- * only fire if it matches the variant provided.
544
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
545
+ * - You can provide an optional third argument that will make the callback only fire if it
546
+ * matches the `GridEntityType` provided.
547
+ * - You can provide an optional fourth argument that will make the callback only fire if it
548
+ * matches the variant provided.
537
549
  *
538
550
  * ```ts
539
551
  * function postGridEntityInit(gridEntity: GridEntity): void {}
@@ -552,10 +564,11 @@ export enum ModCallbackCustom {
552
564
  * For grid entities created with `spawnCustomGridEntity`, use the
553
565
  * `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
554
566
  *
555
- * - When registering the callback, takes an optional second argument that will make the callback
556
- * only fire if it matches the `GridEntityType` provided.
557
- * - When registering the callback, takes an optional third argument that will make the callback
558
- * only fire if it matches the variant provided.
567
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
568
+ * - You can provide an optional third argument that will make the callback only fire if it
569
+ * matches the `GridEntityType` provided.
570
+ * - You can provide an optional fourth argument that will make the callback only fire if it
571
+ * matches the variant provided.
559
572
  *
560
573
  * ```ts
561
574
  * function postGridEntityRemove(
@@ -572,10 +585,11 @@ export enum ModCallbackCustom {
572
585
  * For grid entities created with `spawnCustomGridEntity`, use the
573
586
  * `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
574
587
  *
575
- * - When registering the callback, takes an optional second argument that will make the callback
576
- * only fire if it matches the `GridEntityType` provided.
577
- * - When registering the callback, takes an optional third argument that will make the callback
578
- * only fire if it matches the variant provided.
588
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
589
+ * - You can provide an optional third argument that will make the callback only fire if it
590
+ * matches the `GridEntityType` provided.
591
+ * - You can provide an optional fourth argument that will make the callback only fire if it
592
+ * matches the variant provided.
579
593
  *
580
594
  * ```ts
581
595
  * function postGridEntityRender(gridEntity: GridEntity): void {}
@@ -590,10 +604,11 @@ export enum ModCallbackCustom {
590
604
  * For grid entities created with `spawnCustomGridEntity`, use the
591
605
  * `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
592
606
  *
593
- * - When registering the callback, takes an optional second argument that will make the callback
594
- * only fire if it matches the `GridEntityType` provided.
595
- * - When registering the callback, takes an optional third argument that will make the callback
596
- * only fire if it matches the variant provided.
607
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
608
+ * - You can provide an optional third argument that will make the callback only fire if it
609
+ * matches the `GridEntityType` provided.
610
+ * - You can provide an optional fourth argument that will make the callback only fire if it
611
+ * matches the variant provided.
597
612
  *
598
613
  * ```ts
599
614
  * function postGridEntityStateChanged(
@@ -611,10 +626,11 @@ export enum ModCallbackCustom {
611
626
  * For grid entities created with `spawnCustomGridEntity`, use the
612
627
  * `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
613
628
  *
614
- * - When registering the callback, takes an optional second argument that will make the callback
615
- * only fire if it matches the `GridEntityType` provided.
616
- * - When registering the callback, takes an optional third argument that will make the callback
617
- * only fire if it matches the variant provided.
629
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
630
+ * - You can provide an optional third argument that will make the callback only fire if it
631
+ * matches the `GridEntityType` provided.
632
+ * - You can provide an optional fourth argument that will make the callback only fire if it
633
+ * matches the variant provided.
618
634
  *
619
635
  * ```ts
620
636
  * function postGridEntityUpdate(gridEntity: GridEntity): void {}
@@ -630,10 +646,11 @@ export enum ModCallbackCustom {
630
646
  * from an enemy. Normally, you would accomplish this via the `ENTITY_TAKE_DMG` callback, but that
631
647
  * callback never fires if the player has a Holy Mantle shield.
632
648
  *
633
- * - When registering the callback, takes an optional second argument that will make the callback
634
- * only fire if the player matches the `PlayerVariant` provided.
635
- * - When registering the callback, takes an optional third argument that will make the callback
636
- * only fire if the player matches the `PlayerType` provided.
649
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
650
+ * - You can provide an optional third argument that will make the callback only fire if it
651
+ * matches the `PlayerVariant` provided.
652
+ * - You can provide an optional fourth argument that will make the callback only fire if it
653
+ * matches the `PlayerType` provided.
637
654
  *
638
655
  * ```ts
639
656
  * function postPlayerInitReordered(
@@ -655,8 +672,9 @@ export enum ModCallbackCustom {
655
672
  * Note that this callback will not fire if the active item is both discharged and swapped for
656
673
  * another item / discharged on the same frame, like in the case of Alabaster Box.
657
674
  *
658
- * When registering the callback, takes an optional second argument that will make the callback
659
- * only fire if it matches the `CollectibleType` provided.
675
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
676
+ * an optional third argument that will make the callback only fire if it matches the
677
+ * `CollectibleType` provided.
660
678
  *
661
679
  * ```ts
662
680
  * function postItemDischarge(
@@ -675,10 +693,11 @@ export enum ModCallbackCustom {
675
693
  *
676
694
  * Note that this callback will only fire once per Forgotten/Soul pair.
677
695
  *
678
- * - When registering the callback, takes an optional second argument that will make the callback
679
- * only fire if it matches the `ItemType` provided.
680
- * - When registering the callback, takes an optional third argument that will make the callback
681
- * only fire if the `CollectibleType` or the `TrinketType` matches the sub-type provided.
696
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
697
+ * - You can provide an optional third argument that will make the callback only fire if it
698
+ * matches the `ItemType` provided.
699
+ * - You can provide an optional fourth argument that will make the callback only fire if the
700
+ * sub-type matches the `CollectibleType` or the `TrinketType` provided.
682
701
  *
683
702
  * ```ts
684
703
  * function postItemPickup(
@@ -695,8 +714,9 @@ export enum ModCallbackCustom {
695
714
  * This callback is useful because many attributes cannot be set or retrieved properly in the
696
715
  * normal `POST_KNIFE_INIT` callback.
697
716
  *
698
- * When registering the callback, takes an optional second argument that will make the callback
699
- * only fire if the knife variant matches the `KnifeVariant` provided.
717
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
718
+ * an optional third argument that will make the callback only fire if it matches the
719
+ * `KnifeVariant` provided.
700
720
  *
701
721
  * ```ts
702
722
  * function postKnifeInitLate(knife: EntityKnife): void {}
@@ -710,8 +730,9 @@ export enum ModCallbackCustom {
710
730
  * This callback is useful because many attributes cannot be set or retrieved properly in the
711
731
  * normal `POST_LASER_INIT` callback.
712
732
  *
713
- * When registering the callback, takes an optional second argument that will make the callback
714
- * only fire if the laser variant matches the `LaserVariant` provided.
733
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
734
+ * an optional third argument that will make the callback only fire if it matches the
735
+ * `LaserVariant` provided.
715
736
  *
716
737
  * ```ts
717
738
  * function postLaserInitLate(laser: EntityLaser): void {}
@@ -773,8 +794,9 @@ export enum ModCallbackCustom {
773
794
  * This callback is useful because many attributes cannot be set or retrieved properly in the
774
795
  * normal `POST_NPC_INIT` callback.
775
796
  *
776
- * When registering the callback, takes an optional second argument that will make the callback
777
- * only fire if the NPC's entity type matches the entity type provided.
797
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
798
+ * an optional third argument that will make the callback only fire if it matches the `EntityType`
799
+ * provided.
778
800
  *
779
801
  * ```ts
780
802
  * function postNPCInitLate(npc: EntityNPC): void {}
@@ -786,10 +808,11 @@ export enum ModCallbackCustom {
786
808
  * Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
787
809
  * the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
788
810
  *
789
- * - When registering the callback, takes an optional second argument that will make the callback
790
- * only fire if it matches the `EntityType` provided.
791
- * - When registering the callback, takes an optional third argument that will make the callback
792
- * only fire if it matches the variant provided.
811
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
812
+ * - You can provide an optional third argument that will make the callback only fire if it
813
+ * matches the `EntityType` provided.
814
+ * - You can provide an optional fourth argument that will make the callback only fire if it
815
+ * matches the variant provided.
793
816
  *
794
817
  * ```ts
795
818
  * function postNPCStateChanged(
@@ -815,10 +838,11 @@ export enum ModCallbackCustom {
815
838
  * callback. For example, since the level is not generated yet, you will not be able to access
816
839
  * any rooms.
817
840
  *
818
- * - When registering the callback, takes an optional second argument that will make the callback
819
- * only fire if the player matches the `PlayerVariant` provided.
820
- * - When registering the callback, takes an optional third argument that will make the callback
821
- * only fire if the player matches the `PlayerType` provided.
841
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
842
+ * - You can provide an optional third argument that will make the callback only fire if it
843
+ * matches the `PlayerVariant` provided.
844
+ * - You can provide an optional fourth argument that will make the callback only fire if it
845
+ * matches the `PlayerType` provided.
822
846
  *
823
847
  * ```ts
824
848
  * function postPEffectUpdateReordered(player: EntityPlayer): void {}
@@ -831,8 +855,9 @@ export enum ModCallbackCustom {
831
855
  *
832
856
  * Use this callback to know when a pickup is added to the player's inventory or health.
833
857
  *
834
- * When registering the callback, takes an optional second argument that will make the callback
835
- * only fire if the pickup variant matches the `PickupVariant` provided.
858
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
859
+ * an optional third argument that will make the callback only fire if it matches the
860
+ * `PickupVariant` provided.
836
861
  *
837
862
  * ```ts
838
863
  * function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
@@ -847,8 +872,9 @@ export enum ModCallbackCustom {
847
872
  * This callback is useful because pickups will despawn upon leaving the room and respawn upon
848
873
  * re-entering the room.
849
874
  *
850
- * When registering the callback, takes an optional second argument that will make the callback
851
- * only fire if the collectible type matches the `PickupVariant` provided.
875
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
876
+ * an optional third argument that will make the callback only fire if it matches the
877
+ * `PickupVariant` provided.
852
878
  *
853
879
  * ```ts
854
880
  * function postPickupInitFirst(pickup: EntityPickup): void {}
@@ -862,8 +888,9 @@ export enum ModCallbackCustom {
862
888
  * This callback is useful because many attributes cannot be set or retrieved properly in the
863
889
  * normal `POST_PICKUP_INIT` callback.
864
890
  *
865
- * When registering the callback, takes an optional second argument that will make the callback
866
- * only fire if the pickup variant matches the `PickupVariant` provided.
891
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
892
+ * an optional third argument that will make the callback only fire if it matches the
893
+ * `PickupVariant` provided.
867
894
  *
868
895
  * ```ts
869
896
  * function postPickupInitLate(pickup: EntityPickup): void {}
@@ -875,8 +902,9 @@ export enum ModCallbackCustom {
875
902
  * Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
876
903
  * on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
877
904
  *
878
- * When registering the callback, takes an optional second argument that will make the callback
879
- * only fire if it matches the `PickupVariant` provided.
905
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
906
+ * an optional third argument that will make the callback only fire if it matches the
907
+ * `PickupVariant` provided.
880
908
  *
881
909
  * ```ts
882
910
  * function postPickupStateChanged(
@@ -891,8 +919,9 @@ export enum ModCallbackCustom {
891
919
  /**
892
920
  * Fires from the `POST_RENDER` callback on every frame that a pit exists.
893
921
  *
894
- * When registering the callback, takes an optional second argument that will make the callback
895
- * only fire if it matches the variant provided.
922
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
923
+ * an optional third argument that will make the callback only fire if it matches the variant
924
+ * provided.
896
925
  *
897
926
  * ```ts
898
927
  * function postPitRender(pit: GridEntityPit): void {}
@@ -903,8 +932,9 @@ export enum ModCallbackCustom {
903
932
  /**
904
933
  * Fires from the `POST_UPDATE` callback on every frame that a pit exists.
905
934
  *
906
- * When registering the callback, takes an optional second argument that will make the callback
907
- * only fire if it matches the variant provided.
935
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
936
+ * an optional third argument that will make the callback only fire if it matches the variant
937
+ * provided.
908
938
  *
909
939
  * ```ts
910
940
  * function postPitUpdate(pit: GridEntityPit): void {}
@@ -916,10 +946,11 @@ export enum ModCallbackCustom {
916
946
  * Fires from the `POST_PEFFECT_UPDATE` callback when a player's health (i.e. hearts) is different
917
947
  * than what it was on the previous frame. For more information, see the `PlayerHealth` enum.
918
948
  *
919
- * - When registering the callback, takes an optional second argument that will make the callback
920
- * only fire if the player matches the `PlayerVariant` provided.
921
- * - When registering the callback, takes an optional third argument that will make the callback
922
- * only fire if the player matches the `PlayerType` provided.
949
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
950
+ * - You can provide an optional third argument that will make the callback only fire if it
951
+ * matches the `PlayerVariant` provided.
952
+ * - You can provide an optional fourth argument that will make the callback only fire if it
953
+ * matches the `PlayerType` provided.
923
954
  *
924
955
  * ```ts
925
956
  * function postPlayerChangeHealth(
@@ -946,10 +977,11 @@ export enum ModCallbackCustom {
946
977
  * numbers. (For these cases, you should examine the `oldValue` and `newValue` arguments
947
978
  * accordingly.)
948
979
  *
949
- * - When registering the callback, takes an optional second argument that will make the callback
950
- * only fire if the player matches the `PlayerVariant` provided.
951
- * - When registering the callback, takes an optional third argument that will make the callback
952
- * only fire if the player matches the `PlayerType` provided.
980
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
981
+ * - You can provide an optional third argument that will make the callback only fire if it
982
+ * matches the `PlayerVariant` provided.
983
+ * - You can provide an optional fourth argument that will make the callback only fire if it
984
+ * matches the `PlayerType` provided.
953
985
  *
954
986
  * ```ts
955
987
  * function postPlayerChangeStat(
@@ -972,6 +1004,10 @@ export enum ModCallbackCustom {
972
1004
  * those items cause separate player entities to be created. Use the `POST_FLIP` and
973
1005
  * `POST_ESAU_JR` callbacks to handle those situations.
974
1006
  *
1007
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1008
+ * an optional third argument that will make the callback only fire if it matches the
1009
+ * `PlayerVariant` provided.
1010
+ *
975
1011
  * ```ts
976
1012
  * function postPlayerChangeType(
977
1013
  * player: EntityPlayer,
@@ -987,8 +1023,9 @@ export enum ModCallbackCustom {
987
1023
  * what it was on the previous frame, or when the active items change, or when the build is
988
1024
  * rerolled.
989
1025
  *
990
- * When registering the callback, takes an optional second argument that will make the callback
991
- * only fire if the collectible matches the `CollectibleType` provided.
1026
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1027
+ * an optional third argument that will make the callback only fire if the collectible matches the
1028
+ * `CollectibleType` provided.
992
1029
  *
993
1030
  * ```ts
994
1031
  * function postPlayerCollectibleAdded(
@@ -1004,8 +1041,9 @@ export enum ModCallbackCustom {
1004
1041
  * what it was on the previous frame, or when the active items change, or when the build is
1005
1042
  * rerolled.
1006
1043
  *
1007
- * When registering the callback, takes an optional second argument that will make the callback
1008
- * only fire if the collectible matches the `CollectibleType` provided.
1044
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1045
+ * an optional third argument that will make the callback only fire if the collectible matches the
1046
+ * `CollectibleType` provided.
1009
1047
  *
1010
1048
  * ```ts
1011
1049
  * function postPlayerCollectibleRemoved(
@@ -1023,10 +1061,11 @@ export enum ModCallbackCustom {
1023
1061
  * Note that this function does properly take into account Guppy's Collar, Broken Ankh, Spirit
1024
1062
  * Shackles, and Mysterious Paper. It also takes into account using The Bible on Satan.
1025
1063
  *
1026
- * - When registering the callback, takes an optional second argument that will make the callback
1027
- * only fire if the player matches the `PlayerVariant` provided.
1028
- * - When registering the callback, takes an optional third argument that will make the callback
1029
- * only fire if the player matches the `PlayerType` provided.
1064
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1065
+ * - You can provide an optional third argument that will make the callback only fire if it
1066
+ * matches the `PlayerVariant` provided.
1067
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1068
+ * matches the `PlayerType` provided.
1030
1069
  *
1031
1070
  * ```ts
1032
1071
  * function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
@@ -1045,10 +1084,11 @@ export enum ModCallbackCustom {
1045
1084
  * character their starting items for the run. (You do not want to use the vanilla
1046
1085
  * `POST_PLAYER_INIT` callback for this because it fires when a run is continued.)
1047
1086
  *
1048
- * - When registering the callback, takes an optional second argument that will make the callback
1049
- * only fire if the player matches the `PlayerVariant` provided.
1050
- * - When registering the callback, takes an optional third argument that will make the callback
1051
- * only fire if the player matches the `PlayerType` provided.
1087
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1088
+ * - You can provide an optional third argument that will make the callback only fire if it
1089
+ * matches the `PlayerVariant` provided.
1090
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1091
+ * matches the `PlayerType` provided.
1052
1092
  *
1053
1093
  * ```ts
1054
1094
  * function postPlayerInitFirst(player: EntityPlayer): void {}
@@ -1065,10 +1105,11 @@ export enum ModCallbackCustom {
1065
1105
  * For initializing a player with custom items and so forth, use the `POST_PLAYER_INIT_FIRST`
1066
1106
  * callback instead to handle the case of a Genesis room.
1067
1107
  *
1068
- * - When registering the callback, takes an optional second argument that will make the callback
1069
- * only fire if the player matches the `PlayerVariant` provided.
1070
- * - When registering the callback, takes an optional third argument that will make the callback
1071
- * only fire if the player matches the `PlayerType` provided.
1108
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1109
+ * - You can provide an optional third argument that will make the callback only fire if it
1110
+ * matches the `PlayerVariant` provided.
1111
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1112
+ * matches the `PlayerType` provided.
1072
1113
  *
1073
1114
  * ```ts
1074
1115
  * function postPlayerInitLate(pickup: EntityPickup): void {}
@@ -1089,10 +1130,11 @@ export enum ModCallbackCustom {
1089
1130
  * callback. For example, since the level is not generated yet, you will not be able to access
1090
1131
  * any rooms.
1091
1132
  *
1092
- * - When registering the callback, takes an optional second argument that will make the callback
1093
- * only fire if the player matches the `PlayerVariant` provided.
1094
- * - When registering the callback, takes an optional third argument that will make the callback
1095
- * only fire if the player matches the `PlayerType` provided.
1133
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1134
+ * - You can provide an optional third argument that will make the callback only fire if it
1135
+ * matches the `PlayerVariant` provided.
1136
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1137
+ * matches the `PlayerType` provided.
1096
1138
  *
1097
1139
  * ```ts
1098
1140
  * function postPlayerRenderReordered(player: EntityPlayer): void {}
@@ -1114,10 +1156,11 @@ export enum ModCallbackCustom {
1114
1156
  * callback. For example, since the level is not generated yet, you will not be able to access
1115
1157
  * any rooms.
1116
1158
  *
1117
- * - When registering the callback, takes an optional second argument that will make the callback
1118
- * only fire if the player matches the `PlayerVariant` provided.
1119
- * - When registering the callback, takes an optional third argument that will make the callback
1120
- * only fire if the player matches the `PlayerType` provided.
1159
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1160
+ * - You can provide an optional third argument that will make the callback only fire if it
1161
+ * matches the `PlayerVariant` provided.
1162
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1163
+ * matches the `PlayerType` provided.
1121
1164
  *
1122
1165
  * ```ts
1123
1166
  * function postPlayerUpdateReordered(player: EntityPlayer): void {}
@@ -1128,8 +1171,9 @@ export enum ModCallbackCustom {
1128
1171
  /**
1129
1172
  * Fires from the `POST_RENDER` callback on every frame that a poop exists.
1130
1173
  *
1131
- * When registering the callback, takes an optional second argument that will make the callback
1132
- * only fire if it matches the variant provided.
1174
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1175
+ * an optional third argument that will make the callback only fire if it matches the variant
1176
+ * provided.
1133
1177
  *
1134
1178
  * ```ts
1135
1179
  * function postPoopRender(poop: GridEntityPoop): void {}
@@ -1140,8 +1184,9 @@ export enum ModCallbackCustom {
1140
1184
  /**
1141
1185
  * Fires from the `POST_UPDATE` callback on every frame that a poop exists.
1142
1186
  *
1143
- * When registering the callback, takes an optional second argument that will make the callback
1144
- * only fire if it matches the variant provided.
1187
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1188
+ * an optional third argument that will make the callback only fire if it matches the variant
1189
+ * provided.
1145
1190
  *
1146
1191
  * ```ts
1147
1192
  * function postPoopUpdate(poop: GridEntityPoop): void {}
@@ -1152,8 +1197,9 @@ export enum ModCallbackCustom {
1152
1197
  /**
1153
1198
  * Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
1154
1199
  *
1155
- * When registering the callback, takes an optional second argument that will make the callback
1156
- * only fire if it matches the variant provided.
1200
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1201
+ * an optional third argument that will make the callback only fire if it matches the variant
1202
+ * provided.
1157
1203
  *
1158
1204
  * ```ts
1159
1205
  * function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
@@ -1164,8 +1210,9 @@ export enum ModCallbackCustom {
1164
1210
  /**
1165
1211
  * Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
1166
1212
  *
1167
- * When registering the callback, takes an optional second argument that will make the callback
1168
- * only fire if it matches the variant provided.
1213
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1214
+ * an optional third argument that will make the callback only fire if it matches the variant
1215
+ * provided.
1169
1216
  *
1170
1217
  * ```ts
1171
1218
  * function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
@@ -1179,8 +1226,9 @@ export enum ModCallbackCustom {
1179
1226
  * This callback is useful because many attributes cannot be set or retrieved properly in the
1180
1227
  * normal `POST_PROJECTILE_INIT` callback.
1181
1228
  *
1182
- * When registering the callback, takes an optional second argument that will make the callback
1183
- * only fire if the projectile variant matches the `ProjectileVariant` provided.
1229
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1230
+ * an optional third argument that will make the callback only fire if matches the
1231
+ * `ProjectileVariant` provided.
1184
1232
  *
1185
1233
  * ```ts
1186
1234
  * function postProjectileInitLate(projectile: EntityProjectile): void {}
@@ -1192,10 +1240,11 @@ export enum ModCallbackCustom {
1192
1240
  * Fires from the `POST_PEFFECT_UPDATE` callback when a player first picks up a new item. The
1193
1241
  * pickup returned in the callback is assumed to be the first pickup that no longer exists.
1194
1242
  *
1195
- * - When registering the callback, takes an optional second argument that will make the callback
1196
- * only fire if it matches the `PickupVariant` provided.
1197
- * - When registering the callback, takes an optional third argument that will make the callback
1198
- * only fire if it matches the sub-type provided.
1243
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1244
+ * - You can provide an optional third argument that will make the callback only fire if it
1245
+ * matches the `PickupVariant` provided.
1246
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1247
+ * matches the sub-type provided.
1199
1248
  *
1200
1249
  * ```ts
1201
1250
  * function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
@@ -1206,8 +1255,9 @@ export enum ModCallbackCustom {
1206
1255
  /**
1207
1256
  * Fires from the `POST_RENDER` callback on every frame that a rock exists.
1208
1257
  *
1209
- * When registering the callback, takes an optional second argument that will make the callback
1210
- * only fire if it matches the variant provided.
1258
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1259
+ * an optional third argument that will make the callback only fire if it matches the variant
1260
+ * provided.
1211
1261
  *
1212
1262
  * ```ts
1213
1263
  * function postRockRender(rock: GridEntityRock): void {}
@@ -1218,8 +1268,9 @@ export enum ModCallbackCustom {
1218
1268
  /**
1219
1269
  * Fires from the `POST_UPDATE` callback on every frame that a rock exists.
1220
1270
  *
1221
- * When registering the callback, takes an optional second argument that will make the callback
1222
- * only fire if it matches the variant provided.
1271
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1272
+ * an optional third argument that will make the callback only fire if it matches the variant
1273
+ * provided.
1223
1274
  *
1224
1275
  * ```ts
1225
1276
  * function postRockUpdate(rock: GridEntityRock): void {}
@@ -1231,8 +1282,9 @@ export enum ModCallbackCustom {
1231
1282
  * Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
1232
1283
  * the `Room.IsClear` method).
1233
1284
  *
1234
- * When registering the callback, takes an optional second argument that will make the callback
1235
- * only fire if the room clear state matches the boolean provided.
1285
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1286
+ * an optional third argument that will make the callback only fire if the room clear state
1287
+ * matches the boolean provided.
1236
1288
  *
1237
1289
  * ```ts
1238
1290
  * function postRoomClearChanged(roomClear: boolean): void {}
@@ -1244,10 +1296,11 @@ export enum ModCallbackCustom {
1244
1296
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
1245
1297
  * Room.
1246
1298
  *
1247
- * - When registering the callback, takes an optional second argument that will make the callback
1248
- * only fire if the player matches the `PlayerVariant` provided.
1249
- * - When registering the callback, takes an optional third argument that will make the callback
1250
- * only fire if the player matches the `PlayerType` provided.
1299
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1300
+ * - You can provide an optional third argument that will make the callback only fire if it
1301
+ * matches the `PlayerVariant` provided.
1302
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1303
+ * matches the `PlayerType` provided.
1251
1304
  *
1252
1305
  * ```ts
1253
1306
  * function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
@@ -1258,8 +1311,9 @@ export enum ModCallbackCustom {
1258
1311
  /**
1259
1312
  * Fires from the `POST_RENDER` callback when a slot entity's animation changes.
1260
1313
  *
1261
- * When registering the callback, takes an optional second argument that will make the callback
1262
- * only fire if it matches the `SlotVariant` provided.
1314
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1315
+ * an optional third argument that will make the callback only fire if it matches the
1316
+ * `SlotVariant` provided.
1263
1317
  *
1264
1318
  * ```ts
1265
1319
  * function postSlotAnimationChanged(slot: Entity): void {}
@@ -1275,9 +1329,10 @@ export enum ModCallbackCustom {
1275
1329
  * colliding with it on every frame. Thus, you should only perform actions in this callback under
1276
1330
  * certain conditions, like if the slot entity is playing the "Idle" animation, and so on.
1277
1331
  *
1278
- * When registering the callback, takes an optional second argument that will make the callback
1279
- * only fire if it matches the `SlotVariant` provided. (There is no need for any additional
1280
- * arguments, since only players will cause this callback to fire.)
1332
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1333
+ * an optional third argument that will make the callback only fire if it matches the
1334
+ * `SlotVariant` provided. (Only players will cause this callback to fire, so there is no need for
1335
+ * an optional argument to filter by `EntityType`.)
1281
1336
  *
1282
1337
  * ```ts
1283
1338
  * function postSlotCollision(
@@ -1292,10 +1347,11 @@ export enum ModCallbackCustom {
1292
1347
  * Fires from the `POST_RENDER` callback when a slot plays the animation that indicates that it
1293
1348
  * has broken.
1294
1349
  *
1295
- * - When registering the callback, takes an optional second argument that will make the callback
1296
- * only fire if it matches the `SlotVariant` provided.
1297
- * - When registering the callback, takes an optional third argument that will make the callback
1298
- * only fire if the destruction type matches the `SlotDestructionType` provided.
1350
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1351
+ * - You can provide an optional third argument that will make the callback only fire if it
1352
+ * matches the `SlotVariant` provided.
1353
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1354
+ * matches the `SlotDestructionType` provided.
1299
1355
  *
1300
1356
  * ```ts
1301
1357
  * function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
@@ -1311,8 +1367,9 @@ export enum ModCallbackCustom {
1311
1367
  * - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when a
1312
1368
  * Wheel of Fortune card is used)
1313
1369
  *
1314
- * When registering the callback, takes an optional second argument that will make the callback
1315
- * only fire if it matches the `SlotVariant` provided.
1370
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1371
+ * an optional third argument that will make the callback only fire if it matches the
1372
+ * `SlotVariant` provided.
1316
1373
  *
1317
1374
  * ```ts
1318
1375
  * function postSlotInit(slot: Entity): void {}
@@ -1323,8 +1380,9 @@ export enum ModCallbackCustom {
1323
1380
  /**
1324
1381
  * Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
1325
1382
  *
1326
- * When registering the callback, takes an optional second argument that will make the callback
1327
- * only fire if it matches the `SlotVariant` provided.
1383
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1384
+ * an optional third argument that will make the callback only fire if it matches the
1385
+ * `SlotVariant` provided.
1328
1386
  *
1329
1387
  * ```ts
1330
1388
  * function postSlotRender(slot: Entity): void {}
@@ -1335,8 +1393,9 @@ export enum ModCallbackCustom {
1335
1393
  /**
1336
1394
  * Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
1337
1395
  *
1338
- * When registering the callback, takes an optional second argument that will make the callback
1339
- * only fire if it matches the `SlotVariant` provided.
1396
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1397
+ * an optional third argument that will make the callback only fire if it matches the
1398
+ * `SlotVariant` provided.
1340
1399
  *
1341
1400
  * ```ts
1342
1401
  * function postSlotUpdate(slot: Entity): void {}
@@ -1347,8 +1406,9 @@ export enum ModCallbackCustom {
1347
1406
  /**
1348
1407
  * Fires from the `POST_RENDER` callback on every frame that spikes exist.
1349
1408
  *
1350
- * When registering the callback, takes an optional second argument that will make the callback
1351
- * only fire if it matches the variant provided.
1409
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1410
+ * an optional third argument that will make the callback only fire if it matches the variant
1411
+ * provided.
1352
1412
  *
1353
1413
  * ```ts
1354
1414
  * function postSpikesRender(spikes: GridEntitySpikes): void {}
@@ -1359,8 +1419,9 @@ export enum ModCallbackCustom {
1359
1419
  /**
1360
1420
  * Fires from the `POST_UPDATE` callback on every frame that spikes exist.
1361
1421
  *
1362
- * When registering the callback, takes an optional second argument that will make the callback
1363
- * only fire if it matches the variant provided.
1422
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1423
+ * an optional third argument that will make the callback only fire if it matches the variant
1424
+ * provided.
1364
1425
  *
1365
1426
  * ```ts
1366
1427
  * function postSpikesUpdate(spikes: GridEntitySpikes): void {}
@@ -1375,8 +1436,9 @@ export enum ModCallbackCustom {
1375
1436
  * This callback is useful because many attributes cannot be set or retrieved properly in the
1376
1437
  * normal `POST_TEAR_INIT` callback.
1377
1438
  *
1378
- * When registering the callback, takes an optional second argument that will make the callback
1379
- * only fire if the tear variant matches the `TearVariant` provided.
1439
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1440
+ * an optional third argument that will make the callback only fire if it matches the
1441
+ * `TearVariant` provided.
1380
1442
  *
1381
1443
  * ```ts
1382
1444
  * function postTearInitLate(tear: EntityTear): void {}
@@ -1390,8 +1452,9 @@ export enum ModCallbackCustom {
1390
1452
  *
1391
1453
  * This callback is useful because Incubus tears are not distinguishable until the second frame.
1392
1454
  *
1393
- * When registering the callback, takes an optional second argument that will make the callback
1394
- * only fire if the tear variant matches the `TearVariant` provided.
1455
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1456
+ * an optional third argument that will make the callback only fire if it matches the
1457
+ * `TearVariant` provided.
1395
1458
  *
1396
1459
  * ```ts
1397
1460
  * function postTearInitVeryLate(tear: EntityTear): void {}
@@ -1402,8 +1465,9 @@ export enum ModCallbackCustom {
1402
1465
  /**
1403
1466
  * Fires from the `POST_RENDER` callback on every frame that a TNT exists.
1404
1467
  *
1405
- * When registering the callback, takes an optional second argument that will make the callback
1406
- * only fire if it matches the variant provided.
1468
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1469
+ * an optional third argument that will make the callback only fire if it matches the variant
1470
+ * provided.
1407
1471
  *
1408
1472
  * ```ts
1409
1473
  * function postTNTRender(tnt: GridEntityTNT): void {}
@@ -1414,8 +1478,9 @@ export enum ModCallbackCustom {
1414
1478
  /**
1415
1479
  * Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
1416
1480
  *
1417
- * When registering the callback, takes an optional second argument that will make the callback
1418
- * only fire if it matches the variant provided.
1481
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1482
+ * an optional third argument that will make the callback only fire if it matches the variant
1483
+ * provided.
1419
1484
  *
1420
1485
  * ```ts
1421
1486
  * function postTNTUpdate(tnt: GridEntityTNT): void {}
@@ -1429,8 +1494,9 @@ export enum ModCallbackCustom {
1429
1494
  *
1430
1495
  * Note that this callback will only fire once per Forgotten/Soul pair.
1431
1496
  *
1432
- * When registering the callback, takes an optional second argument that will make the callback
1433
- * only fire if it matches the `PlayerForm` provided.
1497
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1498
+ * an optional third argument that will make the callback only fire if it matches the `PlayerForm`
1499
+ * provided.
1434
1500
  *
1435
1501
  * ```ts
1436
1502
  * function postTransformation(
@@ -1445,8 +1511,9 @@ export enum ModCallbackCustom {
1445
1511
  /**
1446
1512
  * Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
1447
1513
  *
1448
- * When registering the callback, takes an optional second argument that will make the callback
1449
- * only fire if it matches the `TrinketType` provided.
1514
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method, you can provide
1515
+ * an optional third argument that will make the callback only fire if it matches the
1516
+ * `TrinketType` provided.
1450
1517
  *
1451
1518
  * ```ts
1452
1519
  * function postTrinketBreak(
@@ -1462,10 +1529,11 @@ export enum ModCallbackCustom {
1462
1529
  * the player is predicted to die (e.g. they currently have no health left or they took damage in
1463
1530
  * a "Lost" form).
1464
1531
  *
1465
- * - When registering the callback, takes an optional second argument that will make the callback
1466
- * only fire if the player matches the `PlayerVariant` provided.
1467
- * - When registering the callback, takes an optional third argument that will make the callback
1468
- * only fire if the player matches the `PlayerType` provided.
1532
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1533
+ * - You can provide an optional third argument that will make the callback only fire if it
1534
+ * matches the `PlayerVariant` provided.
1535
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1536
+ * matches the `PlayerType` provided.
1469
1537
  *
1470
1538
  * ```ts
1471
1539
  * function preBerserkDeath(player: EntityPlayer): void {}
@@ -1481,10 +1549,11 @@ export enum ModCallbackCustom {
1481
1549
  * This callback is useful because reviving the player after the game things that player should
1482
1550
  * have died will result in the save data for the run getting deleted.
1483
1551
  *
1484
- * - When registering the callback, takes an optional second argument that will make the callback
1485
- * only fire if the player matches the `PlayerVariant` provided.
1486
- * - When registering the callback, takes an optional third argument that will make the callback
1487
- * only fire if the player matches the `PlayerType` provided.
1552
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1553
+ * - You can provide an optional third argument that will make the callback only fire if it
1554
+ * matches the `PlayerVariant` provided.
1555
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1556
+ * matches the `PlayerType` provided.
1488
1557
  *
1489
1558
  * ```ts
1490
1559
  * function preCustomRevive(player: EntityPlayer): int | undefined {}
@@ -1501,10 +1570,11 @@ export enum ModCallbackCustom {
1501
1570
  * note that this callback will continue to fire for every frame that the player touches the
1502
1571
  * pedestal, so you would need to continue returning false.)
1503
1572
  *
1504
- * - When registering the callback, takes an optional second argument that will make the callback
1505
- * only fire if the player matches the `PlayerVariant` provided.
1506
- * - When registering the callback, takes an optional third argument that will make the callback
1507
- * only fire if the player matches the `PlayerType` provided.
1573
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1574
+ * - You can provide an optional third argument that will make the callback only fire if it
1575
+ * matches the `PlayerVariant` provided.
1576
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1577
+ * matches the `PlayerType` provided.
1508
1578
  *
1509
1579
  * ```ts
1510
1580
  * function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
@@ -1518,10 +1588,11 @@ export enum ModCallbackCustom {
1518
1588
  *
1519
1589
  * Note that this callback will only fire once per Forgotten/Soul pair.
1520
1590
  *
1521
- * - When registering the callback, takes an optional second argument that will make the callback
1522
- * only fire if it matches the `ItemType` provided.
1523
- * - When registering the callback, takes an optional third argument that will make the callback
1524
- * only fire if the `CollectibleType` or the `TrinketType` matches the ID provided.
1591
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1592
+ * - You can provide an optional third argument that will make the callback only fire if it
1593
+ * matches the `ItemType` provided.
1594
+ * - You can provide an optional fourth argument that will make the callback only fire if the
1595
+ * sub-type matches the `CollectibleType` or the `TrinketType` provided.
1525
1596
  *
1526
1597
  * ```ts
1527
1598
  * function preItemPickup(