hytopia 0.1.27 → 0.1.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/bin/scripts.js +1 -0
  2. package/docs/server.basecharactercontroller.md +5 -5
  3. package/docs/server.basecharactercontroller.ontick.md +13 -0
  4. package/docs/server.basecharactercontroller.tick.md +53 -0
  5. package/docs/server.blocktype.md +2 -2
  6. package/docs/server.blocktype.onentitycollision.md +1 -1
  7. package/docs/server.blocktype.onentitycontactforce.md +1 -1
  8. package/docs/server.defaultcharactercontroller.canjump.md +1 -1
  9. package/docs/server.defaultcharactercontroller.canrun.md +1 -1
  10. package/docs/server.defaultcharactercontroller.canwalk.md +1 -1
  11. package/docs/server.defaultcharactercontroller.md +3 -17
  12. package/docs/server.entity.createcustomcharactercontroller.md +2 -2
  13. package/docs/server.entity.md +9 -9
  14. package/docs/server.entity.onblockcollision.md +1 -1
  15. package/docs/server.entity.onblockcontactforce.md +1 -1
  16. package/docs/server.entity.ondespawn.md +1 -1
  17. package/docs/server.entity.onentitycollision.md +1 -1
  18. package/docs/server.entity.onentitycontactforce.md +1 -1
  19. package/docs/server.entity.onspawn.md +1 -1
  20. package/docs/server.entity.ontick.md +1 -1
  21. package/docs/server.entityoptions.createcustomcharactercontroller.md +13 -0
  22. package/docs/server.entityoptions.md +19 -0
  23. package/docs/server.facecallback.md +15 -0
  24. package/docs/server.facecompletecallback.md +15 -0
  25. package/docs/server.faceoptions.md +18 -0
  26. package/docs/server.hytopia.basecharactercontroller.md +5 -5
  27. package/docs/server.hytopia.basecharactercontroller.ontick.md +13 -0
  28. package/docs/server.hytopia.basecharactercontroller.tick.md +53 -0
  29. package/docs/server.hytopia.blocktype.md +2 -2
  30. package/docs/server.hytopia.blocktype.onentitycollision.md +1 -1
  31. package/docs/server.hytopia.blocktype.onentitycontactforce.md +1 -1
  32. package/docs/server.hytopia.defaultcharactercontroller.canjump.md +1 -1
  33. package/docs/server.hytopia.defaultcharactercontroller.canrun.md +1 -1
  34. package/docs/server.hytopia.defaultcharactercontroller.canwalk.md +1 -1
  35. package/docs/server.hytopia.defaultcharactercontroller.md +3 -17
  36. package/docs/server.hytopia.entity.createcustomcharactercontroller.md +2 -2
  37. package/docs/server.hytopia.entity.md +9 -9
  38. package/docs/server.hytopia.entity.onblockcollision.md +1 -1
  39. package/docs/server.hytopia.entity.onblockcontactforce.md +1 -1
  40. package/docs/server.hytopia.entity.ondespawn.md +1 -1
  41. package/docs/server.hytopia.entity.onentitycollision.md +1 -1
  42. package/docs/server.hytopia.entity.onentitycontactforce.md +1 -1
  43. package/docs/server.hytopia.entity.onspawn.md +1 -1
  44. package/docs/server.hytopia.entity.ontick.md +1 -1
  45. package/docs/server.hytopia.entityoptions.createcustomcharactercontroller.md +13 -0
  46. package/docs/server.hytopia.entityoptions.md +19 -0
  47. package/docs/server.hytopia.facecallback.md +15 -0
  48. package/docs/server.hytopia.facecompletecallback.md +15 -0
  49. package/docs/server.hytopia.faceoptions.md +18 -0
  50. package/docs/server.hytopia.md +77 -0
  51. package/docs/server.hytopia.movecallback.md +15 -0
  52. package/docs/server.hytopia.movecompletecallback.md +15 -0
  53. package/docs/server.hytopia.moveoptions.md +23 -0
  54. package/docs/server.hytopia.simplecharactercontroller.face.md +89 -0
  55. package/docs/server.hytopia.simplecharactercontroller.md +88 -0
  56. package/docs/server.hytopia.simplecharactercontroller.move.md +89 -0
  57. package/docs/server.md +77 -0
  58. package/docs/server.movecallback.md +15 -0
  59. package/docs/server.movecompletecallback.md +15 -0
  60. package/docs/server.moveoptions.md +23 -0
  61. package/docs/server.simplecharactercontroller.face.md +89 -0
  62. package/docs/server.simplecharactercontroller.md +88 -0
  63. package/docs/server.simplecharactercontroller.move.md +89 -0
  64. package/examples/entity-spawn/index.ts +1 -1
  65. package/examples/payload-game/index.ts +46 -104
  66. package/package.json +1 -1
  67. package/server.api.json +1048 -264
  68. package/server.d.ts +191 -51
  69. package/server.js +57 -57
  70. package/tsconfig.json +4 -1
  71. package/docs/server.basecharactercontroller.ontickpathfindingmovement.md +0 -13
  72. package/docs/server.basecharactercontroller.tickpathfindingmovement.md +0 -69
  73. package/docs/server.defaultcharactercontroller.tickpathfindingmovement.md +0 -69
  74. package/docs/server.hytopia.basecharactercontroller.ontickpathfindingmovement.md +0 -13
  75. package/docs/server.hytopia.basecharactercontroller.tickpathfindingmovement.md +0 -69
  76. package/docs/server.hytopia.defaultcharactercontroller.tickpathfindingmovement.md +0 -69
  77. package/examples/character-controller/tsconfig.json +0 -27
  78. package/examples/entity-spawn/tsconfig.json +0 -27
  79. package/examples/payload-game/tsconfig.json +0 -27
package/server.api.json CHANGED
@@ -2755,25 +2755,16 @@
2755
2755
  },
