isaacscript-common 27.11.0 → 27.13.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 (51) hide show
  1. package/dist/index.rollup.d.ts +211 -67
  2. package/dist/isaacscript-common.lua +297 -68
  3. package/dist/src/callbackClasses.d.ts +7 -0
  4. package/dist/src/callbackClasses.d.ts.map +1 -1
  5. package/dist/src/callbackClasses.lua +35 -0
  6. package/dist/src/callbacks.d.ts +74 -67
  7. package/dist/src/callbacks.d.ts.map +1 -1
  8. package/dist/src/callbacks.lua +7 -0
  9. package/dist/src/classes/callbacks/PostKnifeInitFilter.d.ts +9 -0
  10. package/dist/src/classes/callbacks/PostKnifeInitFilter.d.ts.map +1 -0
  11. package/dist/src/classes/callbacks/PostKnifeInitFilter.lua +23 -0
  12. package/dist/src/classes/callbacks/PostKnifeRenderFilter.d.ts +9 -0
  13. package/dist/src/classes/callbacks/PostKnifeRenderFilter.d.ts.map +1 -0
  14. package/dist/src/classes/callbacks/PostKnifeRenderFilter.lua +23 -0
  15. package/dist/src/classes/callbacks/PostKnifeUpdateFilter.d.ts +9 -0
  16. package/dist/src/classes/callbacks/PostKnifeUpdateFilter.d.ts.map +1 -0
  17. package/dist/src/classes/callbacks/PostKnifeUpdateFilter.lua +23 -0
  18. package/dist/src/classes/callbacks/PostLaserInitFilter.d.ts +9 -0
  19. package/dist/src/classes/callbacks/PostLaserInitFilter.d.ts.map +1 -0
  20. package/dist/src/classes/callbacks/PostLaserInitFilter.lua +23 -0
  21. package/dist/src/classes/callbacks/PostLaserRenderFilter.d.ts +9 -0
  22. package/dist/src/classes/callbacks/PostLaserRenderFilter.d.ts.map +1 -0
  23. package/dist/src/classes/callbacks/PostLaserRenderFilter.lua +23 -0
  24. package/dist/src/classes/callbacks/PostLaserUpdateFilter.d.ts +9 -0
  25. package/dist/src/classes/callbacks/PostLaserUpdateFilter.d.ts.map +1 -0
  26. package/dist/src/classes/callbacks/PostLaserUpdateFilter.lua +23 -0
  27. package/dist/src/classes/callbacks/PreKnifeCollisionFilter.d.ts +9 -0
  28. package/dist/src/classes/callbacks/PreKnifeCollisionFilter.d.ts.map +1 -0
  29. package/dist/src/classes/callbacks/PreKnifeCollisionFilter.lua +21 -0
  30. package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
  31. package/dist/src/enums/ModCallbackCustom.d.ts +176 -67
  32. package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
  33. package/dist/src/enums/ModCallbackCustom.lua +81 -67
  34. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +35 -0
  35. package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
  36. package/dist/src/shouldFire.d.ts +2 -2
  37. package/dist/src/shouldFire.d.ts.map +1 -1
  38. package/package.json +2 -2
  39. package/src/callbackClasses.ts +7 -0
  40. package/src/callbacks.ts +7 -0
  41. package/src/classes/callbacks/PostKnifeInitFilter.ts +22 -0
  42. package/src/classes/callbacks/PostKnifeRenderFilter.ts +22 -0
  43. package/src/classes/callbacks/PostKnifeUpdateFilter.ts +22 -0
  44. package/src/classes/callbacks/PostLaserInitFilter.ts +22 -0
  45. package/src/classes/callbacks/PostLaserRenderFilter.ts +22 -0
  46. package/src/classes/callbacks/PostLaserUpdateFilter.ts +22 -0
  47. package/src/classes/callbacks/PreKnifeCollisionFilter.ts +24 -0
  48. package/src/classes/private/CustomCallback.ts +4 -0
  49. package/src/enums/ModCallbackCustom.ts +116 -0
  50. package/src/interfaces/private/AddCallbackParametersCustom.ts +46 -0
  51. package/src/shouldFire.ts +5 -2
