hytopia 0.1.56 → 0.1.57
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.
- package/boilerplate/index.ts +1 -1
- package/docs/{server.basecharactercontroller.attach.md → server.baseentitycontroller.attach.md} +3 -3
- package/docs/{server.basecharactercontroller.despawn.md → server.baseentitycontroller.despawn.md} +3 -3
- package/docs/{server.basecharactercontroller.detach.md → server.baseentitycontroller.detach.md} +3 -3
- package/docs/{server.basecharactercontroller.md → server.baseentitycontroller.md} +29 -29
- package/docs/{server.basecharactercontroller.onattach.md → server.baseentitycontroller.onattach.md} +3 -3
- package/docs/server.baseentitycontroller.ondespawn.md +13 -0
- package/docs/{server.basecharactercontroller.ondetach.md → server.baseentitycontroller.ondetach.md} +3 -3
- package/docs/server.baseentitycontroller.onspawn.md +13 -0
- package/docs/server.baseentitycontroller.ontick.md +13 -0
- package/docs/{server.basecharactercontroller.ontickwithplayerinput.md → server.baseentitycontroller.ontickwithplayerinput.md} +3 -3
- package/docs/{server.basecharactercontroller.spawn.md → server.baseentitycontroller.spawn.md} +3 -3
- package/docs/{server.basecharactercontroller.tick.md → server.baseentitycontroller.tick.md} +3 -3
- package/docs/{server.basecharactercontroller.tickwithplayerinput.md → server.baseentitycontroller.tickwithplayerinput.md} +3 -3
- package/docs/server.entity.controller.md +13 -0
- package/docs/server.entity.md +40 -5
- package/docs/server.entity.modelanimationsplaybackrate.md +13 -0
- package/docs/server.entity.setcontroller.md +53 -0
- package/docs/server.entity.setmodelanimationsplaybackrate.md +57 -0
- package/docs/server.entityeventpayload.md +9 -0
- package/docs/server.entityeventpayload.setmodelanimationsplaybackrate.entity.md +11 -0
- package/docs/server.entityeventpayload.setmodelanimationsplaybackrate.md +70 -0
- package/docs/server.entityeventpayload.setmodelanimationsplaybackrate.playbackrate.md +11 -0
- package/docs/server.entityeventtype.md +14 -0
- package/docs/server.entityoptions.controller.md +13 -0
- package/docs/server.entityoptions.md +22 -3
- package/docs/server.entityoptions.modelanimationsplaybackrate.md +13 -0
- package/docs/server.facecallback.md +1 -1
- package/docs/server.facecompletecallback.md +1 -1
- package/docs/server.faceoptions.md +1 -1
- package/docs/server.md +27 -27
- package/docs/server.movecallback.md +1 -1
- package/docs/server.movecompletecallback.md +1 -1
- package/docs/server.moveoptions.md +1 -1
- package/docs/server.playerentity.md +1 -1
- package/docs/server.playerentitycontroller._constructor_.md +49 -0
- package/docs/{server.defaultcharactercontroller.attach.md → server.playerentitycontroller.attach.md} +2 -2
- package/docs/server.playerentitycontroller.canjump.md +13 -0
- package/docs/server.playerentitycontroller.canrun.md +13 -0
- package/docs/server.playerentitycontroller.canwalk.md +13 -0
- package/docs/server.playerentitycontroller.isgrounded.md +13 -0
- package/docs/server.playerentitycontroller.isonplatform.md +13 -0
- package/docs/server.playerentitycontroller.jumpvelocity.md +13 -0
- package/docs/server.playerentitycontroller.md +331 -0
- package/docs/server.playerentitycontroller.platform.md +13 -0
- package/docs/server.playerentitycontroller.runvelocity.md +13 -0
- package/docs/server.playerentitycontroller.spawn.md +53 -0
- package/docs/{server.defaultcharactercontroller.tickwithplayerinput.md → server.playerentitycontroller.tickwithplayerinput.md} +3 -3
- package/docs/server.playerentitycontroller.walkvelocity.md +13 -0
- package/docs/server.playerentitycontrolleroptions.canjump.md +13 -0
- package/docs/server.playerentitycontrolleroptions.canrun.md +13 -0
- package/docs/server.playerentitycontrolleroptions.canwalk.md +13 -0
- package/docs/server.playerentitycontrolleroptions.jumpvelocity.md +13 -0
- package/docs/{server.defaultcharactercontrolleroptions.md → server.playerentitycontrolleroptions.md} +10 -10
- package/docs/server.playerentitycontrolleroptions.runvelocity.md +13 -0
- package/docs/server.playerentitycontrolleroptions.walkvelocity.md +13 -0
- package/docs/server.playerui.lockpointer.md +53 -0
- package/docs/server.playerui.md +14 -0
- package/docs/server.playeruieventpayload.lockpointer.lock.md +11 -0
- package/docs/server.playeruieventpayload.lockpointer.md +70 -0
- package/docs/server.playeruieventpayload.lockpointer.playerui.md +11 -0
- package/docs/server.playeruieventpayload.md +9 -0
- package/docs/server.playeruieventtype.md +14 -0
- package/docs/{server.simplecharactercontroller.face.md → server.simpleentitycontroller.face.md} +2 -2
- package/docs/{server.simplecharactercontroller.md → server.simpleentitycontroller.md} +11 -13
- package/docs/{server.simplecharactercontroller.move.md → server.simpleentitycontroller.move.md} +2 -2
- package/examples/block-entity/index.ts +7 -7
- package/examples/{character-controller/MyCharacterController.ts → entity-controller/MyEntityController.ts} +20 -20
- package/examples/entity-controller/README.md +4 -0
- package/examples/{character-controller → entity-controller}/index.ts +3 -3
- package/examples/{character-controller → entity-controller}/package.json +1 -1
- package/examples/payload-game/index.ts +15 -15
- package/package.json +1 -1
- package/server.api.json +4678 -4339
- package/server.d.ts +185 -154
- package/server.js +76 -76
- package/docs/server.basecharactercontroller.ondespawn.md +0 -13
- package/docs/server.basecharactercontroller.onspawn.md +0 -13
- package/docs/server.basecharactercontroller.ontick.md +0 -13
- package/docs/server.defaultcharactercontroller._constructor_.md +0 -49
- package/docs/server.defaultcharactercontroller.canjump.md +0 -13
- package/docs/server.defaultcharactercontroller.canrun.md +0 -13
- package/docs/server.defaultcharactercontroller.canwalk.md +0 -13
- package/docs/server.defaultcharactercontroller.isgrounded.md +0 -13
- package/docs/server.defaultcharactercontroller.isonplatform.md +0 -13
- package/docs/server.defaultcharactercontroller.jumpvelocity.md +0 -13
- package/docs/server.defaultcharactercontroller.md +0 -333
- package/docs/server.defaultcharactercontroller.platform.md +0 -13
- package/docs/server.defaultcharactercontroller.runvelocity.md +0 -13
- package/docs/server.defaultcharactercontroller.spawn.md +0 -53
- package/docs/server.defaultcharactercontroller.walkvelocity.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.canjump.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.canrun.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.canwalk.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.jumpvelocity.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.runvelocity.md +0 -13
- package/docs/server.defaultcharactercontrolleroptions.walkvelocity.md +0 -13
- package/docs/server.entity.charactercontroller.md +0 -13
- package/docs/server.entity.setcharactercontroller.md +0 -53
- package/docs/server.entityoptions.charactercontroller.md +0 -13
- package/examples/character-controller/README.md +0 -4
- /package/examples/{character-controller → entity-controller}/assets/map.json +0 -0
package/boilerplate/index.ts
CHANGED
@@ -70,7 +70,7 @@ startServer(world => {
|
|
70
70
|
* the game. From here, we create a basic player
|
71
71
|
* entity instance which automatically handles mapping
|
72
72
|
* their inputs to control their in-game entity and
|
73
|
-
* internally uses our
|
73
|
+
* internally uses our player entity controller.
|
74
74
|
*/
|
75
75
|
world.onPlayerJoin = player => {
|
76
76
|
const playerEntity = new PlayerEntity({
|
package/docs/{server.basecharactercontroller.attach.md → server.baseentitycontroller.attach.md}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [attach](./server.baseentitycontroller.attach.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.attach() method
|
6
6
|
|
7
|
-
Override this method to handle the attachment of an entity to your
|
7
|
+
Override this method to handle the attachment of an entity to your entity controller.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
package/docs/{server.basecharactercontroller.despawn.md → server.baseentitycontroller.despawn.md}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [despawn](./server.baseentitycontroller.despawn.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.despawn() method
|
6
6
|
|
7
|
-
Override this method to handle the despawn of an entity from your
|
7
|
+
Override this method to handle the despawn of an entity from your entity controller.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
package/docs/{server.basecharactercontroller.detach.md → server.baseentitycontroller.detach.md}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [detach](./server.baseentitycontroller.detach.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.detach() method
|
6
6
|
|
7
|
-
Override this method to handle the detachment of an entity from your
|
7
|
+
Override this method to handle the detachment of an entity from your entity controller.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
@@ -1,20 +1,20 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController class
|
6
6
|
|
7
|
-
A base class for
|
7
|
+
A base class for entity controller implementations.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
11
11
|
```typescript
|
12
|
-
export default abstract class
|
12
|
+
export default abstract class BaseEntityController
|
13
13
|
```
|
14
14
|
|
15
15
|
## Remarks
|
16
16
|
|
17
|
-
The
|
17
|
+
The BaseEntityController should be extended by a more specific entity controller that you or a plugin implements. Entity controllers are intended to be used as one controller instance per entity, but are flexible enough for edge cases such as if you want to create niche behavior of one controller for many entities that behave in unison.
|
18
18
|
|
19
19
|
## Properties
|
20
20
|
|
@@ -41,7 +41,7 @@ Description
|
|
41
41
|
</th></tr></thead>
|
42
42
|
<tbody><tr><td>
|
43
43
|
|
44
|
-
[onAttach?](./server.
|
44
|
+
[onAttach?](./server.baseentitycontroller.onattach.md)
|
45
45
|
|
46
46
|
|
47
47
|
</td><td>
|
@@ -54,13 +54,13 @@ Description
|
|
54
54
|
|
55
55
|
</td><td>
|
56
56
|
|
57
|
-
_(Optional)_ A function that is called when the controller is attached to an entity. Useful for implementing attach logic without writing a new
|
57
|
+
_(Optional)_ A function that is called when the controller is attached to an entity. Useful for implementing attach logic without writing a new entity controller class.
|
58
58
|
|
59
59
|
|
60
60
|
</td></tr>
|
61
61
|
<tr><td>
|
62
62
|
|
63
|
-
[onDespawn?](./server.
|
63
|
+
[onDespawn?](./server.baseentitycontroller.ondespawn.md)
|
64
64
|
|
65
65
|
|
66
66
|
</td><td>
|
@@ -73,13 +73,13 @@ _(Optional)_ A function that is called when the controller is attached to an ent
|
|
73
73
|
|
74
74
|
</td><td>
|
75
75
|
|
76
|
-
_(Optional)_ A function that is called when the controlled entity is despawned. Useful for implementing despawn logic without writing a new
|
76
|
+
_(Optional)_ A function that is called when the controlled entity is despawned. Useful for implementing despawn logic without writing a new entity controller class.
|
77
77
|
|
78
78
|
|
79
79
|
</td></tr>
|
80
80
|
<tr><td>
|
81
81
|
|
82
|
-
[onDetach?](./server.
|
82
|
+
[onDetach?](./server.baseentitycontroller.ondetach.md)
|
83
83
|
|
84
84
|
|
85
85
|
</td><td>
|
@@ -92,13 +92,13 @@ _(Optional)_ A function that is called when the controlled entity is despawned.
|
|
92
92
|
|
93
93
|
</td><td>
|
94
94
|
|
95
|
-
_(Optional)_ A function that is called when the controller is detached from an entity. Useful for implementing detach logic without writing a new
|
95
|
+
_(Optional)_ A function that is called when the controller is detached from an entity. Useful for implementing detach logic without writing a new entity controller class.
|
96
96
|
|
97
97
|
|
98
98
|
</td></tr>
|
99
99
|
<tr><td>
|
100
100
|
|
101
|
-
[onSpawn?](./server.
|
101
|
+
[onSpawn?](./server.baseentitycontroller.onspawn.md)
|
102
102
|
|
103
103
|
|
104
104
|
</td><td>
|
@@ -111,13 +111,13 @@ _(Optional)_ A function that is called when the controller is detached from an e
|
|
111
111
|
|
112
112
|
</td><td>
|
113
113
|
|
114
|
-
_(Optional)_ A function that is called when the controlled entity is spawned. Useful for implementing spawn logic without writing a new
|
114
|
+
_(Optional)_ A function that is called when the controlled entity is spawned. Useful for implementing spawn logic without writing a new entity controller class.
|
115
115
|
|
116
116
|
|
117
117
|
</td></tr>
|
118
118
|
<tr><td>
|
119
119
|
|
120
|
-
[onTick?](./server.
|
120
|
+
[onTick?](./server.baseentitycontroller.ontick.md)
|
121
121
|
|
122
122
|
|
123
123
|
</td><td>
|
@@ -130,13 +130,13 @@ _(Optional)_ A function that is called when the controlled entity is spawned. Us
|
|
130
130
|
|
131
131
|
</td><td>
|
132
132
|
|
133
|
-
_(Optional)_ A function that is called every tick. Useful for implementing tick logic without writing a new
|
133
|
+
_(Optional)_ A function that is called every tick. Useful for implementing tick logic without writing a new entity controller class.
|
134
134
|
|
135
135
|
|
136
136
|
</td></tr>
|
137
137
|
<tr><td>
|
138
138
|
|
139
|
-
[onTickWithPlayerInput?](./server.
|
139
|
+
[onTickWithPlayerInput?](./server.baseentitycontroller.ontickwithplayerinput.md)
|
140
140
|
|
141
141
|
|
142
142
|
</td><td>
|
@@ -149,7 +149,7 @@ _(Optional)_ A function that is called every tick. Useful for implementing tick
|
|
149
149
|
|
150
150
|
</td><td>
|
151
151
|
|
152
|
-
_(Optional)_ A function that is called every tick with player input by a PlayerEntity with this controller attached. Useful for implementing tick logic without writing a new
|
152
|
+
_(Optional)_ A function that is called every tick with player input by a PlayerEntity with this controller attached. Useful for implementing tick logic without writing a new entity controller class.
|
153
153
|
|
154
154
|
|
155
155
|
</td></tr>
|
@@ -175,7 +175,7 @@ Description
|
|
175
175
|
</th></tr></thead>
|
176
176
|
<tbody><tr><td>
|
177
177
|
|
178
|
-
[attach(entity)](./server.
|
178
|
+
[attach(entity)](./server.baseentitycontroller.attach.md)
|
179
179
|
|
180
180
|
|
181
181
|
</td><td>
|
@@ -183,13 +183,13 @@ Description
|
|
183
183
|
|
184
184
|
</td><td>
|
185
185
|
|
186
|
-
Override this method to handle the attachment of an entity to your
|
186
|
+
Override this method to handle the attachment of an entity to your entity controller.
|
187
187
|
|
188
188
|
|
189
189
|
</td></tr>
|
190
190
|
<tr><td>
|
191
191
|
|
192
|
-
[despawn(entity)](./server.
|
192
|
+
[despawn(entity)](./server.baseentitycontroller.despawn.md)
|
193
193
|
|
194
194
|
|
195
195
|
</td><td>
|
@@ -197,13 +197,13 @@ Override this method to handle the attachment of an entity to your character con
|
|
197
197
|
|
198
198
|
</td><td>
|
199
199
|
|
200
|
-
Override this method to handle the despawn of an entity from your
|
200
|
+
Override this method to handle the despawn of an entity from your entity controller.
|
201
201
|
|
202
202
|
|
203
203
|
</td></tr>
|
204
204
|
<tr><td>
|
205
205
|
|
206
|
-
[detach(entity)](./server.
|
206
|
+
[detach(entity)](./server.baseentitycontroller.detach.md)
|
207
207
|
|
208
208
|
|
209
209
|
</td><td>
|
@@ -211,13 +211,13 @@ Override this method to handle the despawn of an entity from your character cont
|
|
211
211
|
|
212
212
|
</td><td>
|
213
213
|
|
214
|
-
Override this method to handle the detachment of an entity from your
|
214
|
+
Override this method to handle the detachment of an entity from your entity controller.
|
215
215
|
|
216
216
|
|
217
217
|
</td></tr>
|
218
218
|
<tr><td>
|
219
219
|
|
220
|
-
[spawn(entity)](./server.
|
220
|
+
[spawn(entity)](./server.baseentitycontroller.spawn.md)
|
221
221
|
|
222
222
|
|
223
223
|
</td><td>
|
@@ -225,13 +225,13 @@ Override this method to handle the detachment of an entity from your character c
|
|
225
225
|
|
226
226
|
</td><td>
|
227
227
|
|
228
|
-
Override this method to handle the spawning of an entity to your
|
228
|
+
Override this method to handle the spawning of an entity to your entity controller.
|
229
229
|
|
230
230
|
|
231
231
|
</td></tr>
|
232
232
|
<tr><td>
|
233
233
|
|
234
|
-
[tick(entity, deltaTimeMs)](./server.
|
234
|
+
[tick(entity, deltaTimeMs)](./server.baseentitycontroller.tick.md)
|
235
235
|
|
236
236
|
|
237
237
|
</td><td>
|
@@ -239,13 +239,13 @@ Override this method to handle the spawning of an entity to your character contr
|
|
239
239
|
|
240
240
|
</td><td>
|
241
241
|
|
242
|
-
Override this method to handle entity movements based on your
|
242
|
+
Override this method to handle entity movements based on your entity controller.
|
243
243
|
|
244
244
|
|
245
245
|
</td></tr>
|
246
246
|
<tr><td>
|
247
247
|
|
248
|
-
[tickWithPlayerInput(entity, input, cameraOrientation, deltaTimeMs)](./server.
|
248
|
+
[tickWithPlayerInput(entity, input, cameraOrientation, deltaTimeMs)](./server.baseentitycontroller.tickwithplayerinput.md)
|
249
249
|
|
250
250
|
|
251
251
|
</td><td>
|
@@ -253,7 +253,7 @@ Override this method to handle entity movements based on your character controll
|
|
253
253
|
|
254
254
|
</td><td>
|
255
255
|
|
256
|
-
Override this method to handle entity movements based on player input for your
|
256
|
+
Override this method to handle entity movements based on player input for your entity controller. This is called every tick by a PlayerEntity with a entity controller.
|
257
257
|
|
258
258
|
|
259
259
|
</td></tr>
|
package/docs/{server.basecharactercontroller.onattach.md → server.baseentitycontroller.onattach.md}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [onAttach](./server.baseentitycontroller.onattach.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.onAttach property
|
6
6
|
|
7
|
-
A function that is called when the controller is attached to an entity. Useful for implementing attach logic without writing a new
|
7
|
+
A function that is called when the controller is attached to an entity. Useful for implementing attach logic without writing a new entity controller class.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [onDespawn](./server.baseentitycontroller.ondespawn.md)
|
4
|
+
|
5
|
+
## BaseEntityController.onDespawn property
|
6
|
+
|
7
|
+
A function that is called when the controlled entity is despawned. Useful for implementing despawn logic without writing a new entity controller class.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
onDespawn?: (entity: Entity) => void;
|
13
|
+
```
|
package/docs/{server.basecharactercontroller.ondetach.md → server.baseentitycontroller.ondetach.md}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [onDetach](./server.baseentitycontroller.ondetach.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.onDetach property
|
6
6
|
|
7
|
-
A function that is called when the controller is detached from an entity. Useful for implementing detach logic without writing a new
|
7
|
+
A function that is called when the controller is detached from an entity. Useful for implementing detach logic without writing a new entity controller class.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [onSpawn](./server.baseentitycontroller.onspawn.md)
|
4
|
+
|
5
|
+
## BaseEntityController.onSpawn property
|
6
|
+
|
7
|
+
A function that is called when the controlled entity is spawned. Useful for implementing spawn logic without writing a new entity controller class.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
onSpawn?: (entity: Entity) => void;
|
13
|
+
```
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [onTick](./server.baseentitycontroller.ontick.md)
|
4
|
+
|
5
|
+
## BaseEntityController.onTick property
|
6
|
+
|
7
|
+
A function that is called every tick. Useful for implementing tick logic without writing a new entity controller class.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
onTick?: (entity: Entity, deltaTimeMs: number) => void;
|
13
|
+
```
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [onTickWithPlayerInput](./server.baseentitycontroller.ontickwithplayerinput.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.onTickWithPlayerInput property
|
6
6
|
|
7
|
-
A function that is called every tick with player input by a PlayerEntity with this controller attached. Useful for implementing tick logic without writing a new
|
7
|
+
A function that is called every tick with player input by a PlayerEntity with this controller attached. Useful for implementing tick logic without writing a new entity controller class.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
package/docs/{server.basecharactercontroller.spawn.md → server.baseentitycontroller.spawn.md}
RENAMED
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [spawn](./server.baseentitycontroller.spawn.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.spawn() method
|
6
6
|
|
7
|
-
Override this method to handle the spawning of an entity to your
|
7
|
+
Override this method to handle the spawning of an entity to your entity controller.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [tick](./server.baseentitycontroller.tick.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.tick() method
|
6
6
|
|
7
|
-
Override this method to handle entity movements based on your
|
7
|
+
Override this method to handle entity movements based on your entity controller.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
2
|
|
3
|
-
[Home](./index.md) > [server](./server.md) > [
|
3
|
+
[Home](./index.md) > [server](./server.md) > [BaseEntityController](./server.baseentitycontroller.md) > [tickWithPlayerInput](./server.baseentitycontroller.tickwithplayerinput.md)
|
4
4
|
|
5
|
-
##
|
5
|
+
## BaseEntityController.tickWithPlayerInput() method
|
6
6
|
|
7
|
-
Override this method to handle entity movements based on player input for your
|
7
|
+
Override this method to handle entity movements based on player input for your entity controller. This is called every tick by a PlayerEntity with a entity controller.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Entity](./server.entity.md) > [controller](./server.entity.controller.md)
|
4
|
+
|
5
|
+
## Entity.controller property
|
6
|
+
|
7
|
+
The controller for the entity.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get controller(): BaseEntityController | undefined;
|
13
|
+
```
|
package/docs/server.entity.md
CHANGED
@@ -146,7 +146,7 @@ The URI or path to the texture to be used, if this is set, the entity is a block
|
|
146
146
|
</td></tr>
|
147
147
|
<tr><td>
|
148
148
|
|
149
|
-
[
|
149
|
+
[controller](./server.entity.controller.md)
|
150
150
|
|
151
151
|
|
152
152
|
</td><td>
|
@@ -156,12 +156,12 @@ The URI or path to the texture to be used, if this is set, the entity is a block
|
|
156
156
|
|
157
157
|
</td><td>
|
158
158
|
|
159
|
-
[
|
159
|
+
[BaseEntityController](./server.baseentitycontroller.md) \| undefined
|
160
160
|
|
161
161
|
|
162
162
|
</td><td>
|
163
163
|
|
164
|
-
The
|
164
|
+
The controller for the entity.
|
165
165
|
|
166
166
|
|
167
167
|
</td></tr>
|
@@ -248,6 +248,27 @@ boolean
|
|
248
248
|
Whether the entity is spawned.
|
249
249
|
|
250
250
|
|
251
|
+
</td></tr>
|
252
|
+
<tr><td>
|
253
|
+
|
254
|
+
[modelAnimationsPlaybackRate](./server.entity.modelanimationsplaybackrate.md)
|
255
|
+
|
256
|
+
|
257
|
+
</td><td>
|
258
|
+
|
259
|
+
`readonly`
|
260
|
+
|
261
|
+
|
262
|
+
</td><td>
|
263
|
+
|
264
|
+
number
|
265
|
+
|
266
|
+
|
267
|
+
</td><td>
|
268
|
+
|
269
|
+
The playback rate of the entity's model animations.
|
270
|
+
|
271
|
+
|
251
272
|
</td></tr>
|
252
273
|
<tr><td>
|
253
274
|
|
@@ -586,7 +607,21 @@ Despawns the entity from the world.
|
|
586
607
|
</td></tr>
|
587
608
|
<tr><td>
|
588
609
|
|
589
|
-
[
|
610
|
+
[setController(controller)](./server.entity.setcontroller.md)
|
611
|
+
|
612
|
+
|
613
|
+
</td><td>
|
614
|
+
|
615
|
+
|
616
|
+
</td><td>
|
617
|
+
|
618
|
+
Sets the controller for the entity.
|
619
|
+
|
620
|
+
|
621
|
+
</td></tr>
|
622
|
+
<tr><td>
|
623
|
+
|
624
|
+
[setModelAnimationsPlaybackRate(playbackRate)](./server.entity.setmodelanimationsplaybackrate.md)
|
590
625
|
|
591
626
|
|
592
627
|
</td><td>
|
@@ -594,7 +629,7 @@ Despawns the entity from the world.
|
|
594
629
|
|
595
630
|
</td><td>
|
596
631
|
|
597
|
-
Sets the
|
632
|
+
Sets the playback rate of all animations on the entity's model.
|
598
633
|
|
599
634
|
|
600
635
|
</td></tr>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Entity](./server.entity.md) > [modelAnimationsPlaybackRate](./server.entity.modelanimationsplaybackrate.md)
|
4
|
+
|
5
|
+
## Entity.modelAnimationsPlaybackRate property
|
6
|
+
|
7
|
+
The playback rate of the entity's model animations.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get modelAnimationsPlaybackRate(): number;
|
13
|
+
```
|
@@ -0,0 +1,53 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Entity](./server.entity.md) > [setController](./server.entity.setcontroller.md)
|
4
|
+
|
5
|
+
## Entity.setController() method
|
6
|
+
|
7
|
+
Sets the controller for the entity.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
setController(controller: BaseEntityController | undefined): void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Parameter
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Type
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Description
|
30
|
+
|
31
|
+
|
32
|
+
</th></tr></thead>
|
33
|
+
<tbody><tr><td>
|
34
|
+
|
35
|
+
controller
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[BaseEntityController](./server.baseentitycontroller.md) \| undefined
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The controller to set.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|
@@ -0,0 +1,57 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Entity](./server.entity.md) > [setModelAnimationsPlaybackRate](./server.entity.setmodelanimationsplaybackrate.md)
|
4
|
+
|
5
|
+
## Entity.setModelAnimationsPlaybackRate() method
|
6
|
+
|
7
|
+
Sets the playback rate of all animations on the entity's model.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
setModelAnimationsPlaybackRate(playbackRate: number): void;
|
13
|
+
```
|
14
|
+
|
15
|
+
## Parameters
|
16
|
+
|
17
|
+
<table><thead><tr><th>
|
18
|
+
|
19
|
+
Parameter
|
20
|
+
|
21
|
+
|
22
|
+
</th><th>
|
23
|
+
|
24
|
+
Type
|
25
|
+
|
26
|
+
|
27
|
+
</th><th>
|
28
|
+
|
29
|
+
Description
|
30
|
+
|
31
|
+
|
32
|
+
</th></tr></thead>
|
33
|
+
<tbody><tr><td>
|
34
|
+
|
35
|
+
playbackRate
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
number
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The playback rate of the entity's model animations.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|
54
|
+
## Remarks
|
55
|
+
|
56
|
+
Defaults to 1. A positive value will play the animation forward, a negative value will play the animation in reverse. Any value may be used. You can make animations play faster by using larger values.
|
57
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [EntityEventPayload](./server.entityeventpayload.md) > [SetModelAnimationsPlaybackRate](./server.entityeventpayload.setmodelanimationsplaybackrate.md) > [entity](./server.entityeventpayload.setmodelanimationsplaybackrate.entity.md)
|
4
|
+
|
5
|
+
## EntityEventPayload.SetModelAnimationsPlaybackRate.entity property
|
6
|
+
|
7
|
+
**Signature:**
|
8
|
+
|
9
|
+
```typescript
|
10
|
+
entity: Entity;
|
11
|
+
```
|