2756
2756
  {
2757
2757
  "kind": "Property",
2758
- "canonicalReference": "server!BaseCharacterController#onTickPathfindingMovement:member",
2759
- "docComment": "/**\n * A callback function for when the controller ticks pathfinding movement.\n *\n * @param destination - The destination to move to.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
2758
+ "canonicalReference": "server!BaseCharacterController#onTick:member",
2759
+ "docComment": "/**\n * A callback function for when the controller ticks.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
2760
2760
  "excerptTokens": [
2761
2761
  {
2762
2762
  "kind": "Content",
2763
- "text": "onTickPathfindingMovement?: "
2763
+ "text": "onTick?: "
2764
2764
  },
2765
2765
  {
2766
2766
  "kind": "Content",
2767
- "text": "(destination: "
2768
- },
2769
- {
2770
- "kind": "Reference",
2771
- "text": "Vector3",
2772
- "canonicalReference": "server!Vector3:interface"
2773
- },
2774
- {
2775
- "kind": "Content",
2776
- "text": ", deltaTimeMs: number) => void"
2767
+ "text": "(deltaTimeMs: number) => void"
2777
2768
  },
2778
2769
  {
2779
2770
  "kind": "Content",
@@ -2783,10 +2774,10 @@
2783
2774
  "isReadonly": false,
2784
2775
  "isOptional": true,
2785
2776
  "releaseTag": "Public",
2786
- "name": "onTickPathfindingMovement",
2777
+ "name": "onTick",
2787
2778
  "propertyTypeTokenRange": {
2788
2779
  "startIndex": 1,
2789
- "endIndex": 4
2780
+ "endIndex": 2
2790
2781
  },
2791
2782
  "isStatic": false,
2792
2783
  "isProtected": false,
@@ -2842,21 +2833,12 @@
2842
2833
  },
2843
2834
  {
2844
2835
  "kind": "Method",
2845
- "canonicalReference": "server!BaseCharacterController#tickPathfindingMovement:member(1)",
2846
- "docComment": "/**\n * Override this method to implement pathfinding movement logic for your character controller. NOTE: This method is not fully supported yet.\n *\n * @param destination - The destination target to move to.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
2836
+ "canonicalReference": "server!BaseCharacterController#tick:member(1)",
2837
+ "docComment": "/**\n * Override this method to handle entity movements based on your character controller.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
2847
2838
  "excerptTokens": [
2848
2839
  {
2849
2840
  "kind": "Content",
2850
- "text": "tickPathfindingMovement(destination: "
2851
- },
2852
- {
2853
- "kind": "Reference",
2854
- "text": "Vector3",
2855
- "canonicalReference": "server!Vector3:interface"
2856
- },
2857
- {
2858
- "kind": "Content",
2859
- "text": ", deltaTimeMs: "
2841
+ "text": "tick(deltaTimeMs: "
2860
2842
  },
2861
2843
  {
2862
2844
  "kind": "Content",
@@ -2877,33 +2859,25 @@
2877
2859
  ],
2878
2860
  "isStatic": false,
2879
2861
  "returnTypeTokenRange": {
2880
- "startIndex": 5,
2881
- "endIndex": 6
2862
+ "startIndex": 3,
2863
+ "endIndex": 4
2882
2864
  },
2883
2865
  "releaseTag": "Public",
2884
2866
  "isProtected": false,
2885
2867
  "overloadIndex": 1,
2886
2868
  "parameters": [
2887
2869
  {
2888
- "parameterName": "destination",
2870
+ "parameterName": "deltaTimeMs",
2889
2871
  "parameterTypeTokenRange": {
2890
2872
  "startIndex": 1,
2891
2873
  "endIndex": 2
2892
2874
  },
2893
2875
  "isOptional": false
2894
- },
2895
- {
2896
- "parameterName": "deltaTimeMs",
2897
- "parameterTypeTokenRange": {
2898
- "startIndex": 3,
2899
- "endIndex": 4
2900
- },
2901
- "isOptional": false
2902
2876
  }
2903
2877
  ],
2904
2878
  "isOptional": false,
2905
2879
  "isAbstract": false,
2906
- "name": "tickPathfindingMovement"
2880
+ "name": "tick"
2907
2881
  },
2908
2882
  {
2909
2883
  "kind": "Method",
@@ -3253,7 +3227,7 @@
3253
3227
  {
3254
3228
  "kind": "Property",
3255
3229
  "canonicalReference": "server!BlockType#onEntityCollision:member",
3256
- "docComment": "/**\n * A callback function that is invoked when an entity collides with blocks of this type.\n *\n * @param entity - The entity that collided with the block.\n *\n * @param started - Whether the collision started.\n */\n",
3230
+ "docComment": "/**\n * A callback function that is invoked when an entity collides with blocks of this type.\n *\n * @param blockType - The block type the collision is for.\n *\n * @param entity - The entity that collided with the block type.\n *\n * @param started - Whether the collision started.\n */\n",
3257
3231
  "excerptTokens": [
3258
3232
  {
3259
3233
  "kind": "Content",
@@ -3261,7 +3235,7 @@
3261
3235
  },
3262
3236
  {
3263
3237
  "kind": "Content",
3264
- "text": "(this: "
3238
+ "text": "(blockType: "
3265
3239
  },
3266
3240
  {
3267
3241
  "kind": "Reference",
@@ -3301,7 +3275,7 @@
3301
3275
  {
3302
3276
  "kind": "Property",
3303
3277
  "canonicalReference": "server!BlockType#onEntityContactForce:member",
3304
- "docComment": "/**\n * A callback function that is invoked when an entity contacts a block of this type.\n *\n * @param entity - The entity that contacted the block.\n *\n * @param contactForceData - The contact force data.\n */\n",
3278
+ "docComment": "/**\n * A callback function that is invoked when an entity contacts a block of this type.\n *\n * @param blockType - The block type the contact is for.\n *\n * @param entity - The entity that contacted the block type.\n *\n * @param contactForceData - The contact force data.\n */\n",
3305
3279
  "excerptTokens": [
3306
3280
  {
3307
3281
  "kind": "Content",
@@ -3309,7 +3283,7 @@
3309
3283
  },
3310
3284
  {
3311
3285
  "kind": "Content",
3312
- "text": "(this: "
3286
+ "text": "(blockType: "
3313
3287
  },
3314
3288
  {
3315
3289
  "kind": "Reference",
@@ -7945,7 +7919,7 @@
7945
7919
  {
7946
7920
  "kind": "Property",
7947
7921
  "canonicalReference": "server!DefaultCharacterController#canJump:member",
7948
- "docComment": "/**\n * A function allowing custom logic to determine if the entity can jump.\n *\n * @param this - The character controller instance.\n *\n * @returns Whether the entity can jump.\n */\n",
7922
+ "docComment": "/**\n * A function allowing custom logic to determine if the entity can jump.\n *\n * @param defaultCharacterController - The character controller instance.\n *\n * @returns Whether the entity of the character controller can jump.\n */\n",
7949
7923
  "excerptTokens": [
7950
7924
  {
7951
7925
  "kind": "Content",
@@ -7953,7 +7927,7 @@
7953
7927
  },
7954
7928
  {
7955
7929
  "kind": "Content",
7956
- "text": "(this: "
7930
+ "text": "(defaultCharacterController: "
7957
7931
  },
7958
7932
  {
7959
7933
  "kind": "Reference",
@@ -7984,7 +7958,7 @@
7984
7958
  {
7985
7959
  "kind": "Property",
7986
7960
  "canonicalReference": "server!DefaultCharacterController#canRun:member",
7987
- "docComment": "/**\n * A function allowing custom logic to determine if the entity can run.\n *\n * @param this - The character controller instance.\n *\n * @returns Whether the entity can run.\n */\n",
7961
+ "docComment": "/**\n * A function allowing custom logic to determine if the entity can run.\n *\n * @param defaultCharacterController - The character controller instance.\n *\n * @returns Whether the entity of the character controller can run.\n */\n",
7988
7962
  "excerptTokens": [
7989
7963
  {
7990
7964
  "kind": "Content",
@@ -7992,7 +7966,7 @@
7992
7966
  },
7993
7967
  {
7994
7968
  "kind": "Content",
7995
- "text": "(this: "
7969
+ "text": "(defaultCharacterController: "
7996
7970
  },
7997
7971
  {
7998
7972
  "kind": "Reference",
@@ -8023,7 +7997,7 @@
8023
7997
  {
8024
7998
  "kind": "Property",
8025
7999
  "canonicalReference": "server!DefaultCharacterController#canWalk:member",
8026
- "docComment": "/**\n * A function allowing custom logic to determine if the entity can walk.\n *\n * @param this - The character controller instance.\n *\n * @returns Whether the entity can walk.\n */\n",
8000
+ "docComment": "/**\n * A function allowing custom logic to determine if the entity can walk.\n *\n * @param defaultCharacterController - The character controller instance.\n *\n * @returns Whether the entity of the character controller can walk.\n */\n",
8027
8001
  "excerptTokens": [
8028
8002
  {
8029
8003
  "kind": "Content",
@@ -8031,7 +8005,7 @@
8031
8005
  },
8032
8006
  {
8033
8007
  "kind": "Content",
8034
- "text": "(this: "
8008
+ "text": "(defaultCharacterController: "
8035
8009
  },
8036
8010
  {
8037
8011
  "kind": "Reference",
@@ -8250,71 +8224,6 @@
8250
8224
  "isProtected": false,
8251
8225
  "isAbstract": false
8252
8226
  },
8253
- {
8254
- "kind": "Method",
8255
- "canonicalReference": "server!DefaultCharacterController#tickPathfindingMovement:member(1)",
8256
- "docComment": "/**\n * Ticks the pathfinding movement for the character controller, overriding the default implementation.\n *\n * @param destination - The destination to move to.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
8257
- "excerptTokens": [
8258
- {
8259
- "kind": "Content",
8260
- "text": "tickPathfindingMovement(destination: "
8261
- },
8262
- {
8263
- "kind": "Reference",
8264
- "text": "Vector3",
8265
- "canonicalReference": "server!Vector3:interface"
8266
- },
8267
- {
8268
- "kind": "Content",
8269
- "text": ", deltaTimeMs: "
8270
- },
8271
- {
8272
- "kind": "Content",
8273
- "text": "number"
8274
- },
8275
- {
8276
- "kind": "Content",
8277
- "text": "): "
8278
- },
8279
- {
8280
- "kind": "Content",
8281
- "text": "void"
8282
- },
8283
- {
8284
- "kind": "Content",
8285
- "text": ";"
8286
- }
8287
- ],
8288
- "isStatic": false,
8289
- "returnTypeTokenRange": {
8290
- "startIndex": 5,
8291
- "endIndex": 6
8292
- },
8293
- "releaseTag": "Public",
8294
- "isProtected": false,
8295
- "overloadIndex": 1,
8296
- "parameters": [
8297
- {
8298
- "parameterName": "destination",
8299
- "parameterTypeTokenRange": {
8300
- "startIndex": 1,
8301
- "endIndex": 2
8302
- },
8303
- "isOptional": false
8304
- },
8305
- {
8306
- "parameterName": "deltaTimeMs",
8307
- "parameterTypeTokenRange": {
8308
- "startIndex": 3,
8309
- "endIndex": 4
8310
- },
8311
- "isOptional": false
8312
- }
8313
- ],
8314
- "isOptional": false,
8315
- "isAbstract": false,
8316
- "name": "tickPathfindingMovement"
8317
- },
8318
8227
  {
8319
8228
  "kind": "Method",
8320
8229
  "canonicalReference": "server!DefaultCharacterController#tickPlayerMovement:member(1)",
@@ -8719,7 +8628,7 @@
8719
8628
  {
8720
8629
  "kind": "Property",
8721
8630
  "canonicalReference": "server!Entity#createCustomCharacterController:member",
8722
- "docComment": "/**\n * A function that creates a custom character controller for the entity.\n *\n * @param this - The Entity instance.\n *\n * @returns A character controller that extends {@link BaseCharacterController}.\n */\n",
8631
+ "docComment": "/**\n * A function that creates a custom character controller for the entity when it spawns.\n *\n * @param entity - The Entity instance the character controller is created for.\n *\n * @returns A character controller that extends {@link BaseCharacterController}.\n */\n",
8723
8632
  "excerptTokens": [
8724
8633
  {
8725
8634
  "kind": "Content",
@@ -8727,7 +8636,7 @@
8727
8636
  },
8728
8637
  {
8729
8638
  "kind": "Content",
8730
- "text": "(this: "
8639
+ "text": "(entity: "
8731
8640
  },
8732
8641
  {
8733
8642
  "kind": "Reference",
@@ -8979,7 +8888,7 @@
8979
8888
  {
8980
8889
  "kind": "Property",
8981
8890
  "canonicalReference": "server!Entity#onBlockCollision:member",
8982
- "docComment": "/**\n * A function that is called when the entity collides with a block.\n *\n * @param this - The Entity instance.\n *\n * @param block - The block that the entity collided with.\n *\n * @param started - Whether the collision started or ended.\n */\n",
8891
+ "docComment": "/**\n * A function that is called when the entity collides with a block.\n *\n * @param entity - The Entity instance the collision is for.\n *\n * @param block - The block that the entity collided with.\n *\n * @param started - Whether the collision started or ended.\n */\n",
8983
8892
  "excerptTokens": [
8984
8893
  {
8985
8894
  "kind": "Content",
@@ -8987,7 +8896,7 @@
8987
8896
  },
8988
8897
  {
8989
8898
  "kind": "Content",
8990
- "text": "(this: "
8899
+ "text": "(entity: "
8991
8900
  },
8992
8901
  {
8993
8902
  "kind": "Reference",
@@ -9027,7 +8936,7 @@
9027
8936
  {
9028
8937
  "kind": "Property",
9029
8938
  "canonicalReference": "server!Entity#onBlockContactForce:member",
9030
- "docComment": "/**\n * A function that is called when the entity collides with a block.\n *\n * @param this - The Entity instance.\n *\n * @param block - The block that the entity collided with.\n *\n * @param contactForceData - The contact force data.\n */\n",
8939
+ "docComment": "/**\n * A function that is called when the entity collides with a block.\n *\n * @param entity - The Entity instance the collision is for.\n *\n * @param block - The block that the entity collided with.\n *\n * @param contactForceData - The contact force data.\n */\n",
9031
8940
  "excerptTokens": [
9032
8941
  {
9033
8942
  "kind": "Content",
@@ -9035,7 +8944,7 @@
9035
8944
  },
9036
8945
  {
9037
8946
  "kind": "Content",
9038
- "text": "(this: "
8947
+ "text": "(entity: "
9039
8948
  },
9040
8949
  {
9041
8950
  "kind": "Reference",
@@ -9084,7 +8993,7 @@
9084
8993
  {
9085
8994
  "kind": "Property",
9086
8995
  "canonicalReference": "server!Entity#onDespawn:member",
9087
- "docComment": "/**\n * A function that is called when the entity is despawned.\n *\n * @param this - The Entity instance.\n */\n",
8996
+ "docComment": "/**\n * A function that is called when the entity is despawned.\n *\n * @param entity - The Entity instance that despawned.\n */\n",
9088
8997
  "excerptTokens": [
9089
8998
  {
9090
8999
  "kind": "Content",
@@ -9092,7 +9001,7 @@
9092
9001
  },
9093
9002
  {
9094
9003
  "kind": "Content",
9095
- "text": "(this: "
9004
+ "text": "(entity: "
9096
9005
  },
9097
9006
  {
9098
9007
  "kind": "Reference",
@@ -9123,7 +9032,7 @@
9123
9032
  {
9124
9033
  "kind": "Property",
9125
9034
  "canonicalReference": "server!Entity#onEntityCollision:member",
9126
- "docComment": "/**\n * A function that is called when the entity collides with another entity.\n *\n * @param this - The Entity instance.\n *\n * @param entity - The entity that the entity collided with.\n *\n * @param started - Whether the collision started or ended.\n */\n",
9035
+ "docComment": "/**\n * A function that is called when the entity collides with another entity.\n *\n * @param entity - The Entity instance the collision is for.\n *\n * @param otherEntity - The other entity that the entity collided with.\n *\n * @param started - Whether the collision started or ended.\n */\n",
9127
9036
  "excerptTokens": [
9128
9037
  {
9129
9038
  "kind": "Content",
@@ -9131,7 +9040,7 @@
9131
9040
  },
9132
9041
  {
9133
9042
  "kind": "Content",
9134
- "text": "(this: "
9043
+ "text": "(entity: "
9135
9044
  },
9136
9045
  {
9137
9046
  "kind": "Reference",
@@ -9140,7 +9049,7 @@
9140
9049
  },
9141
9050
  {
9142
9051
  "kind": "Content",
9143
- "text": ", entity: "
9052
+ "text": ", otherEntity: "
9144
9053
  },
9145
9054
  {
9146
9055
  "kind": "Reference",
@@ -9171,7 +9080,7 @@
9171
9080
  {
9172
9081
  "kind": "Property",
9173
9082
  "canonicalReference": "server!Entity#onEntityContactForce:member",
9174
- "docComment": "/**\n * A function that is called when the entity contacts another entity.\n *\n * @param this - The Entity instance.\n *\n * @param entity - The entity that the entity collided with.\n *\n * @param contactForceData - The contact force data.\n */\n",
9083
+ "docComment": "/**\n * A function that is called when the entity contacts another entity.\n *\n * @param entity - The Entity instance the collision is for.\n *\n * @param otherEntity - The other entity that the entity collided with.\n *\n * @param contactForceData - The contact force data.\n */\n",
9175
9084
  "excerptTokens": [
9176
9085
  {
9177
9086
  "kind": "Content",
@@ -9179,7 +9088,7 @@
9179
9088
  },
9180
9089
  {
9181
9090
  "kind": "Content",
9182
- "text": "(this: "
9091
+ "text": "(entity: "
9183
9092
  },
9184
9093
  {
9185
9094
  "kind": "Reference",
@@ -9188,7 +9097,7 @@
9188
9097
  },
9189
9098
  {
9190
9099
  "kind": "Content",
9191
- "text": ", entity: "
9100
+ "text": ", otherEntity: "
9192
9101
  },
9193
9102
  {
9194
9103
  "kind": "Reference",
@@ -9228,7 +9137,7 @@
9228
9137
  {
9229
9138
  "kind": "Property",
9230
9139
  "canonicalReference": "server!Entity#onSpawn:member",
9231
- "docComment": "/**\n * A function that is called when the entity is spawned.\n *\n * @param this - The Entity instance.\n */\n",
9140
+ "docComment": "/**\n * A function that is called when the entity is spawned.\n *\n * @param entity - The Entity instance that spawned.\n */\n",
9232
9141
  "excerptTokens": [
9233
9142
  {
9234
9143
  "kind": "Content",
@@ -9236,7 +9145,7 @@
9236
9145
  },
9237
9146
  {
9238
9147
  "kind": "Content",
9239
- "text": "(this: "
9148
+ "text": "(entity: "
9240
9149
  },
9241
9150
  {
9242
9151
  "kind": "Reference",
@@ -9267,7 +9176,7 @@
9267
9176
  {
9268
9177
  "kind": "Property",
9269
9178
  "canonicalReference": "server!Entity#onTick:member",
9270
- "docComment": "/**\n * A function that is called every tick.\n *\n * @param this - The Entity instance.\n *\n * @param tickDeltaMs - The delta time in milliseconds since the last tick.\n */\n",
9179
+ "docComment": "/**\n * A function that is called every tick.\n *\n * @param entity - The Entity instance that ticked.\n *\n * @param tickDeltaMs - The delta time in milliseconds since the last tick.\n */\n",
9271
9180
  "excerptTokens": [
9272
9181
  {
9273
9182
  "kind": "Content",
@@ -9275,7 +9184,7 @@
9275
9184
  },
9276
9185
  {
9277
9186
  "kind": "Content",
9278
- "text": "(this: "
9187
+ "text": "(entity: "
9279
9188
  },
9280
9189
  {
9281
9190
  "kind": "Reference",
@@ -10482,6 +10391,47 @@
10482
10391
  "name": "EntityOptions",
10483
10392
  "preserveMemberOrder": false,
10484
10393
  "members": [
10394
+ {
10395
+ "kind": "PropertySignature",
10396
+ "canonicalReference": "server!EntityOptions#createCustomCharacterController:member",
10397
+ "docComment": "/**\n * A function that creates a custom character controller for the entity when it spawns.\n *\n * @param entity - The Entity instance.\n *\n * @returns A character controller that extends {@link BaseCharacterController}.\n */\n",
10398
+ "excerptTokens": [
10399
+ {
10400
+ "kind": "Content",
10401
+ "text": "createCustomCharacterController?: "
10402
+ },
10403
+ {
10404
+ "kind": "Content",
10405
+ "text": "(entity: "
10406
+ },
10407
+ {
10408
+ "kind": "Reference",
10409
+ "text": "Entity",
10410
+ "canonicalReference": "server!Entity:class"
10411
+ },
10412
+ {
10413
+ "kind": "Content",
10414
+ "text": ") => "
10415
+ },
10416
+ {
10417
+ "kind": "Reference",
10418
+ "text": "BaseCharacterController",
10419
+ "canonicalReference": "server!BaseCharacterController:class"
10420
+ },
10421
+ {
10422
+ "kind": "Content",
10423
+ "text": ";"
10424
+ }
10425
+ ],
10426
+ "isReadonly": false,
10427
+ "isOptional": true,
10428
+ "releaseTag": "Public",
10429
+ "name": "createCustomCharacterController",
10430
+ "propertyTypeTokenRange": {
10431
+ "startIndex": 1,
10432
+ "endIndex": 5
10433
+ }
10434
+ },
10485
10435
  {
10486
10436
  "kind": "PropertySignature",
10487
10437
  "canonicalReference": "server!EntityOptions#modelLoopedAnimations:member",
@@ -11206,6 +11156,129 @@
11206
11156
  ],
11207
11157
  "implementsTokenRanges": []
11208
11158
  },
11159
+ {
11160
+ "kind": "TypeAlias",
11161
+ "canonicalReference": "server!FaceCallback:type",
11162
+ "docComment": "/**\n * A callback function called when the entity associated with the SimpleCharacterController updates its rotation as it is attempting to face a target coordinate.\n *\n * @param currentRotation - The current rotation of the entity.\n *\n * @param targetRotation - The target rotation of the entity.\n *\n * @public\n */\n",
11163
+ "excerptTokens": [
11164
+ {
11165
+ "kind": "Content",
11166
+ "text": "export type FaceCallback = "
11167
+ },
11168
+ {
11169
+ "kind": "Content",
11170
+ "text": "(currentRotation: "
11171
+ },
11172
+ {
11173
+ "kind": "Reference",
11174
+ "text": "Rotation",
11175
+ "canonicalReference": "server!Rotation:interface"
11176
+ },
11177
+ {
11178
+ "kind": "Content",
11179
+ "text": ", targetRotation: "
11180
+ },
11181
+ {
11182
+ "kind": "Reference",
11183
+ "text": "Rotation",
11184
+ "canonicalReference": "server!Rotation:interface"
11185
+ },
11186
+ {
11187
+ "kind": "Content",
11188
+ "text": ") => void"
11189
+ },
11190
+ {
11191
+ "kind": "Content",
11192
+ "text": ";"
11193
+ }
11194
+ ],
11195
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
11196
+ "releaseTag": "Public",
11197
+ "name": "FaceCallback",
11198
+ "typeTokenRange": {
11199
+ "startIndex": 1,
11200
+ "endIndex": 6
11201
+ }
11202
+ },
11203
+ {
11204
+ "kind": "TypeAlias",
11205
+ "canonicalReference": "server!FaceCompleteCallback:type",
11206
+ "docComment": "/**\n * A callback function called when the entity associated with the SimpleCharacterController finishes rotating and is now facing a target coordinate.\n *\n * @param endRotation - The rotation of the entity after it has finished rotating.\n *\n * @public\n */\n",
11207
+ "excerptTokens": [
11208
+ {
11209
+ "kind": "Content",
11210
+ "text": "export type FaceCompleteCallback = "
11211
+ },
11212
+ {
11213
+ "kind": "Content",
11214
+ "text": "(endRotation: "
11215
+ },
11216
+ {
11217
+ "kind": "Reference",
11218
+ "text": "Rotation",
11219
+ "canonicalReference": "server!Rotation:interface"
11220
+ },
11221
+ {
11222
+ "kind": "Content",
11223
+ "text": ") => void"
11224
+ },
11225
+ {
11226
+ "kind": "Content",
11227
+ "text": ";"
11228
+ }
11229
+ ],
11230
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
11231
+ "releaseTag": "Public",
11232
+ "name": "FaceCompleteCallback",
11233
+ "typeTokenRange": {
11234
+ "startIndex": 1,
11235
+ "endIndex": 4
11236
+ }
11237
+ },
11238
+ {
11239
+ "kind": "TypeAlias",
11240
+ "canonicalReference": "server!FaceOptions:type",
11241
+ "docComment": "/**\n * Options for the {@link SimpleCharacterController.face} method.\n *\n * @public\n */\n",
11242
+ "excerptTokens": [
11243
+ {
11244
+ "kind": "Content",
11245
+ "text": "export type FaceOptions = "
11246
+ },
11247
+ {
11248
+ "kind": "Content",
11249
+ "text": "{\n faceCallback?: "
11250
+ },
11251
+ {
11252
+ "kind": "Reference",
11253
+ "text": "FaceCallback",
11254
+ "canonicalReference": "server!FaceCallback:type"
11255
+ },
11256
+ {
11257
+ "kind": "Content",
11258
+ "text": ";\n faceCompleteCallback?: "
11259
+ },
11260
+ {
11261
+ "kind": "Reference",
11262
+ "text": "FaceCompleteCallback",
11263
+ "canonicalReference": "server!FaceCompleteCallback:type"
11264
+ },
11265
+ {
11266
+ "kind": "Content",
11267
+ "text": ";\n}"
11268
+ },
11269
+ {
11270
+ "kind": "Content",
11271
+ "text": ";"
11272
+ }
11273
+ ],
11274
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
11275
+ "releaseTag": "Public",
11276
+ "name": "FaceOptions",
11277
+ "typeTokenRange": {
11278
+ "startIndex": 1,
11279
+ "endIndex": 6
11280
+ }
11281
+ },
11209
11282
  {
11210
11283
  "kind": "Class",
11211
11284
  "canonicalReference": "server!GameServer:class",
@@ -14113,25 +14186,16 @@
14113
14186
  },
14114
14187
  {
14115
14188
  "kind": "Property",
14116
- "canonicalReference": "server!HYTOPIA.BaseCharacterController#onTickPathfindingMovement:member",
14117
- "docComment": "/**\n * A callback function for when the controller ticks pathfinding movement.\n *\n * @param destination - The destination to move to.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
14189
+ "canonicalReference": "server!HYTOPIA.BaseCharacterController#onTick:member",
14190
+ "docComment": "/**\n * A callback function for when the controller ticks.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
14118
14191
  "excerptTokens": [
14119
14192
  {
14120
14193
  "kind": "Content",
14121
- "text": "onTickPathfindingMovement?: "
14122
- },
14123
- {
14124
- "kind": "Content",
14125
- "text": "(destination: "
14126
- },
14127
- {
14128
- "kind": "Reference",
14129
- "text": "Vector3",
14130
- "canonicalReference": "server!Vector3:interface"
14194
+ "text": "onTick?: "
14131
14195
  },
14132
14196
  {
14133
14197
  "kind": "Content",
14134
- "text": ", deltaTimeMs: number) => void"
14198
+ "text": "(deltaTimeMs: number) => void"
14135
14199
  },
14136
14200
  {
14137
14201
  "kind": "Content",
@@ -14141,10 +14205,10 @@
14141
14205
  "isReadonly": false,
14142
14206
  "isOptional": true,
14143
14207
  "releaseTag": "Public",
14144
- "name": "onTickPathfindingMovement",
14208
+ "name": "onTick",
14145
14209
  "propertyTypeTokenRange": {
14146
14210
  "startIndex": 1,
14147
- "endIndex": 4
14211
+ "endIndex": 2
14148
14212
  },
14149
14213
  "isStatic": false,
14150
14214
  "isProtected": false,
@@ -14200,21 +14264,12 @@
14200
14264
  },
14201
14265
  {
14202
14266
  "kind": "Method",
14203
- "canonicalReference": "server!HYTOPIA.BaseCharacterController#tickPathfindingMovement:member(1)",
14204
- "docComment": "/**\n * Override this method to implement pathfinding movement logic for your character controller. NOTE: This method is not fully supported yet.\n *\n * @param destination - The destination target to move to.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
14267
+ "canonicalReference": "server!HYTOPIA.BaseCharacterController#tick:member(1)",
14268
+ "docComment": "/**\n * Override this method to handle entity movements based on your character controller.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
14205
14269
  "excerptTokens": [
14206
14270
  {
14207
14271
  "kind": "Content",
14208
- "text": "tickPathfindingMovement(destination: "
14209
- },
14210
- {
14211
- "kind": "Reference",
14212
- "text": "Vector3",
14213
- "canonicalReference": "server!Vector3:interface"
14214
- },
14215
- {
14216
- "kind": "Content",
14217
- "text": ", deltaTimeMs: "
14272
+ "text": "tick(deltaTimeMs: "
14218
14273
  },
14219
14274
  {
14220
14275
  "kind": "Content",
@@ -14235,33 +14290,25 @@
14235
14290
  ],
14236
14291
  "isStatic": false,
14237
14292
  "returnTypeTokenRange": {
14238
- "startIndex": 5,
14239
- "endIndex": 6
14293
+ "startIndex": 3,
14294
+ "endIndex": 4
14240
14295
  },
14241
14296
  "releaseTag": "Public",
14242
14297
  "isProtected": false,
14243
14298
  "overloadIndex": 1,
14244
14299
  "parameters": [
14245
14300
  {
14246
- "parameterName": "destination",
14301
+ "parameterName": "deltaTimeMs",
14247
14302
  "parameterTypeTokenRange": {
14248
14303
  "startIndex": 1,
14249
14304
  "endIndex": 2
14250
14305
  },
14251
14306
  "isOptional": false
14252
- },
14253
- {
14254
- "parameterName": "deltaTimeMs",
14255
- "parameterTypeTokenRange": {
14256
- "startIndex": 3,
14257
- "endIndex": 4
14258
- },
14259
- "isOptional": false
14260
14307
  }
14261
14308
  ],
14262
14309
  "isOptional": false,
14263
14310
  "isAbstract": false,
14264
- "name": "tickPathfindingMovement"
14311
+ "name": "tick"
14265
14312
  },
14266
14313
  {
14267
14314
  "kind": "Method",
@@ -14611,7 +14658,7 @@
14611
14658
  {
14612
14659
  "kind": "Property",
14613
14660
  "canonicalReference": "server!HYTOPIA.BlockType#onEntityCollision:member",
14614
- "docComment": "/**\n * A callback function that is invoked when an entity collides with blocks of this type.\n *\n * @param entity - The entity that collided with the block.\n *\n * @param started - Whether the collision started.\n */\n",
14661
+ "docComment": "/**\n * A callback function that is invoked when an entity collides with blocks of this type.\n *\n * @param blockType - The block type the collision is for.\n *\n * @param entity - The entity that collided with the block type.\n *\n * @param started - Whether the collision started.\n */\n",
14615
14662
  "excerptTokens": [
14616
14663
  {
14617
14664
  "kind": "Content",
@@ -14619,7 +14666,7 @@
14619
14666
  },
14620
14667
  {
14621
14668
  "kind": "Content",
14622
- "text": "(this: "
14669
+ "text": "(blockType: "
14623
14670
  },
14624
14671
  {
14625
14672
  "kind": "Reference",
@@ -14659,7 +14706,7 @@
14659
14706
  {
14660
14707
  "kind": "Property",
14661
14708
  "canonicalReference": "server!HYTOPIA.BlockType#onEntityContactForce:member",
14662
- "docComment": "/**\n * A callback function that is invoked when an entity contacts a block of this type.\n *\n * @param entity - The entity that contacted the block.\n *\n * @param contactForceData - The contact force data.\n */\n",
14709
+ "docComment": "/**\n * A callback function that is invoked when an entity contacts a block of this type.\n *\n * @param blockType - The block type the contact is for.\n *\n * @param entity - The entity that contacted the block type.\n *\n * @param contactForceData - The contact force data.\n */\n",
14663
14710
  "excerptTokens": [
14664
14711
  {
14665
14712
  "kind": "Content",
@@ -14667,7 +14714,7 @@
14667
14714
  },
14668
14715
  {
14669
14716
  "kind": "Content",
14670
- "text": "(this: "
14717
+ "text": "(blockType: "
14671
14718
  },
14672
14719
  {
14673
14720
  "kind": "Reference",
@@ -19303,7 +19350,7 @@
19303
19350
  {
19304
19351
  "kind": "Property",
19305
19352
  "canonicalReference": "server!HYTOPIA.DefaultCharacterController#canJump:member",
19306
- "docComment": "/**\n * A function allowing custom logic to determine if the entity can jump.\n *\n * @param this - The character controller instance.\n *\n * @returns Whether the entity can jump.\n */\n",
19353
+ "docComment": "/**\n * A function allowing custom logic to determine if the entity can jump.\n *\n * @param defaultCharacterController - The character controller instance.\n *\n * @returns Whether the entity of the character controller can jump.\n */\n",
19307
19354
  "excerptTokens": [
19308
19355
  {
19309
19356
  "kind": "Content",
@@ -19311,7 +19358,7 @@
19311
19358
  },
19312
19359
  {
19313
19360
  "kind": "Content",
19314
- "text": "(this: "
19361
+ "text": "(defaultCharacterController: "
19315
19362
  },
19316
19363
  {
19317
19364
  "kind": "Reference",
@@ -19342,7 +19389,7 @@
19342
19389
  {
19343
19390
  "kind": "Property",
19344
19391
  "canonicalReference": "server!HYTOPIA.DefaultCharacterController#canRun:member",
19345
- "docComment": "/**\n * A function allowing custom logic to determine if the entity can run.\n *\n * @param this - The character controller instance.\n *\n * @returns Whether the entity can run.\n */\n",
19392
+ "docComment": "/**\n * A function allowing custom logic to determine if the entity can run.\n *\n * @param defaultCharacterController - The character controller instance.\n *\n * @returns Whether the entity of the character controller can run.\n */\n",
19346
19393
  "excerptTokens": [
19347
19394
  {
19348
19395
  "kind": "Content",
@@ -19350,7 +19397,7 @@
19350
19397
  },
19351
19398
  {
19352
19399
  "kind": "Content",
19353
- "text": "(this: "
19400
+ "text": "(defaultCharacterController: "
19354
19401
  },
19355
19402
  {
19356
19403
  "kind": "Reference",
@@ -19381,7 +19428,7 @@
19381
19428
  {
19382
19429
  "kind": "Property",
19383
19430
  "canonicalReference": "server!HYTOPIA.DefaultCharacterController#canWalk:member",
19384
- "docComment": "/**\n * A function allowing custom logic to determine if the entity can walk.\n *\n * @param this - The character controller instance.\n *\n * @returns Whether the entity can walk.\n */\n",
19431
+ "docComment": "/**\n * A function allowing custom logic to determine if the entity can walk.\n *\n * @param defaultCharacterController - The character controller instance.\n *\n * @returns Whether the entity of the character controller can walk.\n */\n",
19385
19432
  "excerptTokens": [
19386
19433
  {
19387
19434
  "kind": "Content",
@@ -19389,7 +19436,7 @@
19389
19436
  },
19390
19437
  {
19391
19438
  "kind": "Content",
19392
- "text": "(this: "
19439
+ "text": "(defaultCharacterController: "
19393
19440
  },
19394
19441
  {
19395
19442
  "kind": "Reference",
@@ -19608,71 +19655,6 @@
19608
19655
  "isProtected": false,
19609
19656
  "isAbstract": false
19610
19657
  },
19611
- {
19612
- "kind": "Method",
19613
- "canonicalReference": "server!HYTOPIA.DefaultCharacterController#tickPathfindingMovement:member(1)",
19614
- "docComment": "/**\n * Ticks the pathfinding movement for the character controller, overriding the default implementation.\n *\n * @param destination - The destination to move to.\n *\n * @param deltaTimeMs - The delta time in milliseconds since the last tick.\n */\n",
19615
- "excerptTokens": [
19616
- {
19617
- "kind": "Content",
19618
- "text": "tickPathfindingMovement(destination: "
19619
- },
19620
- {
19621
- "kind": "Reference",
19622
- "text": "Vector3",
19623
- "canonicalReference": "server!Vector3:interface"
19624
- },
19625
- {
19626
- "kind": "Content",
19627
- "text": ", deltaTimeMs: "
19628
- },
19629
- {
19630
- "kind": "Content",
19631
- "text": "number"
19632
- },
19633
- {
19634
- "kind": "Content",
19635
- "text": "): "
19636
- },
19637
- {
19638
- "kind": "Content",
19639
- "text": "void"
19640
- },
19641
- {
19642
- "kind": "Content",
19643
- "text": ";"
19644
- }
19645
- ],
19646
- "isStatic": false,
19647
- "returnTypeTokenRange": {
19648
- "startIndex": 5,
19649
- "endIndex": 6
19650
- },
19651
- "releaseTag": "Public",
19652
- "isProtected": false,
19653
- "overloadIndex": 1,
19654
- "parameters": [
19655
- {
19656
- "parameterName": "destination",
19657
- "parameterTypeTokenRange": {
19658
- "startIndex": 1,
19659
- "endIndex": 2
19660
- },
19661
- "isOptional": false
19662
- },
19663
- {
19664
- "parameterName": "deltaTimeMs",
19665
- "parameterTypeTokenRange": {
19666
- "startIndex": 3,
19667
- "endIndex": 4
19668
- },
19669
- "isOptional": false
19670
- }
19671
- ],
19672
- "isOptional": false,
19673
- "isAbstract": false,
19674
- "name": "tickPathfindingMovement"
19675
- },
19676
19658
  {
19677
19659
  "kind": "Method",
19678
19660
  "canonicalReference": "server!HYTOPIA.DefaultCharacterController#tickPlayerMovement:member(1)",
@@ -20077,7 +20059,7 @@
20077
20059
  {
20078
20060
  "kind": "Property",
20079
20061
  "canonicalReference": "server!HYTOPIA.Entity#createCustomCharacterController:member",
20080
- "docComment": "/**\n * A function that creates a custom character controller for the entity.\n *\n * @param this - The Entity instance.\n *\n * @returns A character controller that extends {@link BaseCharacterController}.\n */\n",
20062
+ "docComment": "/**\n * A function that creates a custom character controller for the entity when it spawns.\n *\n * @param entity - The Entity instance the character controller is created for.\n *\n * @returns A character controller that extends {@link BaseCharacterController}.\n */\n",
20081
20063
  "excerptTokens": [
20082
20064
  {
20083
20065
  "kind": "Content",
@@ -20085,7 +20067,7 @@
20085
20067
  },
20086
20068
  {
20087
20069
  "kind": "Content",
20088
- "text": "(this: "
20070
+ "text": "(entity: "
20089
20071
  },
20090
20072
  {
20091
20073
  "kind": "Reference",
@@ -20337,7 +20319,7 @@
20337
20319
  {
20338
20320
  "kind": "Property",
20339
20321
  "canonicalReference": "server!HYTOPIA.Entity#onBlockCollision:member",
20340
- "docComment": "/**\n * A function that is called when the entity collides with a block.\n *\n * @param this - The Entity instance.\n *\n * @param block - The block that the entity collided with.\n *\n * @param started - Whether the collision started or ended.\n */\n",
20322
+ "docComment": "/**\n * A function that is called when the entity collides with a block.\n *\n * @param entity - The Entity instance the collision is for.\n *\n * @param block - The block that the entity collided with.\n *\n * @param started - Whether the collision started or ended.\n */\n",
20341
20323
  "excerptTokens": [
20342
20324
  {
20343
20325
  "kind": "Content",
@@ -20345,7 +20327,7 @@
20345
20327
  },
20346
20328
  {
20347
20329
  "kind": "Content",
20348
- "text": "(this: "
20330
+ "text": "(entity: "
20349
20331
  },
20350
20332
  {
20351
20333
  "kind": "Reference",
@@ -20385,7 +20367,7 @@
20385
20367
  {
20386
20368
  "kind": "Property",
20387
20369
  "canonicalReference": "server!HYTOPIA.Entity#onBlockContactForce:member",
20388
- "docComment": "/**\n * A function that is called when the entity collides with a block.\n *\n * @param this - The Entity instance.\n *\n * @param block - The block that the entity collided with.\n *\n * @param contactForceData - The contact force data.\n */\n",
20370
+ "docComment": "/**\n * A function that is called when the entity collides with a block.\n *\n * @param entity - The Entity instance the collision is for.\n *\n * @param block - The block that the entity collided with.\n *\n * @param contactForceData - The contact force data.\n */\n",
20389
20371
  "excerptTokens": [
20390
20372
  {
20391
20373
  "kind": "Content",
@@ -20393,7 +20375,7 @@
20393
20375
  },
20394
20376
  {
20395
20377
  "kind": "Content",
20396
- "text": "(this: "
20378
+ "text": "(entity: "
20397
20379
  },
20398
20380
  {
20399
20381
  "kind": "Reference",
@@ -20442,7 +20424,7 @@
20442
20424
  {
20443
20425
  "kind": "Property",
20444
20426
  "canonicalReference": "server!HYTOPIA.Entity#onDespawn:member",
20445
- "docComment": "/**\n * A function that is called when the entity is despawned.\n *\n * @param this - The Entity instance.\n */\n",
20427
+ "docComment": "/**\n * A function that is called when the entity is despawned.\n *\n * @param entity - The Entity instance that despawned.\n */\n",
20446
20428
  "excerptTokens": [
20447
20429
  {
20448
20430
  "kind": "Content",
@@ -20450,7 +20432,7 @@
20450
20432
  },
20451
20433
  {
20452
20434
  "kind": "Content",
20453
- "text": "(this: "
20435
+ "text": "(entity: "
20454
20436
  },
20455
20437
  {
20456
20438
  "kind": "Reference",
@@ -20481,7 +20463,7 @@
20481
20463
  {
20482
20464
  "kind": "Property",
20483
20465
  "canonicalReference": "server!HYTOPIA.Entity#onEntityCollision:member",
20484
- "docComment": "/**\n * A function that is called when the entity collides with another entity.\n *\n * @param this - The Entity instance.\n *\n * @param entity - The entity that the entity collided with.\n *\n * @param started - Whether the collision started or ended.\n */\n",
20466
+ "docComment": "/**\n * A function that is called when the entity collides with another entity.\n *\n * @param entity - The Entity instance the collision is for.\n *\n * @param otherEntity - The other entity that the entity collided with.\n *\n * @param started - Whether the collision started or ended.\n */\n",
20485
20467
  "excerptTokens": [
20486
20468
  {
20487
20469
  "kind": "Content",
@@ -20489,7 +20471,7 @@
20489
20471
  },
20490
20472
  {
20491
20473
  "kind": "Content",
20492
- "text": "(this: "
20474
+ "text": "(entity: "
20493
20475
  },
20494
20476
  {
20495
20477
  "kind": "Reference",
@@ -20498,7 +20480,7 @@
20498
20480
  },
20499
20481
  {
20500
20482
  "kind": "Content",
20501
- "text": ", entity: "
20483
+ "text": ", otherEntity: "
20502
20484
  },
20503
20485
  {
20504
20486
  "kind": "Reference",
@@ -20529,7 +20511,7 @@
20529
20511
  {
20530
20512
  "kind": "Property",
20531
20513
  "canonicalReference": "server!HYTOPIA.Entity#onEntityContactForce:member",
20532
- "docComment": "/**\n * A function that is called when the entity contacts another entity.\n *\n * @param this - The Entity instance.\n *\n * @param entity - The entity that the entity collided with.\n *\n * @param contactForceData - The contact force data.\n */\n",
20514
+ "docComment": "/**\n * A function that is called when the entity contacts another entity.\n *\n * @param entity - The Entity instance the collision is for.\n *\n * @param otherEntity - The other entity that the entity collided with.\n *\n * @param contactForceData - The contact force data.\n */\n",
20533
20515
  "excerptTokens": [
20534
20516
  {
20535
20517
  "kind": "Content",
@@ -20537,7 +20519,7 @@
20537
20519
  },
20538
20520
  {
20539
20521
  "kind": "Content",
20540
- "text": "(this: "
20522
+ "text": "(entity: "
20541
20523
  },
20542
20524
  {
20543
20525
  "kind": "Reference",
@@ -20546,7 +20528,7 @@
20546
20528
  },
20547
20529
  {
20548
20530
  "kind": "Content",
20549
- "text": ", entity: "
20531
+ "text": ", otherEntity: "
20550
20532
  },
20551
20533
  {
20552
20534
  "kind": "Reference",
@@ -20586,7 +20568,7 @@
20586
20568
  {
20587
20569
  "kind": "Property",
20588
20570
  "canonicalReference": "server!HYTOPIA.Entity#onSpawn:member",
20589
- "docComment": "/**\n * A function that is called when the entity is spawned.\n *\n * @param this - The Entity instance.\n */\n",
20571
+ "docComment": "/**\n * A function that is called when the entity is spawned.\n *\n * @param entity - The Entity instance that spawned.\n */\n",
20590
20572
  "excerptTokens": [
20591
20573
  {
20592
20574
  "kind": "Content",
@@ -20594,7 +20576,7 @@
20594
20576
  },
20595
20577
  {
20596
20578
  "kind": "Content",
20597
- "text": "(this: "
20579
+ "text": "(entity: "
20598
20580
  },
20599
20581
  {
20600
20582
  "kind": "Reference",
@@ -20625,7 +20607,7 @@
20625
20607
  {
20626
20608
  "kind": "Property",
20627
20609
  "canonicalReference": "server!HYTOPIA.Entity#onTick:member",
20628
- "docComment": "/**\n * A function that is called every tick.\n *\n * @param this - The Entity instance.\n *\n * @param tickDeltaMs - The delta time in milliseconds since the last tick.\n */\n",
20610
+ "docComment": "/**\n * A function that is called every tick.\n *\n * @param entity - The Entity instance that ticked.\n *\n * @param tickDeltaMs - The delta time in milliseconds since the last tick.\n */\n",
20629
20611
  "excerptTokens": [
20630
20612
  {
20631
20613
  "kind": "Content",
@@ -20633,7 +20615,7 @@
20633
20615
  },
20634
20616
  {
20635
20617
  "kind": "Content",
20636
- "text": "(this: "
20618
+ "text": "(entity: "
20637
20619
  },
20638
20620
  {
20639
20621
  "kind": "Reference",
@@ -21840,6 +21822,47 @@
21840
21822
  "name": "EntityOptions",
21841
21823
  "preserveMemberOrder": false,
21842
21824
  "members": [
21825
+ {
21826
+ "kind": "PropertySignature",
21827
+ "canonicalReference": "server!HYTOPIA.EntityOptions#createCustomCharacterController:member",
21828
+ "docComment": "/**\n * A function that creates a custom character controller for the entity when it spawns.\n *\n * @param entity - The Entity instance.\n *\n * @returns A character controller that extends {@link BaseCharacterController}.\n */\n",
21829
+ "excerptTokens": [
21830
+ {
21831
+ "kind": "Content",
21832
+ "text": "createCustomCharacterController?: "
21833
+ },
21834
+ {
21835
+ "kind": "Content",
21836
+ "text": "(entity: "
21837
+ },
21838
+ {
21839
+ "kind": "Reference",
21840
+ "text": "Entity",
21841
+ "canonicalReference": "server!Entity:class"
21842
+ },
21843
+ {
21844
+ "kind": "Content",
21845
+ "text": ") => "
21846
+ },
21847
+ {
21848
+ "kind": "Reference",
21849
+ "text": "BaseCharacterController",
21850
+ "canonicalReference": "server!BaseCharacterController:class"
21851
+ },
21852
+ {
21853
+ "kind": "Content",
21854
+ "text": ";"
21855
+ }
21856
+ ],
21857
+ "isReadonly": false,
21858
+ "isOptional": true,
21859
+ "releaseTag": "Public",
21860
+ "name": "createCustomCharacterController",
21861
+ "propertyTypeTokenRange": {
21862
+ "startIndex": 1,
21863
+ "endIndex": 5
21864
+ }
21865
+ },
21843
21866
  {
21844
21867
  "kind": "PropertySignature",
21845
21868
  "canonicalReference": "server!HYTOPIA.EntityOptions#modelLoopedAnimations:member",
@@ -22564,6 +22587,129 @@
22564
22587
  ],
22565
22588
  "implementsTokenRanges": []
22566
22589
  },
22590
+ {
22591
+ "kind": "TypeAlias",
22592
+ "canonicalReference": "server!HYTOPIA.FaceCallback:type",
22593
+ "docComment": "/**\n * A callback function called when the entity associated with the SimpleCharacterController updates its rotation as it is attempting to face a target coordinate.\n *\n * @param currentRotation - The current rotation of the entity.\n *\n * @param targetRotation - The target rotation of the entity.\n *\n * @public\n */\n",
22594
+ "excerptTokens": [
22595
+ {
22596
+ "kind": "Content",
22597
+ "text": "export type FaceCallback = "
22598
+ },
22599
+ {
22600
+ "kind": "Content",
22601
+ "text": "(currentRotation: "
22602
+ },
22603
+ {
22604
+ "kind": "Reference",
22605
+ "text": "Rotation",
22606
+ "canonicalReference": "server!Rotation:interface"
22607
+ },
22608
+ {
22609
+ "kind": "Content",
22610
+ "text": ", targetRotation: "
22611
+ },
22612
+ {
22613
+ "kind": "Reference",
22614
+ "text": "Rotation",
22615
+ "canonicalReference": "server!Rotation:interface"
22616
+ },
22617
+ {
22618
+ "kind": "Content",
22619
+ "text": ") => void"
22620
+ },
22621
+ {
22622
+ "kind": "Content",
22623
+ "text": ";"
22624
+ }
22625
+ ],
22626
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
22627
+ "releaseTag": "Public",
22628
+ "name": "FaceCallback",
22629
+ "typeTokenRange": {
22630
+ "startIndex": 1,
22631
+ "endIndex": 6
22632
+ }
22633
+ },
22634
+ {
22635
+ "kind": "TypeAlias",
22636
+ "canonicalReference": "server!HYTOPIA.FaceCompleteCallback:type",
22637
+ "docComment": "/**\n * A callback function called when the entity associated with the SimpleCharacterController finishes rotating and is now facing a target coordinate.\n *\n * @param endRotation - The rotation of the entity after it has finished rotating.\n *\n * @public\n */\n",
22638
+ "excerptTokens": [
22639
+ {
22640
+ "kind": "Content",
22641
+ "text": "export type FaceCompleteCallback = "
22642
+ },
22643
+ {
22644
+ "kind": "Content",
22645
+ "text": "(endRotation: "
22646
+ },
22647
+ {
22648
+ "kind": "Reference",
22649
+ "text": "Rotation",
22650
+ "canonicalReference": "server!Rotation:interface"
22651
+ },
22652
+ {
22653
+ "kind": "Content",
22654
+ "text": ") => void"
22655
+ },
22656
+ {
22657
+ "kind": "Content",
22658
+ "text": ";"
22659
+ }
22660
+ ],
22661
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
22662
+ "releaseTag": "Public",
22663
+ "name": "FaceCompleteCallback",
22664
+ "typeTokenRange": {
22665
+ "startIndex": 1,
22666
+ "endIndex": 4
22667
+ }
22668
+ },
22669
+ {
22670
+ "kind": "TypeAlias",
22671
+ "canonicalReference": "server!HYTOPIA.FaceOptions:type",
22672
+ "docComment": "/**\n * Options for the {@link SimpleCharacterController.face} method.\n *\n * @public\n */\n",
22673
+ "excerptTokens": [
22674
+ {
22675
+ "kind": "Content",
22676
+ "text": "export type FaceOptions = "
22677
+ },
22678
+ {
22679
+ "kind": "Content",
22680
+ "text": "{\n faceCallback?: "
22681
+ },
22682
+ {
22683
+ "kind": "Reference",
22684
+ "text": "FaceCallback",
22685
+ "canonicalReference": "server!FaceCallback:type"
22686
+ },
22687
+ {
22688
+ "kind": "Content",
22689
+ "text": ";\n faceCompleteCallback?: "
22690
+ },
22691
+ {
22692
+ "kind": "Reference",
22693
+ "text": "FaceCompleteCallback",
22694
+ "canonicalReference": "server!FaceCompleteCallback:type"
22695
+ },
22696
+ {
22697
+ "kind": "Content",
22698
+ "text": ";\n}"
22699
+ },
22700
+ {
22701
+ "kind": "Content",
22702
+ "text": ";"
22703
+ }
22704
+ ],
22705
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
22706
+ "releaseTag": "Public",
22707
+ "name": "FaceOptions",
22708
+ "typeTokenRange": {
22709
+ "startIndex": 1,
22710
+ "endIndex": 6
22711
+ }
22712
+ },
22567
22713
  {
22568
22714
  "kind": "Class",
22569
22715
  "canonicalReference": "server!HYTOPIA.GameServer:class",
@@ -22879,6 +23025,129 @@
22879
23025
  }
22880
23026
  ]
22881
23027
  },
23028
+ {
23029
+ "kind": "TypeAlias",
23030
+ "canonicalReference": "server!HYTOPIA.MoveCallback:type",
23031
+ "docComment": "/**\n * A callback function called when the entity associated with the SimpleCharacterController updates its translation as it is attempting to move to a target coordinate.\n *\n * @param currentTranslation - The current translation of the entity.\n *\n * @param targetTranslation - The target translation of the entity.\n *\n * @public\n */\n",
23032
+ "excerptTokens": [
23033
+ {
23034
+ "kind": "Content",
23035
+ "text": "export type MoveCallback = "
23036
+ },
23037
+ {
23038
+ "kind": "Content",
23039
+ "text": "(currentTranslation: "
23040
+ },
23041
+ {
23042
+ "kind": "Reference",
23043
+ "text": "Vector3",
23044
+ "canonicalReference": "server!Vector3:interface"
23045
+ },
23046
+ {
23047
+ "kind": "Content",
23048
+ "text": ", targetTranslation: "
23049
+ },
23050
+ {
23051
+ "kind": "Reference",
23052
+ "text": "Vector3",
23053
+ "canonicalReference": "server!Vector3:interface"
23054
+ },
23055
+ {
23056
+ "kind": "Content",
23057
+ "text": ") => void"
23058
+ },
23059
+ {
23060
+ "kind": "Content",
23061
+ "text": ";"
23062
+ }
23063
+ ],
23064
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
23065
+ "releaseTag": "Public",
23066
+ "name": "MoveCallback",
23067
+ "typeTokenRange": {
23068
+ "startIndex": 1,
23069
+ "endIndex": 6
23070
+ }
23071
+ },
23072
+ {
23073
+ "kind": "TypeAlias",
23074
+ "canonicalReference": "server!HYTOPIA.MoveCompleteCallback:type",
23075
+ "docComment": "/**\n * A callback function called when the entity associated with the SimpleCharacterController reaches the target coordinate. An entity must reach the x,y,z coordinate for the callback to be called.\n *\n * @param endTranslation - The translation of the entity after it has finished moving.\n *\n * @public\n */\n",
23076
+ "excerptTokens": [
23077
+ {
23078
+ "kind": "Content",
23079
+ "text": "export type MoveCompleteCallback = "
23080
+ },
23081
+ {
23082
+ "kind": "Content",
23083
+ "text": "(endTranslation: "
23084
+ },
23085
+ {
23086
+ "kind": "Reference",
23087
+ "text": "Vector3",
23088
+ "canonicalReference": "server!Vector3:interface"
23089
+ },
23090
+ {
23091
+ "kind": "Content",
23092
+ "text": ") => void"
23093
+ },
23094
+ {
23095
+ "kind": "Content",
23096
+ "text": ";"
23097
+ }
23098
+ ],
23099
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
23100
+ "releaseTag": "Public",
23101
+ "name": "MoveCompleteCallback",
23102
+ "typeTokenRange": {
23103
+ "startIndex": 1,
23104
+ "endIndex": 4
23105
+ }
23106
+ },
23107
+ {
23108
+ "kind": "TypeAlias",
23109
+ "canonicalReference": "server!HYTOPIA.MoveOptions:type",
23110
+ "docComment": "/**\n * Options for the {@link SimpleCharacterController.move} method.\n *\n * @public\n */\n",
23111
+ "excerptTokens": [
23112
+ {
23113
+ "kind": "Content",
23114
+ "text": "export type MoveOptions = "
23115
+ },
23116
+ {
23117
+ "kind": "Content",
23118
+ "text": "{\n moveCallback?: "
23119
+ },
23120
+ {
23121
+ "kind": "Reference",
23122
+ "text": "MoveCallback",
23123
+ "canonicalReference": "server!MoveCallback:type"
23124
+ },
23125
+ {
23126
+ "kind": "Content",
23127
+ "text": ";\n moveCompleteCallback?: "
23128
+ },
23129
+ {
23130
+ "kind": "Reference",
23131
+ "text": "MoveCompleteCallback",
23132
+ "canonicalReference": "server!MoveCompleteCallback:type"
23133
+ },
23134
+ {
23135
+ "kind": "Content",
23136
+ "text": ";\n moveIgnoreAxes?: {\n x?: boolean;\n y?: boolean;\n z?: boolean;\n };\n}"
23137
+ },
23138
+ {
23139
+ "kind": "Content",
23140
+ "text": ";"
23141
+ }
23142
+ ],
23143
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
23144
+ "releaseTag": "Public",
23145
+ "name": "MoveOptions",
23146
+ "typeTokenRange": {
23147
+ "startIndex": 1,
23148
+ "endIndex": 6
23149
+ }
23150
+ },
22882
23151
  {
22883
23152
  "kind": "Class",
22884
23153
  "canonicalReference": "server!HYTOPIA.Player:class",
@@ -28070,6 +28339,202 @@
28070
28339
  ],
28071
28340
  "extendsTokenRanges": []
28072
28341
  },
28342
+ {
28343
+ "kind": "Class",
28344
+ "canonicalReference": "server!HYTOPIA.SimpleCharacterController:class",
28345
+ "docComment": "/**\n * A simple character controller with basic movement functions.\n *\n * @remarks\n *\n * This class implements simple movement methods that serve as a way to add realistic movement and rotational facing functionality to an entity. This is also a great base to extend for your own more complex character controller that implements things like pathfinding. Compatible with entities that have kinematic or dynamic rigid body types.\n *\n * @example\n * ```typescript\n * // Create a custom character controller for myEntity, prior to spawning it.\n * myEntity.createCustomCharacterController = () => {\n * return new SimpleCharacterController(myEntity);\n * };\n *\n * // Spawn the entity in the world.\n * myEntity.spawn(world, { x: 53, y: 10, z: 23 });\n *\n * // Move the entity at a speed of 4 blocks\n * // per second to the coordinate (10, 1, 10).\n * // console.log when we reach the target.\n * myEntity.characterController.move({ x: 10, y: 1, z: 10 }, 4, {\n * moveCompleteCallback: endPosition => {\n * console.log('Finished moving to', endPosition);\n * },\n * });\n * ```\n *\n * @public\n */\n",
28346
+ "excerptTokens": [
28347
+ {
28348
+ "kind": "Content",
28349
+ "text": "export default class SimpleCharacterController extends "
28350
+ },
28351
+ {
28352
+ "kind": "Reference",
28353
+ "text": "BaseCharacterController",
28354
+ "canonicalReference": "server!BaseCharacterController:class"
28355
+ },
28356
+ {
28357
+ "kind": "Content",
28358
+ "text": " "
28359
+ }
28360
+ ],
28361
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
28362
+ "releaseTag": "Public",
28363
+ "isAbstract": false,
28364
+ "name": "SimpleCharacterController",
28365
+ "preserveMemberOrder": false,
28366
+ "members": [
28367
+ {
28368
+ "kind": "Method",
28369
+ "canonicalReference": "server!HYTOPIA.SimpleCharacterController#face:member(1)",
28370
+ "docComment": "/**\n * Rotates the entity at a given speed to face a target coordinate.\n *\n * @remarks\n *\n * If this method is called while the entity is already attempting to face another target, the previous target will be ignored and the entity will start attempting to face the new target.\n *\n * @param target - The target coordinate to face.\n *\n * @param speed - The speed at which to rotate to the target coordinate.\n *\n * @param options - Additional options for the face operation, such as callbacks.\n */\n",
28371
+ "excerptTokens": [
28372
+ {
28373
+ "kind": "Content",
28374
+ "text": "face(target: "
28375
+ },
28376
+ {
28377
+ "kind": "Reference",
28378
+ "text": "Vector3",
28379
+ "canonicalReference": "server!Vector3:interface"
28380
+ },
28381
+ {
28382
+ "kind": "Content",
28383
+ "text": ", speed: "
28384
+ },
28385
+ {
28386
+ "kind": "Content",
28387
+ "text": "number"
28388
+ },
28389
+ {
28390
+ "kind": "Content",
28391
+ "text": ", options?: "
28392
+ },
28393
+ {
28394
+ "kind": "Reference",
28395
+ "text": "FaceOptions",
28396
+ "canonicalReference": "server!FaceOptions:type"
28397
+ },
28398
+ {
28399
+ "kind": "Content",
28400
+ "text": "): "
28401
+ },
28402
+ {
28403
+ "kind": "Content",
28404
+ "text": "void"
28405
+ },
28406
+ {
28407
+ "kind": "Content",
28408
+ "text": ";"
28409
+ }
28410
+ ],
28411
+ "isStatic": false,
28412
+ "returnTypeTokenRange": {
28413
+ "startIndex": 7,
28414
+ "endIndex": 8
28415
+ },
28416
+ "releaseTag": "Public",
28417
+ "isProtected": false,
28418
+ "overloadIndex": 1,
28419
+ "parameters": [
28420
+ {
28421
+ "parameterName": "target",
28422
+ "parameterTypeTokenRange": {
28423
+ "startIndex": 1,
28424
+ "endIndex": 2
28425
+ },
28426
+ "isOptional": false
28427
+ },
28428
+ {
28429
+ "parameterName": "speed",
28430
+ "parameterTypeTokenRange": {
28431
+ "startIndex": 3,
28432
+ "endIndex": 4
28433
+ },
28434
+ "isOptional": false
28435
+ },
28436
+ {
28437
+ "parameterName": "options",
28438
+ "parameterTypeTokenRange": {
28439
+ "startIndex": 5,
28440
+ "endIndex": 6
28441
+ },
28442
+ "isOptional": true
28443
+ }
28444
+ ],
28445
+ "isOptional": false,
28446
+ "isAbstract": false,
28447
+ "name": "face"
28448
+ },
28449
+ {
28450
+ "kind": "Method",
28451
+ "canonicalReference": "server!HYTOPIA.SimpleCharacterController#move:member(1)",
28452
+ "docComment": "/**\n * Moves the entity at a given speed in a straight line to a target coordinate.\n *\n * @remarks\n *\n * If this method is called while the entity is already attempting to move to another target, the previous target will be ignored and the entity will start attempting to move to the new target.\n *\n * @param target - The target coordinate to move to.\n *\n * @param speed - The speed at which to move to the target coordinate.\n *\n * @param options - Additional options for the move operation, such as callbacks.\n */\n",
28453
+ "excerptTokens": [
28454
+ {
28455
+ "kind": "Content",
28456
+ "text": "move(target: "
28457
+ },
28458
+ {
28459
+ "kind": "Reference",
28460
+ "text": "Vector3",
28461
+ "canonicalReference": "server!Vector3:interface"
28462
+ },
28463
+ {
28464
+ "kind": "Content",
28465
+ "text": ", speed: "
28466
+ },
28467
+ {
28468
+ "kind": "Content",
28469
+ "text": "number"
28470
+ },
28471
+ {
28472
+ "kind": "Content",
28473
+ "text": ", options?: "
28474
+ },
28475
+ {
28476
+ "kind": "Reference",
28477
+ "text": "MoveOptions",
28478
+ "canonicalReference": "server!MoveOptions:type"
28479
+ },
28480
+ {
28481
+ "kind": "Content",
28482
+ "text": "): "
28483
+ },
28484
+ {
28485
+ "kind": "Content",
28486
+ "text": "void"
28487
+ },
28488
+ {
28489
+ "kind": "Content",
28490
+ "text": ";"
28491
+ }
28492
+ ],
28493
+ "isStatic": false,
28494
+ "returnTypeTokenRange": {
28495
+ "startIndex": 7,
28496
+ "endIndex": 8
28497
+ },
28498
+ "releaseTag": "Public",
28499
+ "isProtected": false,
28500
+ "overloadIndex": 1,
28501
+ "parameters": [
28502
+ {
28503
+ "parameterName": "target",
28504
+ "parameterTypeTokenRange": {
28505
+ "startIndex": 1,
28506
+ "endIndex": 2
28507
+ },
28508
+ "isOptional": false
28509
+ },
28510
+ {
28511
+ "parameterName": "speed",
28512
+ "parameterTypeTokenRange": {
28513
+ "startIndex": 3,
28514
+ "endIndex": 4
28515
+ },
28516
+ "isOptional": false
28517
+ },
28518
+ {
28519
+ "parameterName": "options",
28520
+ "parameterTypeTokenRange": {
28521
+ "startIndex": 5,
28522
+ "endIndex": 6
28523
+ },
28524
+ "isOptional": true
28525
+ }
28526
+ ],
28527
+ "isOptional": false,
28528
+ "isAbstract": false,
28529
+ "name": "move"
28530
+ }
28531
+ ],
28532
+ "extendsTokenRange": {
28533
+ "startIndex": 1,
28534
+ "endIndex": 2
28535
+ },
28536
+ "implementsTokenRanges": []
28537
+ },
28073
28538
  {
28074
28539
  "kind": "Class",
28075
28540
  "canonicalReference": "server!HYTOPIA.Simulation:class",
@@ -30117,6 +30582,129 @@
30117
30582
  }
30118
30583
  ]
30119
30584
  },
30585
+ {
30586
+ "kind": "TypeAlias",
30587
+ "canonicalReference": "server!MoveCallback:type",
30588
+ "docComment": "/**\n * A callback function called when the entity associated with the SimpleCharacterController updates its translation as it is attempting to move to a target coordinate.\n *\n * @param currentTranslation - The current translation of the entity.\n *\n * @param targetTranslation - The target translation of the entity.\n *\n * @public\n */\n",
30589
+ "excerptTokens": [
30590
+ {
30591
+ "kind": "Content",
30592
+ "text": "export type MoveCallback = "
30593
+ },
30594
+ {
30595
+ "kind": "Content",
30596
+ "text": "(currentTranslation: "
30597
+ },
30598
+ {
30599
+ "kind": "Reference",
30600
+ "text": "Vector3",
30601
+ "canonicalReference": "server!Vector3:interface"
30602
+ },
30603
+ {
30604
+ "kind": "Content",
30605
+ "text": ", targetTranslation: "
30606
+ },
30607
+ {
30608
+ "kind": "Reference",
30609
+ "text": "Vector3",
30610
+ "canonicalReference": "server!Vector3:interface"
30611
+ },
30612
+ {
30613
+ "kind": "Content",
30614
+ "text": ") => void"
30615
+ },
30616
+ {
30617
+ "kind": "Content",
30618
+ "text": ";"
30619
+ }
30620
+ ],
30621
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
30622
+ "releaseTag": "Public",
30623
+ "name": "MoveCallback",
30624
+ "typeTokenRange": {
30625
+ "startIndex": 1,
30626
+ "endIndex": 6
30627
+ }
30628
+ },
30629
+ {
30630
+ "kind": "TypeAlias",
30631
+ "canonicalReference": "server!MoveCompleteCallback:type",
30632
+ "docComment": "/**\n * A callback function called when the entity associated with the SimpleCharacterController reaches the target coordinate. An entity must reach the x,y,z coordinate for the callback to be called.\n *\n * @param endTranslation - The translation of the entity after it has finished moving.\n *\n * @public\n */\n",
30633
+ "excerptTokens": [
30634
+ {
30635
+ "kind": "Content",
30636
+ "text": "export type MoveCompleteCallback = "
30637
+ },
30638
+ {
30639
+ "kind": "Content",
30640
+ "text": "(endTranslation: "
30641
+ },
30642
+ {
30643
+ "kind": "Reference",
30644
+ "text": "Vector3",
30645
+ "canonicalReference": "server!Vector3:interface"
30646
+ },
30647
+ {
30648
+ "kind": "Content",
30649
+ "text": ") => void"
30650
+ },
30651
+ {
30652
+ "kind": "Content",
30653
+ "text": ";"
30654
+ }
30655
+ ],
30656
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
30657
+ "releaseTag": "Public",
30658
+ "name": "MoveCompleteCallback",
30659
+ "typeTokenRange": {
30660
+ "startIndex": 1,
30661
+ "endIndex": 4
30662
+ }
30663
+ },
30664
+ {
30665
+ "kind": "TypeAlias",
30666
+ "canonicalReference": "server!MoveOptions:type",
30667
+ "docComment": "/**\n * Options for the {@link SimpleCharacterController.move} method.\n *\n * @public\n */\n",
30668
+ "excerptTokens": [
30669
+ {
30670
+ "kind": "Content",
30671
+ "text": "export type MoveOptions = "
30672
+ },
30673
+ {
30674
+ "kind": "Content",
30675
+ "text": "{\n moveCallback?: "
30676
+ },
30677
+ {
30678
+ "kind": "Reference",
30679
+ "text": "MoveCallback",
30680
+ "canonicalReference": "server!MoveCallback:type"
30681
+ },
30682
+ {
30683
+ "kind": "Content",
30684
+ "text": ";\n moveCompleteCallback?: "
30685
+ },
30686
+ {
30687
+ "kind": "Reference",
30688
+ "text": "MoveCompleteCallback",
30689
+ "canonicalReference": "server!MoveCompleteCallback:type"
30690
+ },
30691
+ {
30692
+ "kind": "Content",
30693
+ "text": ";\n moveIgnoreAxes?: {\n x?: boolean;\n y?: boolean;\n z?: boolean;\n };\n}"
30694
+ },
30695
+ {
30696
+ "kind": "Content",
30697
+ "text": ";"
30698
+ }
30699
+ ],
30700
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
30701
+ "releaseTag": "Public",
30702
+ "name": "MoveOptions",
30703
+ "typeTokenRange": {
30704
+ "startIndex": 1,
30705
+ "endIndex": 6
30706
+ }
30707
+ },
30120
30708
  {
30121
30709
  "kind": "Class",
30122
30710
  "canonicalReference": "server!Player:class",
@@ -35308,6 +35896,202 @@
35308
35896
  ],
35309
35897
  "extendsTokenRanges": []
35310
35898
  },
35899
+ {
35900
+ "kind": "Class",
35901
+ "canonicalReference": "server!SimpleCharacterController:class",
35902
+ "docComment": "/**\n * A simple character controller with basic movement functions.\n *\n * @remarks\n *\n * This class implements simple movement methods that serve as a way to add realistic movement and rotational facing functionality to an entity. This is also a great base to extend for your own more complex character controller that implements things like pathfinding. Compatible with entities that have kinematic or dynamic rigid body types.\n *\n * @example\n * ```typescript\n * // Create a custom character controller for myEntity, prior to spawning it.\n * myEntity.createCustomCharacterController = () => {\n * return new SimpleCharacterController(myEntity);\n * };\n *\n * // Spawn the entity in the world.\n * myEntity.spawn(world, { x: 53, y: 10, z: 23 });\n *\n * // Move the entity at a speed of 4 blocks\n * // per second to the coordinate (10, 1, 10).\n * // console.log when we reach the target.\n * myEntity.characterController.move({ x: 10, y: 1, z: 10 }, 4, {\n * moveCompleteCallback: endPosition => {\n * console.log('Finished moving to', endPosition);\n * },\n * });\n * ```\n *\n * @public\n */\n",
35903
+ "excerptTokens": [
35904
+ {
35905
+ "kind": "Content",
35906
+ "text": "export default class SimpleCharacterController extends "
35907
+ },
35908
+ {
35909
+ "kind": "Reference",
35910
+ "text": "BaseCharacterController",
35911
+ "canonicalReference": "server!BaseCharacterController:class"
35912
+ },
35913
+ {
35914
+ "kind": "Content",
35915
+ "text": " "
35916
+ }
35917
+ ],
35918
+ "fileUrlPath": "src/world/entities/controllers/SimpleCharacterController.ts",
35919
+ "releaseTag": "Public",
35920
+ "isAbstract": false,
35921
+ "name": "SimpleCharacterController",
35922
+ "preserveMemberOrder": false,
35923
+ "members": [
35924
+ {
35925
+ "kind": "Method",
35926
+ "canonicalReference": "server!SimpleCharacterController#face:member(1)",
35927
+ "docComment": "/**\n * Rotates the entity at a given speed to face a target coordinate.\n *\n * @remarks\n *\n * If this method is called while the entity is already attempting to face another target, the previous target will be ignored and the entity will start attempting to face the new target.\n *\n * @param target - The target coordinate to face.\n *\n * @param speed - The speed at which to rotate to the target coordinate.\n *\n * @param options - Additional options for the face operation, such as callbacks.\n */\n",
35928
+ "excerptTokens": [
35929
+ {
35930
+ "kind": "Content",
35931
+ "text": "face(target: "
35932
+ },
35933
+ {
35934
+ "kind": "Reference",
35935
+ "text": "Vector3",
35936
+ "canonicalReference": "server!Vector3:interface"
35937
+ },
35938
+ {
35939
+ "kind": "Content",
35940
+ "text": ", speed: "
35941
+ },
35942
+ {
35943
+ "kind": "Content",
35944
+ "text": "number"
35945
+ },
35946
+ {
35947
+ "kind": "Content",
35948
+ "text": ", options?: "
35949
+ },
35950
+ {
35951
+ "kind": "Reference",
35952
+ "text": "FaceOptions",
35953
+ "canonicalReference": "server!FaceOptions:type"
35954
+ },
35955
+ {
35956
+ "kind": "Content",
35957
+ "text": "): "
35958
+ },
35959
+ {
35960
+ "kind": "Content",
35961
+ "text": "void"
35962
+ },
35963
+ {
35964
+ "kind": "Content",
35965
+ "text": ";"
35966
+ }
35967
+ ],
35968
+ "isStatic": false,
35969
+ "returnTypeTokenRange": {
35970
+ "startIndex": 7,
35971
+ "endIndex": 8
35972
+ },
35973
+ "releaseTag": "Public",
35974
+ "isProtected": false,
35975
+ "overloadIndex": 1,
35976
+ "parameters": [
35977
+ {
35978
+ "parameterName": "target",
35979
+ "parameterTypeTokenRange": {
35980
+ "startIndex": 1,
35981
+ "endIndex": 2
35982
+ },
35983
+ "isOptional": false
35984
+ },
35985
+ {
35986
+ "parameterName": "speed",
35987
+ "parameterTypeTokenRange": {
35988
+ "startIndex": 3,
35989
+ "endIndex": 4
35990
+ },
35991
+ "isOptional": false
35992
+ },
35993
+ {
35994
+ "parameterName": "options",
35995
+ "parameterTypeTokenRange": {
35996
+ "startIndex": 5,
35997
+ "endIndex": 6
35998
+ },
35999
+ "isOptional": true
36000
+ }
36001
+ ],
36002
+ "isOptional": false,
36003
+ "isAbstract": false,
36004
+ "name": "face"
36005
+ },
36006
+ {
36007
+ "kind": "Method",
36008
+ "canonicalReference": "server!SimpleCharacterController#move:member(1)",
36009
+ "docComment": "/**\n * Moves the entity at a given speed in a straight line to a target coordinate.\n *\n * @remarks\n *\n * If this method is called while the entity is already attempting to move to another target, the previous target will be ignored and the entity will start attempting to move to the new target.\n *\n * @param target - The target coordinate to move to.\n *\n * @param speed - The speed at which to move to the target coordinate.\n *\n * @param options - Additional options for the move operation, such as callbacks.\n */\n",
36010
+ "excerptTokens": [
36011
+ {
36012
+ "kind": "Content",
36013
+ "text": "move(target: "
36014
+ },
36015
+ {
36016
+ "kind": "Reference",
36017
+ "text": "Vector3",
36018
+ "canonicalReference": "server!Vector3:interface"
36019
+ },
36020
+ {
36021
+ "kind": "Content",
36022
+ "text": ", speed: "
36023
+ },
36024
+ {
36025
+ "kind": "Content",
36026
+ "text": "number"
36027
+ },
36028
+ {
36029
+ "kind": "Content",
36030
+ "text": ", options?: "
36031
+ },
36032
+ {
36033
+ "kind": "Reference",
36034
+ "text": "MoveOptions",
36035
+ "canonicalReference": "server!MoveOptions:type"
36036
+ },
36037
+ {
36038
+ "kind": "Content",
36039
+ "text": "): "
36040
+ },
36041
+ {
36042
+ "kind": "Content",
36043
+ "text": "void"
36044
+ },
36045
+ {
36046
+ "kind": "Content",
36047
+ "text": ";"
36048
+ }
36049
+ ],
36050
+ "isStatic": false,
36051
+ "returnTypeTokenRange": {
36052
+ "startIndex": 7,
36053
+ "endIndex": 8
36054
+ },
36055
+ "releaseTag": "Public",
36056
+ "isProtected": false,
36057
+ "overloadIndex": 1,
36058
+ "parameters": [
36059
+ {
36060
+ "parameterName": "target",
36061
+ "parameterTypeTokenRange": {
36062
+ "startIndex": 1,
36063
+ "endIndex": 2
36064
+ },
36065
+ "isOptional": false
36066
+ },
36067
+ {
36068
+ "parameterName": "speed",
36069
+ "parameterTypeTokenRange": {
36070
+ "startIndex": 3,
36071
+ "endIndex": 4
36072
+ },
36073
+ "isOptional": false
36074
+ },
36075
+ {
36076
+ "parameterName": "options",
36077
+ "parameterTypeTokenRange": {
36078
+ "startIndex": 5,
36079
+ "endIndex": 6
36080
+ },
36081
+ "isOptional": true
36082
+ }
36083
+ ],
36084
+ "isOptional": false,
36085
+ "isAbstract": false,
36086
+ "name": "move"
36087
+ }
36088
+ ],
36089
+ "extendsTokenRange": {
36090
+ "startIndex": 1,
36091
+ "endIndex": 2
36092
+ },
36093
+ "implementsTokenRanges": []
36094
+ },
35311
36095
  {
35312
36096
  "kind": "Class",
35313
36097
  "canonicalReference": "server!Simulation:class",