@@ -900,6 +900,21 @@ export declare enum ModCallbackCustom {
900
900
  * ```
901
901
  */
902
902
  POST_KEYBOARD_CHANGED = 51,
903
+ /**
904
+ * The exact same thing as the vanilla `POST_KNIFE_INIT` callback, except this callback allows you
905
+ * to specify extra arguments for additional filtration.
906
+ *
907
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
908
+ * - You can provide an optional third argument that will make the callback only fire if it
909
+ * matches the `KnifeVariant` provided.
910
+ * - You can provide an optional fourth argument that will make the callback only fire if it
911
+ * matches the sub-type provided.
912
+ *
913
+ * ```ts
914
+ * function postKnifeInitFilter(knife: EntityKnife): void {}
915
+ * ```
916
+ */
917
+ POST_KNIFE_INIT_FILTER = 52,
903
918
  /**
904
919
  * Fires on the first `POST_KNIFE_UPDATE` frame for each knife.
905
920
  *
@@ -916,7 +931,52 @@ export declare enum ModCallbackCustom {
916
931
  * function postKnifeInitLate(knife: EntityKnife): void {}
917
932
  * ```
918
933
  */
919
- POST_KNIFE_INIT_LATE = 52,
934
+ POST_KNIFE_INIT_LATE = 53,
935
+ /**
936
+ * The exact same thing as the vanilla `POST_KNIFE_RENDER` callback, except this callback allows
937
+ * you to specify extra arguments for additional filtration.
938
+ *
939
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
940
+ * - You can provide an optional third argument that will make the callback only fire if it
941
+ * matches the `KnifeVariant` provided.
942
+ * - You can provide an optional fourth argument that will make the callback only fire if it
943
+ * matches the sub-type provided.
944
+ *
945
+ * ```ts
946
+ * function postKnifeRenderFilter(knife: EntityKnife, renderOffset: Vector): void {}
947
+ * ```
948
+ */
949
+ POST_KNIFE_RENDER_FILTER = 54,
950
+ /**
951
+ * The exact same thing as the vanilla `POST_KNIFE_UPDATE` callback, except this callback allows
952
+ * you to specify extra arguments for additional filtration.
953
+ *
954
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
955
+ * - You can provide an optional third argument that will make the callback only fire if it
956
+ * matches the `KnifeVariant` provided.
957
+ * - You can provide an optional fourth argument that will make the callback only fire if it
958
+ * matches the sub-type provided.
959
+ *
960
+ * ```ts
961
+ * function postKnifeUpdateFilter(knife: EntityKnife): void {}
962
+ * ```
963
+ */
964
+ POST_KNIFE_UPDATE_FILTER = 55,
965
+ /**
966
+ * The exact same thing as the vanilla `POST_LASER_INIT` callback, except this callback allows you
967
+ * to specify extra arguments for additional filtration.
968
+ *
969
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
970
+ * - You can provide an optional third argument that will make the callback only fire if it
971
+ * matches the `LaserVariant` provided.
972
+ * - You can provide an optional fourth argument that will make the callback only fire if it
973
+ * matches the sub-type provided.
974
+ *
975
+ * ```ts
976
+ * function postLaserInitFilter(laser: EntityLaser): void {}
977
+ * ```
978
+ */
979
+ POST_LASER_INIT_FILTER = 56,
920
980
  /**
921
981
  * Fires on the first `POST_LASER_UPDATE` frame for each laser.
922
982
  *
@@ -933,7 +993,37 @@ export declare enum ModCallbackCustom {
933
993
  * function postLaserInitLate(laser: EntityLaser): void {}
934
994
  * ```
935
995
  */
936
- POST_LASER_INIT_LATE = 53,
996
+ POST_LASER_INIT_LATE = 57,
997
+ /**
998
+ * The exact same thing as the vanilla `POST_LASER_RENDER` callback, except this callback allows
999
+ * you to specify extra arguments for additional filtration.
1000
+ *
1001
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1002
+ * - You can provide an optional third argument that will make the callback only fire if it
1003
+ * matches the `LaserVariant` provided.
1004
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1005
+ * matches the sub-type provided.
1006
+ *
1007
+ * ```ts
1008
+ * function postLaserRenderFilter(laser: EntityLaser, renderOffset: Vector): void {}
1009
+ * ```
1010
+ */
1011
+ POST_LASER_RENDER_FILTER = 58,
1012
+ /**
1013
+ * The exact same thing as the vanilla `POST_LASER_UPDATE` callback, except this callback allows
1014
+ * you to specify extra arguments for additional filtration.
1015
+ *
1016
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
1017
+ * - You can provide an optional third argument that will make the callback only fire if it
1018
+ * matches the `LaserVariant` provided.
1019
+ * - You can provide an optional fourth argument that will make the callback only fire if it
1020
+ * matches the sub-type provided.
1021
+ *
1022
+ * ```ts
1023
+ * function postLaserUpdateFilter(laser: EntityLaser): void {}
1024
+ * ```
1025
+ */
1026
+ POST_LASER_UPDATE_FILTER = 59,
937
1027
  /**
938
1028
  * The same as the vanilla callback of the same name, but fires in the correct order with respect
939
1029
  * to the `POST_GAME_STARTED` and the `POST_NEW_ROOM` callbacks:
@@ -959,7 +1049,7 @@ export declare enum ModCallbackCustom {
959
1049
  * function postNewLevelReordered(stage: LevelStage, stageType: StageType): void {}
960
1050
  * ```
961
1051
  */
962
- POST_NEW_LEVEL_REORDERED = 54,
1052
+ POST_NEW_LEVEL_REORDERED = 60,
963
1053
  /**
964
1054
  * Fires on the first `POST_NEW_ROOM` or `PRE_ENTITY_SPAWN` callback where being in a new room is
965
1055
  * detected. This is useful because the vanilla `POST_NEW_ROOM` callback fires only after entities
@@ -976,7 +1066,7 @@ export declare enum ModCallbackCustom {
976
1066
  * function postNewRoomEarly(roomType: RoomType): void {}
977
1067
  * ```
978
1068
  */
979
- POST_NEW_ROOM_EARLY = 55,
1069
+ POST_NEW_ROOM_EARLY = 61,
980
1070
  /**
981
1071
  * The same as the vanilla callback of the same name, but fires in the correct order with respect
982
1072
  * to the `POST_GAME_STARTED` and the `POST_NEW_LEVEL` callbacks:
@@ -999,7 +1089,7 @@ export declare enum ModCallbackCustom {
999
1089
  * function postNewRoomReordered(roomType: RoomType): void {}
1000
1090
  * ```
1001
1091
  */
1002
- POST_NEW_ROOM_REORDERED = 56,
1092
+ POST_NEW_ROOM_REORDERED = 62,
1003
1093
  /**
1004
1094
  * The exact same thing as the vanilla `POST_NPC_DEATH` callback, except this callback allows you
1005
1095
  * to specify extra arguments for additional filtration.
@@ -1016,7 +1106,7 @@ export declare enum ModCallbackCustom {
1016
1106
  * function postNPCDeathFilter(npc: EntityNPC): void {}
1017
1107
  * ```
1018
1108
  */
1019
- POST_NPC_DEATH_FILTER = 57,
1109
+ POST_NPC_DEATH_FILTER = 63,
1020
1110
  /**
1021
1111
  * The exact same thing as the vanilla `POST_NPC_INIT` callback, except this callback allows you
1022
1112
  * to specify extra arguments for additional filtration.
@@ -1033,7 +1123,7 @@ export declare enum ModCallbackCustom {
1033
1123
  * function postNPCInitFilter(npc: EntityNPC): void {}
1034
1124
  * ```
1035
1125
  */
1036
- POST_NPC_INIT_FILTER = 58,
1126
+ POST_NPC_INIT_FILTER = 64,
1037
1127
  /**
1038
1128
  * Fires on the first `NPC_UPDATE` frame for each NPC.
1039
1129
  *
@@ -1052,7 +1142,7 @@ export declare enum ModCallbackCustom {
1052
1142
  * function postNPCInitLate(npc: EntityNPC): void {}
1053
1143
  * ```
1054
1144
  */
1055
- POST_NPC_INIT_LATE = 59,
1145
+ POST_NPC_INIT_LATE = 65,
1056
1146
  /**
1057
1147
  * The exact same thing as the vanilla `POST_NPC_RENDER` callback, except this callback allows you
1058
1148
  * to specify extra arguments for additional filtration.
@@ -1069,7 +1159,7 @@ export declare enum ModCallbackCustom {
1069
1159
  * function postNPCRenderFilter(npc: EntityNPC, renderOffset: Vector): void {}
1070
1160
  * ```
1071
1161
  */
1072
- POST_NPC_RENDER_FILTER = 60,
1162
+ POST_NPC_RENDER_FILTER = 66,
1073
1163
  /**
1074
1164
  * Fires from the `POST_NPC_UPDATE` callback when an NPC's state has changed from what it was on
1075
1165
  * the previous frame. (In this context, "state" refers to the `EntityNPC.State` field.)
@@ -1090,7 +1180,7 @@ export declare enum ModCallbackCustom {
1090
1180
  * ): void {}
1091
1181
  * ```
1092
1182
  */
1093
- POST_NPC_STATE_CHANGED = 61,
1183
+ POST_NPC_STATE_CHANGED = 67,
1094
1184
  /**
1095
1185
  * The exact same thing as the vanilla `POST_NPC_UPDATE` callback, except this callback allows you
1096
1186
  * to specify extra arguments for additional filtration.
@@ -1107,7 +1197,7 @@ export declare enum ModCallbackCustom {
1107
1197
  * function postNPCUpdateFilter(npc: EntityNPC): void {}
1108
1198
  * ```
1109
1199
  */
1110
- POST_NPC_UPDATE_FILTER = 62,
1200
+ POST_NPC_UPDATE_FILTER = 68,
1111
1201
  /**
1112
1202
  * Similar to the vanilla callback of the same name, but fires after the
1113
1203
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -1132,7 +1222,7 @@ export declare enum ModCallbackCustom {
1132
1222
  * function postPEffectUpdateReordered(player: EntityPlayer): void {}
1133
1223
  * ```
1134
1224
  */
1135
- POST_PEFFECT_UPDATE_REORDERED = 63,
1225
+ POST_PEFFECT_UPDATE_REORDERED = 69,
1136
1226
  /**
1137
1227
  * Fires from the `POST_PICKUP_UPDATE` callback when a pickup has a different variant or sub-type
1138
1228
  * than what it was on the previous frame.
@@ -1153,7 +1243,7 @@ export declare enum ModCallbackCustom {
1153
1243
  * ): void {}
1154
1244
  * ```
1155
1245
  */
1156
- POST_PICKUP_CHANGED = 64,
1246
+ POST_PICKUP_CHANGED = 70,
1157
1247
  /**
1158
1248
  * Fires on the first `POST_RENDER` frame that a pickup plays the "Collect" animation.
1159
1249
  *
@@ -1172,7 +1262,7 @@ export declare enum ModCallbackCustom {
1172
1262
  * function postPickupCollect(pickup: EntityPickup, player: EntityPlayer): void {}
1173
1263
  * ```
1174
1264
  */
1175
- POST_PICKUP_COLLECT = 65,
1265
+ POST_PICKUP_COLLECT = 71,
1176
1266
  /**
1177
1267
  * The exact same thing as the vanilla `POST_PICKUP_INIT` callback, except this callback allows
1178
1268
  * you to specify extra arguments for additional filtration.
@@ -1187,7 +1277,7 @@ export declare enum ModCallbackCustom {
1187
1277
  * function postPickupInitFilter(pickup: EntityPickup): void {}
1188
1278
  * ```
1189
1279
  */
1190
- POST_PICKUP_INIT_FILTER = 66,
1280
+ POST_PICKUP_INIT_FILTER = 72,
1191
1281
  /**
1192
1282
  * Fires from the `POST_PICKUP_INIT` callback on the first time that a player has seen the
1193
1283
  * respective pickup on the run.
@@ -1205,7 +1295,7 @@ export declare enum ModCallbackCustom {
1205
1295
  * function postPickupInitFirst(pickup: EntityPickup): void {}
1206
1296
  * ```
1207
1297
  */
1208
- POST_PICKUP_INIT_FIRST = 67,
1298
+ POST_PICKUP_INIT_FIRST = 73,
1209
1299
  /**
1210
1300
  * Fires on the first `POST_PICKUP_UPDATE` frame for each pickup.
1211
1301
  *
@@ -1222,7 +1312,7 @@ export declare enum ModCallbackCustom {
1222
1312
  * function postPickupInitLate(pickup: EntityPickup): void {}
1223
1313
  * ```
1224
1314
  */
1225
- POST_PICKUP_INIT_LATE = 68,
1315
+ POST_PICKUP_INIT_LATE = 74,
1226
1316
  /**
1227
1317
  * The exact same thing as the vanilla `POST_PICKUP_RENDER` callback, except this callback allows
1228
1318
  * you to specify extra arguments for additional filtration.
@@ -1237,7 +1327,7 @@ export declare enum ModCallbackCustom {
1237
1327
  * function postPickupRenderFilter(pickup: EntityPickup, renderOffset: Vector): void {}
1238
1328
  * ```
1239
1329
  */
1240
- POST_PICKUP_RENDER_FILTER = 69,
1330
+ POST_PICKUP_RENDER_FILTER = 75,
1241
1331
  /**
1242
1332
  * The exact same thing as the vanilla `POST_PICKUP_SELECTION` callback, except this callback
1243
1333
  * allows you to specify extra arguments for additional filtration.
@@ -1256,7 +1346,7 @@ export declare enum ModCallbackCustom {
1256
1346
  * ): [PickupVariant, int] | undefined {}
1257
1347
  * ```
1258
1348
  */
1259
- POST_PICKUP_SELECTION_FILTER = 70,
1349
+ POST_PICKUP_SELECTION_FILTER = 76,
1260
1350
  /**
1261
1351
  * Fires from the `POST_PICKUP_UPDATE` callback when a pickup's state has changed from what it was
1262
1352
  * on the previous frame. (In this context, "state" refers to the `EntityPickup.State` field.)
@@ -1275,7 +1365,7 @@ export declare enum ModCallbackCustom {
1275
1365
  * ): void {}
1276
1366
  * ```
1277
1367
  */
1278
- POST_PICKUP_STATE_CHANGED = 71,
1368
+ POST_PICKUP_STATE_CHANGED = 77,
1279
1369
  /**
1280
1370
  * The exact same thing as the vanilla `POST_PICKUP_UPDATE` callback, except this callback allows
1281
1371
  * you to specify extra arguments for additional filtration.
@@ -1290,7 +1380,7 @@ export declare enum ModCallbackCustom {
1290
1380
  * function postPickupUpdateFilter(pickup: EntityPickup): void {}
1291
1381
  * ```
1292
1382
  */
1293
- POST_PICKUP_UPDATE_FILTER = 72,
1383
+ POST_PICKUP_UPDATE_FILTER = 78,
1294
1384
  /**
1295
1385
  * Fires from the `POST_RENDER` callback on every frame that a pit exists.
1296
1386
  *
@@ -1302,7 +1392,7 @@ export declare enum ModCallbackCustom {
1302
1392
  * function postPitRender(pit: GridEntityPit): void {}
1303
1393
  * ```
1304
1394
  */
1305
- POST_PIT_RENDER = 73,
1395
+ POST_PIT_RENDER = 79,
1306
1396
  /**
1307
1397
  * Fires from the `POST_UPDATE` callback on every frame that a pit exists.
1308
1398
  *
@@ -1314,7 +1404,7 @@ export declare enum ModCallbackCustom {
1314
1404
  * function postPitUpdate(pit: GridEntityPit): void {}
1315
1405
  * ```
1316
1406
  */
1317
- POST_PIT_UPDATE = 74,
1407
+ POST_PIT_UPDATE = 80,
1318
1408
  /**
1319
1409
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's health (i.e. hearts) is
1320
1410
  * different than what it was on the previous frame. For more information, see the `PlayerHealth`
@@ -1336,7 +1426,7 @@ export declare enum ModCallbackCustom {
1336
1426
  * ): void {}
1337
1427
  * ```
1338
1428
  */
1339
- POST_PLAYER_CHANGE_HEALTH = 75,
1429
+ POST_PLAYER_CHANGE_HEALTH = 81,
1340
1430
  /**
1341
1431
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when one of the player's stats change
1342
1432
  * from what they were on the previous frame.
@@ -1366,7 +1456,7 @@ export declare enum ModCallbackCustom {
1366
1456
  * ) => void {}
1367
1457
  * ```
1368
1458
  */
1369
- POST_PLAYER_CHANGE_STAT = 76,
1459
+ POST_PLAYER_CHANGE_STAT = 82,
1370
1460
  /**
1371
1461
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player entity changes its player
1372
1462
  * type
@@ -1389,7 +1479,7 @@ export declare enum ModCallbackCustom {
1389
1479
  * ): void {}
1390
1480
  * ```
1391
1481
  */
1392
- POST_PLAYER_CHANGE_TYPE = 77,
1482
+ POST_PLAYER_CHANGE_TYPE = 83,
1393
1483
  /**
1394
1484
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
1395
1485
  * higher than what it was on the previous frame, or when the active items change, or when the
@@ -1406,7 +1496,7 @@ export declare enum ModCallbackCustom {
1406
1496
  * ): void {}
1407
1497
  * ```
1408
1498
  */
1409
- POST_PLAYER_COLLECTIBLE_ADDED = 78,
1499
+ POST_PLAYER_COLLECTIBLE_ADDED = 84,
1410
1500
  /**
1411
1501
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player's collectible count is
1412
1502
  * lower than what it was on the previous frame, or when the active items change, or when the
@@ -1423,7 +1513,7 @@ export declare enum ModCallbackCustom {
1423
1513
  * ): void {}
1424
1514
  * ```
1425
1515
  */
1426
- POST_PLAYER_COLLECTIBLE_REMOVED = 79,
1516
+ POST_PLAYER_COLLECTIBLE_REMOVED = 85,
1427
1517
  /**
1428
1518
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes fatal damage. Return false to
1429
1519
  * prevent the fatal damage.
@@ -1441,7 +1531,7 @@ export declare enum ModCallbackCustom {
1441
1531
  * function postPlayerFatalDamage(player: EntityPlayer): boolean | undefined {}
1442
1532
  * ```
1443
1533
  */
1444
- POST_PLAYER_FATAL_DAMAGE = 80,
1534
+ POST_PLAYER_FATAL_DAMAGE = 86,
1445
1535
  /**
1446
1536
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
1447
1537
  * `POST_PLAYER_INIT_LATE` callback, with two changes:
@@ -1463,7 +1553,7 @@ export declare enum ModCallbackCustom {
1463
1553
  * function postPlayerInitFirst(player: EntityPlayer): void {}
1464
1554
  * ```
1465
1555
  */
1466
- POST_PLAYER_INIT_FIRST = 81,
1556
+ POST_PLAYER_INIT_FIRST = 87,
1467
1557
  /**
1468
1558
  * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
1469
1559
  *
@@ -1483,7 +1573,7 @@ export declare enum ModCallbackCustom {
1483
1573
  * function postPlayerInitLate(pickup: EntityPickup): void {}
1484
1574
  * ```
1485
1575
  */
1486
- POST_PLAYER_INIT_LATE = 82,
1576
+ POST_PLAYER_INIT_LATE = 88,
1487
1577
  /**
1488
1578
  * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
1489
1579
  * callback fires (if the player is spawning on the 0th game frame of the run).
@@ -1507,7 +1597,7 @@ export declare enum ModCallbackCustom {
1507
1597
  * function postPlayerRenderReordered(player: EntityPlayer, renderOffset: Vector): void {}
1508
1598
  * ```
1509
1599
  */
1510
- POST_PLAYER_RENDER_REORDERED = 83,
1600
+ POST_PLAYER_RENDER_REORDERED = 89,
1511
1601
  /**
1512
1602
  * Similar to the vanilla callback of the same name, but fires after the
1513
1603
  * `POST_GAME_STARTED_REORDERED` callback fires (if the player is being updated on the 0th game
@@ -1532,7 +1622,7 @@ export declare enum ModCallbackCustom {
1532
1622
  * function postPlayerUpdateReordered(player: EntityPlayer): void {}
1533
1623
  * ```
1534
1624
  */
1535
- POST_PLAYER_UPDATE_REORDERED = 84,
1625
+ POST_PLAYER_UPDATE_REORDERED = 90,
1536
1626
  /**
1537
1627
  * Fires from the `POST_RENDER` callback on every frame that a poop exists.
1538
1628
  *
@@ -1544,7 +1634,7 @@ export declare enum ModCallbackCustom {
1544
1634
  * function postPoopRender(poop: GridEntityPoop): void {}
1545
1635
  * ```
1546
1636
  */
1547
- POST_POOP_RENDER = 85,
1637
+ POST_POOP_RENDER = 91,
1548
1638
  /**
1549
1639
  * Fires from the `POST_UPDATE` callback on every frame that a poop exists.
1550
1640
  *
@@ -1556,7 +1646,7 @@ export declare enum ModCallbackCustom {
1556
1646
  * function postPoopUpdate(poop: GridEntityPoop): void {}
1557
1647
  * ```
1558
1648
  */
1559
- POST_POOP_UPDATE = 86,
1649
+ POST_POOP_UPDATE = 92,
1560
1650
  /**
1561
1651
  * Fires from the `POST_RENDER` callback on every frame that a pressure plate exists.
1562
1652
  *
@@ -1568,7 +1658,7 @@ export declare enum ModCallbackCustom {
1568
1658
  * function postPressurePlateRender(pressurePlate: GridEntityPressurePlate): void {}
1569
1659
  * ```
1570
1660
  */
1571
- POST_PRESSURE_PLATE_RENDER = 87,
1661
+ POST_PRESSURE_PLATE_RENDER = 93,
1572
1662
  /**
1573
1663
  * Fires from the `POST_UPDATE` callback on every frame that a pressure plate exists.
1574
1664
  *
@@ -1580,7 +1670,7 @@ export declare enum ModCallbackCustom {
1580
1670
  * function postPressurePlateUpdate(pressurePlate: GridEntityPressurePlate): void {}
1581
1671
  * ```
1582
1672
  */
1583
- POST_PRESSURE_PLATE_UPDATE = 88,
1673
+ POST_PRESSURE_PLATE_UPDATE = 94,
1584
1674
  /**
1585
1675
  * Fires on the first `POST_PROJECTILE_UPDATE` frame for each projectile.
1586
1676
  *
@@ -1597,7 +1687,7 @@ export declare enum ModCallbackCustom {
1597
1687
  * function postProjectileInitLate(projectile: EntityProjectile): void {}
1598
1688
  * ```
1599
1689
  */
1600
- POST_PROJECTILE_INIT_LATE = 89,
1690
+ POST_PROJECTILE_INIT_LATE = 95,
1601
1691
  /**
1602
1692
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player first picks up a new
1603
1693
  * item. The pickup returned in the callback is assumed to be the first pickup that no longer
@@ -1613,7 +1703,7 @@ export declare enum ModCallbackCustom {
1613
1703
  * function postPurchase(player: EntityPlayer, pickup: EntityPickup): void {}
1614
1704
  * ```
1615
1705
  */
1616
- POST_PURCHASE = 90,
1706
+ POST_PURCHASE = 96,
1617
1707
  /**
1618
1708
  * Fires from the `POST_RENDER` callback on every frame that a rock exists.
1619
1709
  *
@@ -1627,7 +1717,7 @@ export declare enum ModCallbackCustom {
1627
1717
  * function postRockRender(rock: GridEntityRock): void {}
1628
1718
  * ```
1629
1719
  */
1630
- POST_ROCK_RENDER = 91,
1720
+ POST_ROCK_RENDER = 97,
1631
1721
  /**
1632
1722
  * Fires from the `POST_UPDATE` callback on every frame that a rock exists.
1633
1723
  *
@@ -1641,7 +1731,7 @@ export declare enum ModCallbackCustom {
1641
1731
  * function postRockUpdate(rock: GridEntityRock): void {}
1642
1732
  * ```
1643
1733
  */
1644
- POST_ROCK_UPDATE = 92,
1734
+ POST_ROCK_UPDATE = 98,
1645
1735
  /**
1646
1736
  * Fires from the `POST_UPDATE` callback when the clear state of a room changes (as according to
1647
1737
  * the `Room.IsClear` method).
@@ -1658,7 +1748,7 @@ export declare enum ModCallbackCustom {
1658
1748
  * function postRoomClearChanged(roomClear: boolean): void {}
1659
1749
  * ```
1660
1750
  */
1661
- POST_ROOM_CLEAR_CHANGED = 93,
1751
+ POST_ROOM_CLEAR_CHANGED = 99,
1662
1752
  /**
1663
1753
  * Fires from the `ENTITY_TAKE_DMG` callback when a player takes damage from spikes in a Sacrifice
1664
1754
  * Room.
@@ -1673,7 +1763,7 @@ export declare enum ModCallbackCustom {
1673
1763
  * function postSacrifice(player: EntityPlayer, numSacrifices: int): void {}
1674
1764
  * ```
1675
1765
  */
1676
- POST_SACRIFICE = 94,
1766
+ POST_SACRIFICE = 100,
1677
1767
  /**
1678
1768
  * Fires from the `POST_RENDER` callback when a slot entity's animation changes.
1679
1769
  *
@@ -1691,7 +1781,7 @@ export declare enum ModCallbackCustom {
1691
1781
  * ): void {}
1692
1782
  * ```
1693
1783
  */
1694
- POST_SLOT_ANIMATION_CHANGED = 95,
1784
+ POST_SLOT_ANIMATION_CHANGED = 101,
1695
1785
  /**
1696
1786
  * Fires from the `PRE_PLAYER_COLLISION` callback when when a player collides with a slot entity.
1697
1787
  * (It will not fire if any other type of entity collides with the slot entity.)
@@ -1715,7 +1805,7 @@ export declare enum ModCallbackCustom {
1715
1805
  * ): void {}
1716
1806
  * ```
1717
1807
  */
1718
- POST_SLOT_COLLISION = 96,
1808
+ POST_SLOT_COLLISION = 102,
1719
1809
  /**
1720
1810
  * Fires from the `POST_SLOT_UPDATE` or the `POST_ENTITY_REMOVE` callback when a slot machine is
1721
1811
  * destroyed or a beggar is removed.
@@ -1757,7 +1847,7 @@ export declare enum ModCallbackCustom {
1757
1847
  * function postSlotDestroyed(slot: Entity, slotDestructionType: SlotDestructionType): void {}
1758
1848
  * ```
1759
1849
  */
1760
- POST_SLOT_DESTROYED = 97,
1850
+ POST_SLOT_DESTROYED = 103,
1761
1851
  /**
1762
1852
  * Fires when a new slot entity is initialized. Specifically, this is either:
1763
1853
  *
@@ -1776,7 +1866,7 @@ export declare enum ModCallbackCustom {
1776
1866
  * function postSlotInit(slot: Entity): void {}
1777
1867
  * ```
1778
1868
  */
1779
- POST_SLOT_INIT = 98,
1869
+ POST_SLOT_INIT = 104,
1780
1870
  /**
1781
1871
  * Fires from the `POST_RENDER` callback on every frame that a slot entity exists.
1782
1872
  *
@@ -1790,7 +1880,7 @@ export declare enum ModCallbackCustom {
1790
1880
  * function postSlotRender(slot: Entity): void {}
1791
1881
  * ```
1792
1882
  */
1793
- POST_SLOT_RENDER = 99,
1883
+ POST_SLOT_RENDER = 105,
1794
1884
  /**
1795
1885
  * Fires from the `POST_UPDATE` callback on every frame that a slot entity exists.
1796
1886
  *
@@ -1804,7 +1894,7 @@ export declare enum ModCallbackCustom {
1804
1894
  * function postSlotUpdate(slot: Entity): void {}
1805
1895
  * ```
1806
1896
  */
1807
- POST_SLOT_UPDATE = 100,
1897
+ POST_SLOT_UPDATE = 106,
1808
1898
  /**
1809
1899
  * Fires from the `POST_RENDER` callback on every frame that spikes exist.
1810
1900
  *
@@ -1816,7 +1906,7 @@ export declare enum ModCallbackCustom {
1816
1906
  * function postSpikesRender(spikes: GridEntitySpikes): void {}
1817
1907
  * ```
1818
1908
  */
1819
- POST_SPIKES_RENDER = 101,
1909
+ POST_SPIKES_RENDER = 107,
1820
1910
  /**
1821
1911
  * Fires from the `POST_UPDATE` callback on every frame that spikes exist.
1822
1912
  *
@@ -1828,7 +1918,7 @@ export declare enum ModCallbackCustom {
1828
1918
  * function postSpikesUpdate(spikes: GridEntitySpikes): void {}
1829
1919
  * ```
1830
1920
  */
1831
- POST_SPIKES_UPDATE = 102,
1921
+ POST_SPIKES_UPDATE = 108,
1832
1922
  /**
1833
1923
  * Fires on the first `POST_TEAR_UPDATE` frame for each tear (which is when
1834
1924
  * `EntityTear.FrameCount` is equal to 0).
@@ -1846,7 +1936,7 @@ export declare enum ModCallbackCustom {
1846
1936
  * function postTearInitLate(tear: EntityTear): void {}
1847
1937
  * ```
1848
1938
  */
1849
- POST_TEAR_INIT_LATE = 103,
1939
+ POST_TEAR_INIT_LATE = 109,
1850
1940
  /**
1851
1941
  * Fires on the second `POST_TEAR_UPDATE` frame for each tear (which is when
1852
1942
  * `EntityTear.FrameCount` is equal to 1).
@@ -1863,7 +1953,7 @@ export declare enum ModCallbackCustom {
1863
1953
  * function postTearInitVeryLate(tear: EntityTear): void {}
1864
1954
  * ```
1865
1955
  */
1866
- POST_TEAR_INIT_VERY_LATE = 104,
1956
+ POST_TEAR_INIT_VERY_LATE = 110,
1867
1957
  /**
1868
1958
  * Fires from the `POST_RENDER` callback on every frame that a TNT exists.
1869
1959
  *
@@ -1875,7 +1965,7 @@ export declare enum ModCallbackCustom {
1875
1965
  * function postTNTRender(tnt: GridEntityTNT): void {}
1876
1966
  * ```
1877
1967
  */
1878
- POST_TNT_RENDER = 105,
1968
+ POST_TNT_RENDER = 111,
1879
1969
  /**
1880
1970
  * Fires from the `POST_UPDATE` callback on every frame that a TNT exists.
1881
1971
  *
@@ -1887,7 +1977,7 @@ export declare enum ModCallbackCustom {
1887
1977
  * function postTNTUpdate(tnt: GridEntityTNT): void {}
1888
1978
  * ```
1889
1979
  */
1890
- POST_TNT_UPDATE = 106,
1980
+ POST_TNT_UPDATE = 112,
1891
1981
  /**
1892
1982
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when a player gains or loses a new
1893
1983
  * transformation.
@@ -1906,7 +1996,7 @@ export declare enum ModCallbackCustom {
1906
1996
  * ): void {}
1907
1997
  * ```
1908
1998
  */
1909
- POST_TRANSFORMATION = 107,
1999
+ POST_TRANSFORMATION = 113,
1910
2000
  /**
1911
2001
  * Fires from `ENTITY_TAKE_DMG` callback when a Wishbone or a Walnut breaks.
1912
2002
  *
@@ -1921,7 +2011,7 @@ export declare enum ModCallbackCustom {
1921
2011
  * ): void {}
1922
2012
  * ```
1923
2013
  */
1924
- POST_TRINKET_BREAK = 108,
2014
+ POST_TRINKET_BREAK = 114,
1925
2015
  /**
1926
2016
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback on the frame before a Berserk effect
1927
2017
  * ends when the player is predicted to die (e.g. they currently have no health left or they took
@@ -1937,7 +2027,7 @@ export declare enum ModCallbackCustom {
1937
2027
  * function preBerserkDeath(player: EntityPlayer): void {}
1938
2028
  * ```
1939
2029
  */
1940
- PRE_BERSERK_DEATH = 109,
2030
+ PRE_BERSERK_DEATH = 115,
1941
2031
  /**
1942
2032
  * Fires from the `POST_PLAYER_FATAL_DAMAGE` callback when a player is about to die. If you want
1943
2033
  * to initiate a custom revival, return an integer that corresponds to the item or type of revival
@@ -1956,7 +2046,7 @@ export declare enum ModCallbackCustom {
1956
2046
  * function preCustomRevive(player: EntityPlayer): int | undefined {}
1957
2047
  * ```
1958
2048
  */
1959
- PRE_CUSTOM_REVIVE = 110,
2049
+ PRE_CUSTOM_REVIVE = 116,
1960
2050
  /**
1961
2051
  * The exact same thing as the vanilla `PRE_ENTITY_SPAWN` callback, except this callback allows
1962
2052
  * you to specify extra arguments for additional filtration.
@@ -1981,7 +2071,7 @@ export declare enum ModCallbackCustom {
1981
2071
  * ): [EntityType, int, int, int] | undefined {}
1982
2072
  * ```
1983
2073
  */
1984
- PRE_ENTITY_SPAWN_FILTER = 111,
2074
+ PRE_ENTITY_SPAWN_FILTER = 117,
1985
2075
  /**
1986
2076
  * The exact same thing as the vanilla `PRE_FAMILIAR_COLLISION` callback, except this callback
1987
2077
  * allows you to specify extra arguments for additional filtration.
@@ -2000,7 +2090,7 @@ export declare enum ModCallbackCustom {
2000
2090
  * ): void {}
2001
2091
  * ```
2002
2092
  */
2003
- PRE_FAMILIAR_COLLISION_FILTER = 112,
2093
+ PRE_FAMILIAR_COLLISION_FILTER = 118,
2004
2094
  /**
2005
2095
  * Fires from the `PRE_PICKUP_COLLISION` callback when a player touches a collectible pedestal and
2006
2096
  * meets all of the conditions to pick it up.
@@ -2020,7 +2110,7 @@ export declare enum ModCallbackCustom {
2020
2110
  * function preGetPedestal(player: EntityPlayer, collectible: EntityPickupCollectible): void {}
2021
2111
  * ```
2022
2112
  */
2023
- PRE_GET_PEDESTAL = 113,
2113
+ PRE_GET_PEDESTAL = 119,
2024
2114
  /**
2025
2115
  * Fires from the `POST_PEFFECT_UPDATE_REORDERED` callback when an item becomes queued (i.e. when
2026
2116
  * the player begins to hold the item above their head).
@@ -2040,7 +2130,26 @@ export declare enum ModCallbackCustom {
2040
2130
  * ): void {}
2041
2131
  * ```
2042
2132
  */
2043
- PRE_ITEM_PICKUP = 114,
2133
+ PRE_ITEM_PICKUP = 120,
2134
+ /**
2135
+ * The exact same thing as the vanilla `PRE_KNIFE_COLLISION` callback, except this callback allows
2136
+ * you to specify extra arguments for additional filtration.
2137
+ *
2138
+ * When registering the callback with the `ModUpgraded.AddCallbackCustom` method:
2139
+ * - You can provide an optional third argument that will make the callback only fire if it
2140
+ * matches the `KnifeVariant` provided.
2141
+ * - You can provide an optional fourth argument that will make the callback only fire if it
2142
+ * matches the sub-type provided.
2143
+ *
2144
+ * ```ts
2145
+ * function preKnifeCollisionFilter(
2146
+ * knife: EntityKnife,
2147
+ * collider: Entity,
2148
+ * low: boolean,
2149
+ * ): void {}
2150
+ * ```
2151
+ */
2152
+ PRE_KNIFE_COLLISION_FILTER = 121,
2044
2153
  /**
2045
2154
  * Fires on the `POST_RENDER` frame before the player is taken to a new floor. Only fires when a
2046
2155
  * player jumps into a trapdoor or enters a heaven door (beam of light). Does not fire on the
@@ -2054,7 +2163,7 @@ export declare enum ModCallbackCustom {
2054
2163
  * function preNewLevel(player: EntityPlayer): void {}
2055
2164
  * ```
2056
2165
  */
2057
- PRE_NEW_LEVEL = 115,
2166
+ PRE_NEW_LEVEL = 122,
2058
2167
  /**
2059
2168
  * The exact same thing as the vanilla `PRE_NPC_COLLISION` callback, except this callback allows
2060
2169
  * you to specify extra arguments for additional filtration.
@@ -2075,7 +2184,7 @@ export declare enum ModCallbackCustom {
2075
2184
  * ): boolean | undefined {}
2076
2185
  * ```
2077
2186
  */
2078
- PRE_NPC_COLLISION_FILTER = 116,
2187
+ PRE_NPC_COLLISION_FILTER = 123,
2079
2188
  /**
2080
2189
  * The exact same thing as the vanilla `PRE_NPC_UPDATE` callback, except this callback allows you
2081
2190
  * to specify extra arguments for additional filtration.
@@ -2092,7 +2201,7 @@ export declare enum ModCallbackCustom {
2092
2201
  * function preNPCUpdateFilter(entity: Entity): boolean | undefined {}
2093
2202
  * ```
2094
2203
  */
2095
- PRE_NPC_UPDATE_FILTER = 117,
2204
+ PRE_NPC_UPDATE_FILTER = 124,
2096
2205
  /**
2097
2206
  * The exact same thing as the vanilla `PRE_ROOM_ENTITY_SPAWN` callback, except this callback
2098
2207
  * allows you to specify extra arguments for additional filtration.
@@ -2115,6 +2224,6 @@ export declare enum ModCallbackCustom {
2115
2224
  * ): [EntityType | GridEntityXMLType, int, int] | undefined {}
2116
2225
  * ```
2117
2226
  */
2118
- PRE_ROOM_ENTITY_SPAWN_FILTER = 118
2227
+ PRE_ROOM_ENTITY_SPAWN_FILTER = 125
2119
2228
  }
2120
2229
  //# sourceMappingURL=ModCallbackCustom.d.ts.map