hytopia 0.1.33 → 0.1.36
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/README.md +3 -1
- package/docs/server.audio.md +1 -1
- package/docs/server.blocktype.md +1 -1
- package/docs/server.blocktyperegistry.md +2 -2
- package/docs/server.blocktyperegistry.registerblocktype.md +2 -18
- package/docs/server.chunk.getblock.md +55 -0
- package/docs/server.chunk.hasblock.md +55 -0
- package/docs/server.chunk.md +28 -0
- package/docs/server.chunklattice.getblock.md +55 -0
- package/docs/server.chunklattice.hasblock.md +55 -0
- package/docs/server.chunklattice.md +29 -1
- package/docs/server.chunklattice.setblock.md +2 -2
- package/docs/server.collider.md +21 -0
- package/docs/server.collider.shape.md +13 -0
- package/docs/server.default_block_entity_rigid_body_options.md +13 -0
- package/docs/server.default_entity_rigid_body_options.md +1 -1
- package/docs/server.entity.blockhalfextents.md +13 -0
- package/docs/server.entity.blocktextureuri.md +13 -0
- package/docs/server.entity.md +98 -0
- package/docs/server.entity.settintcolor.md +53 -0
- package/docs/server.entity.tag.md +13 -0
- package/docs/server.entity.tintcolor.md +13 -0
- package/docs/server.entityeventpayload.md +9 -0
- package/docs/server.entityeventpayload.settintcolor.entity.md +11 -0
- package/docs/server.entityeventpayload.settintcolor.md +70 -0
- package/docs/server.entityeventpayload.settintcolor.tintcolor.md +11 -0
- package/docs/server.entityeventtype.md +15 -1
- package/docs/server.entitymanager.getentitiesbytag.md +55 -0
- package/docs/server.entitymanager.getentitiesbytagsubstring.md +55 -0
- package/docs/server.entitymanager.md +28 -0
- package/docs/server.entityoptions.blockhalfextents.md +13 -0
- package/docs/server.entityoptions.blocktextureuri.md +13 -0
- package/docs/server.entityoptions.md +76 -0
- package/docs/server.entityoptions.tag.md +13 -0
- package/docs/server.entityoptions.tintcolor.md +13 -0
- package/docs/server.gameserver.md +1 -1
- package/docs/server.hytopia.audio.md +1 -1
- package/docs/server.hytopia.blocktype.md +1 -1
- package/docs/server.hytopia.blocktyperegistry.md +2 -2
- package/docs/server.hytopia.blocktyperegistry.registerblocktype.md +2 -18
- package/docs/server.hytopia.chunk.getblock.md +55 -0
- package/docs/server.hytopia.chunk.hasblock.md +55 -0
- package/docs/server.hytopia.chunk.md +28 -0
- package/docs/server.hytopia.chunklattice.getblock.md +55 -0
- package/docs/server.hytopia.chunklattice.hasblock.md +55 -0
- package/docs/server.hytopia.chunklattice.md +29 -1
- package/docs/server.hytopia.chunklattice.setblock.md +2 -2
- package/docs/server.hytopia.collider.md +21 -0
- package/docs/server.hytopia.collider.shape.md +13 -0
- package/docs/server.hytopia.default_block_entity_rigid_body_options.md +13 -0
- package/docs/server.hytopia.default_entity_rigid_body_options.md +1 -1
- package/docs/server.hytopia.entity.blockhalfextents.md +13 -0
- package/docs/server.hytopia.entity.blocktextureuri.md +13 -0
- package/docs/server.hytopia.entity.md +98 -0
- package/docs/server.hytopia.entity.settintcolor.md +53 -0
- package/docs/server.hytopia.entity.tag.md +13 -0
- package/docs/server.hytopia.entity.tintcolor.md +13 -0
- package/docs/server.hytopia.entityeventpayload.md +9 -0
- package/docs/server.hytopia.entityeventpayload.settintcolor.entity.md +11 -0
- package/docs/server.hytopia.entityeventpayload.settintcolor.md +70 -0
- package/docs/server.hytopia.entityeventpayload.settintcolor.tintcolor.md +11 -0
- package/docs/server.hytopia.entityeventtype.md +15 -1
- package/docs/server.hytopia.entitymanager.getentitiesbytag.md +55 -0
- package/docs/server.hytopia.entitymanager.getentitiesbytagsubstring.md +55 -0
- package/docs/server.hytopia.entitymanager.md +28 -0
- package/docs/server.hytopia.entityoptions.blockhalfextents.md +13 -0
- package/docs/server.hytopia.entityoptions.blocktextureuri.md +13 -0
- package/docs/server.hytopia.entityoptions.md +76 -0
- package/docs/server.hytopia.entityoptions.tag.md +13 -0
- package/docs/server.hytopia.entityoptions.tintcolor.md +13 -0
- package/docs/server.hytopia.gameserver.md +1 -1
- package/docs/server.hytopia.md +23 -12
- package/docs/server.hytopia.rgbcolor.b.md +11 -0
- package/docs/server.hytopia.rgbcolor.g.md +11 -0
- package/docs/server.hytopia.rgbcolor.md +89 -0
- package/docs/server.hytopia.rgbcolor.r.md +11 -0
- package/docs/server.hytopia.rigidbody.md +0 -35
- package/docs/server.hytopia.rigidbodyoptions.md +0 -19
- package/docs/server.hytopia.simulation.md +14 -0
- package/docs/{server.hytopia.rigidbody.settag.md → server.hytopia.simulation.setgravity.md} +7 -7
- package/docs/server.hytopia.worldmap.blocktypes.md +1 -5
- package/docs/server.hytopia.worldmap.md +1 -1
- package/docs/server.md +23 -12
- package/docs/server.rgbcolor.b.md +11 -0
- package/docs/server.rgbcolor.g.md +11 -0
- package/docs/server.rgbcolor.md +89 -0
- package/docs/server.rgbcolor.r.md +11 -0
- package/docs/server.rigidbody.md +0 -35
- package/docs/server.rigidbodyoptions.md +0 -19
- package/docs/server.simulation.md +14 -0
- package/docs/server.simulation.setgravity.md +53 -0
- package/docs/server.worldmap.blocktypes.md +1 -5
- package/docs/server.worldmap.md +1 -1
- package/examples/block-entity/README.md +15 -0
- package/examples/block-entity/assets/audio/music/cave.mp3 +0 -0
- package/examples/block-entity/assets/audio/music/desert.mp3 +0 -0
- package/examples/block-entity/assets/audio/music/end.mp3 +0 -0
- package/examples/block-entity/assets/audio/music/jungle.mp3 +0 -0
- package/examples/block-entity/assets/audio/music/nether.mp3 +0 -0
- package/examples/block-entity/assets/audio/music/night.mp3 +0 -0
- package/examples/block-entity/assets/audio/music/night2.mp3 +0 -0
- package/examples/block-entity/assets/audio/music/overworld.mp3 +0 -0
- package/examples/block-entity/assets/audio/music/snow.mp3 +0 -0
- package/examples/block-entity/assets/audio/sfx/damage.wav +0 -0
- package/examples/block-entity/assets/audio/sfx/step.wav +0 -0
- package/examples/block-entity/assets/certs/README.md +10 -0
- package/examples/block-entity/assets/certs/localhost.crt +20 -0
- package/examples/block-entity/assets/certs/localhost.key +27 -0
- package/examples/block-entity/assets/cubemaps/skybox/+x.png +0 -0
- package/examples/block-entity/assets/cubemaps/skybox/+y.png +0 -0
- package/examples/block-entity/assets/cubemaps/skybox/+z.png +0 -0
- package/examples/block-entity/assets/cubemaps/skybox/-x.png +0 -0
- package/examples/block-entity/assets/cubemaps/skybox/-y.png +0 -0
- package/examples/block-entity/assets/cubemaps/skybox/-z.png +0 -0
- package/examples/block-entity/assets/map.json +2623 -0
- package/examples/block-entity/assets/models/bat.gltf +1 -0
- package/examples/block-entity/assets/models/chicken.gltf +1 -0
- package/examples/block-entity/assets/models/cow.gltf +1 -0
- package/examples/block-entity/assets/models/donkey.gltf +1 -0
- package/examples/block-entity/assets/models/horse.gltf +1 -0
- package/examples/block-entity/assets/models/mindflayer.gltf +1 -0
- package/examples/block-entity/assets/models/pig.gltf +1 -0
- package/examples/block-entity/assets/models/player.gltf +1 -0
- package/examples/block-entity/assets/models/rabbit.gltf +1 -0
- package/examples/block-entity/assets/models/sheep.gltf +1 -0
- package/examples/block-entity/assets/models/skeleton.gltf +1 -0
- package/examples/block-entity/assets/models/spider.gltf +1 -0
- package/examples/block-entity/assets/models/squid.gltf +1 -0
- package/examples/block-entity/assets/models/stalker.gltf +1 -0
- package/examples/block-entity/assets/models/zombie.gltf +1 -0
- package/examples/block-entity/assets/textures/bricks.png +0 -0
- package/examples/block-entity/assets/textures/clay.png +0 -0
- package/examples/block-entity/assets/textures/cobblestone.png +0 -0
- package/examples/block-entity/assets/textures/diamond_ore.png +0 -0
- package/examples/block-entity/assets/textures/dirt.png +0 -0
- package/examples/block-entity/assets/textures/dragons_stone.png +0 -0
- package/examples/block-entity/assets/textures/emerald_ore.png +0 -0
- package/examples/block-entity/assets/textures/glass.png +0 -0
- package/examples/block-entity/assets/textures/gold_ore.png +0 -0
- package/examples/block-entity/assets/textures/grass/+x.png +0 -0
- package/examples/block-entity/assets/textures/grass/+y.png +0 -0
- package/examples/block-entity/assets/textures/grass/+z.png +0 -0
- package/examples/block-entity/assets/textures/grass/-x.png +0 -0
- package/examples/block-entity/assets/textures/grass/-y.png +0 -0
- package/examples/block-entity/assets/textures/grass/-z.png +0 -0
- package/examples/block-entity/assets/textures/gravel.png +0 -0
- package/examples/block-entity/assets/textures/ice.png +0 -0
- package/examples/block-entity/assets/textures/infected_shadowrock.png +0 -0
- package/examples/block-entity/assets/textures/iron_ore.png +0 -0
- package/examples/block-entity/assets/textures/lava.png +0 -0
- package/examples/block-entity/assets/textures/log_side.png +0 -0
- package/examples/block-entity/assets/textures/log_top.png +0 -0
- package/examples/block-entity/assets/textures/mossy_coblestone.png +0 -0
- package/examples/block-entity/assets/textures/nuit.png +0 -0
- package/examples/block-entity/assets/textures/oak_leaves.png +0 -0
- package/examples/block-entity/assets/textures/oak_planks.png +0 -0
- package/examples/block-entity/assets/textures/sand.png +0 -0
- package/examples/block-entity/assets/textures/sandstone.png +0 -0
- package/examples/block-entity/assets/textures/shadowrock.png +0 -0
- package/examples/block-entity/assets/textures/snow.png +0 -0
- package/examples/block-entity/assets/textures/stone.png +0 -0
- package/examples/block-entity/assets/textures/stone_bricks.png +0 -0
- package/examples/block-entity/assets/textures/void_grass/+x.png +0 -0
- package/examples/block-entity/assets/textures/void_grass/+y.png +0 -0
- package/examples/block-entity/assets/textures/void_grass/+z.png +0 -0
- package/examples/block-entity/assets/textures/void_grass/-x.png +0 -0
- package/examples/block-entity/assets/textures/void_grass/-y.png +0 -0
- package/examples/block-entity/assets/textures/void_grass/-z.png +0 -0
- package/examples/block-entity/assets/textures/void_sand.png +0 -0
- package/examples/block-entity/assets/textures/water.png +0 -0
- package/examples/block-entity/index.ts +173 -0
- package/examples/block-entity/package.json +14 -0
- package/examples/payload-game/index.ts +7 -0
- package/package.json +1 -1
- package/readme/assets/banner-2.jpeg +0 -0
- package/server.api.json +1910 -414
- package/server.d.ts +98 -58
- package/server.js +80 -80
- package/docs/server.hytopia.rigidbody.tag.md +0 -13
- package/docs/server.hytopia.rigidbodyoptions.tag.md +0 -13
- package/docs/server.hytopia.webserver.md +0 -21
- package/docs/server.rigidbody.settag.md +0 -53
- package/docs/server.rigidbody.tag.md +0 -13
- package/docs/server.rigidbodyoptions.tag.md +0 -13
- package/docs/server.webserver.md +0 -21
- package/examples/README.md +0 -22
package/README.md
CHANGED
@@ -5,12 +5,14 @@
|
|
5
5
|
|
6
6
|
## What is HYTOPIA?
|
7
7
|
|
8
|
-

|
9
9
|
|
10
10
|
HYTOPIA is a modern games platform inspired by Minecraft, Roblox, and Rec Room.
|
11
11
|
|
12
12
|
HYTOPIA allows you to create your own highly-sharable, immersive, massively multiplayer games in a voxel-like style by writing TypeScript or JavaScript. All playable in a web browser on any device!
|
13
13
|
|
14
|
+
No need to deal with hosting or complex server infrastructure either, simply upload your game to HYTOPIA and we'll handle the scaling, server costs, and more!
|
15
|
+
|
14
16
|
## What is this SDK?
|
15
17
|
|
16
18
|
*Note: This SDK is currently in alpha development. Expect breaking changes with new version releases.*
|
package/docs/server.audio.md
CHANGED
@@ -22,7 +22,7 @@ Audio instances are created directly as instances. They support a variety of con
|
|
22
22
|
|
23
23
|
```typescript
|
24
24
|
(new Audio({
|
25
|
-
uri: 'assets/music/song.mp3
|
25
|
+
uri: 'music/song.mp3', // relative to the server's assets directory in the project root, resolves to assets/music/song.mp3
|
26
26
|
loop: true,
|
27
27
|
volume: 0.5,
|
28
28
|
})).play(world);
|
package/docs/server.blocktype.md
CHANGED
@@ -24,7 +24,7 @@ Block types are created directly as instances. They support a variety of configu
|
|
24
24
|
const stoneBlockTypeId = 10;
|
25
25
|
world.blockTypeRegistry.registerBlockType(stoneBlockTypeId, new BlockType({
|
26
26
|
id: stoneBlockTypeId,
|
27
|
-
textureUri: '
|
27
|
+
textureUri: 'textures/stone.png',
|
28
28
|
name: 'Stone',
|
29
29
|
}));
|
30
30
|
|
@@ -25,7 +25,7 @@ The constructor for this class is marked as internal. Third-party code should no
|
|
25
25
|
```typescript
|
26
26
|
world.blockTypeRegistry.registerGenericBlockType({
|
27
27
|
id: 15,
|
28
|
-
textureUri: '
|
28
|
+
textureUri: 'textures/dirt.png',
|
29
29
|
name: 'Dirt',
|
30
30
|
});
|
31
31
|
```
|
@@ -124,7 +124,7 @@ Get a registered block type by its id.
|
|
124
124
|
</td></tr>
|
125
125
|
<tr><td>
|
126
126
|
|
127
|
-
[registerBlockType(
|
127
|
+
[registerBlockType(blockType)](./server.blocktyperegistry.registerblocktype.md)
|
128
128
|
|
129
129
|
|
130
130
|
</td><td>
|
@@ -9,7 +9,7 @@ Register a block type.
|
|
9
9
|
**Signature:**
|
10
10
|
|
11
11
|
```typescript
|
12
|
-
registerBlockType(
|
12
|
+
registerBlockType(blockType: BlockType): void;
|
13
13
|
```
|
14
14
|
|
15
15
|
## Parameters
|
@@ -32,23 +32,7 @@ Description
|
|
32
32
|
</th></tr></thead>
|
33
33
|
<tbody><tr><td>
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
</td><td>
|
39
|
-
|
40
|
-
number
|
41
|
-
|
42
|
-
|
43
|
-
</td><td>
|
44
|
-
|
45
|
-
The id of the block type to register.
|
46
|
-
|
47
|
-
|
48
|
-
</td></tr>
|
49
|
-
<tr><td>
|
50
|
-
|
51
|
-
blockTypeReference
|
35
|
+
blockType
|
52
36
|
|
53
37
|
|
54
38
|
</td><td>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Chunk](./server.chunk.md) > [getBlock](./server.chunk.getblock.md)
|
4
|
+
|
5
|
+
## Chunk.getBlock() method
|
6
|
+
|
7
|
+
Get the block type id at a specific local coordinate.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
getBlock(localCoordinate: Vector3): number;
|
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
|
+
localCoordinate
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Vector3](./server.vector3.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The local coordinate of the block to get.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
number
|
53
|
+
|
54
|
+
The block type id.
|
55
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [Chunk](./server.chunk.md) > [hasBlock](./server.chunk.hasblock.md)
|
4
|
+
|
5
|
+
## Chunk.hasBlock() method
|
6
|
+
|
7
|
+
Check if a block exists at a specific local coordinate.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
hasBlock(localCoordinate: Vector3): boolean;
|
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
|
+
localCoordinate
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Vector3](./server.vector3.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The local coordinate of the block to check.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
boolean
|
53
|
+
|
54
|
+
Whether a block exists.
|
55
|
+
|
package/docs/server.chunk.md
CHANGED
@@ -244,6 +244,20 @@ Convert a block index to a local coordinate.
|
|
244
244
|
Despawn the chunk from the world.
|
245
245
|
|
246
246
|
|
247
|
+
</td></tr>
|
248
|
+
<tr><td>
|
249
|
+
|
250
|
+
[getBlock(localCoordinate)](./server.chunk.getblock.md)
|
251
|
+
|
252
|
+
|
253
|
+
</td><td>
|
254
|
+
|
255
|
+
|
256
|
+
</td><td>
|
257
|
+
|
258
|
+
Get the block type id at a specific local coordinate.
|
259
|
+
|
260
|
+
|
247
261
|
</td></tr>
|
248
262
|
<tr><td>
|
249
263
|
|
@@ -276,6 +290,20 @@ Convert a global coordinate to a local coordinate.
|
|
276
290
|
Convert a global coordinate to an origin coordinate.
|
277
291
|
|
278
292
|
|
293
|
+
</td></tr>
|
294
|
+
<tr><td>
|
295
|
+
|
296
|
+
[hasBlock(localCoordinate)](./server.chunk.hasblock.md)
|
297
|
+
|
298
|
+
|
299
|
+
</td><td>
|
300
|
+
|
301
|
+
|
302
|
+
</td><td>
|
303
|
+
|
304
|
+
Check if a block exists at a specific local coordinate.
|
305
|
+
|
306
|
+
|
279
307
|
</td></tr>
|
280
308
|
<tr><td>
|
281
309
|
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [ChunkLattice](./server.chunklattice.md) > [getBlock](./server.chunklattice.getblock.md)
|
4
|
+
|
5
|
+
## ChunkLattice.getBlock() method
|
6
|
+
|
7
|
+
Get the block type id at a specific global coordinate.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
getBlock(globalCoordinate: Vector3): number;
|
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
|
+
globalCoordinate
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Vector3](./server.vector3.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The global coordinate of the block to get.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
number
|
53
|
+
|
54
|
+
The block type id, 0 if no block is set.
|
55
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
2
|
+
|
3
|
+
[Home](./index.md) > [server](./server.md) > [ChunkLattice](./server.chunklattice.md) > [hasBlock](./server.chunklattice.hasblock.md)
|
4
|
+
|
5
|
+
## ChunkLattice.hasBlock() method
|
6
|
+
|
7
|
+
Check if a block exists at a specific global coordinate.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
hasBlock(globalCoordinate: Vector3): boolean;
|
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
|
+
globalCoordinate
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[Vector3](./server.vector3.md)
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The global coordinate of the block to check.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
boolean
|
53
|
+
|
54
|
+
Whether a block exists.
|
55
|
+
|
@@ -81,6 +81,20 @@ Description
|
|
81
81
|
Get all chunks in the lattice.
|
82
82
|
|
83
83
|
|
84
|
+
</td></tr>
|
85
|
+
<tr><td>
|
86
|
+
|
87
|
+
[getBlock(globalCoordinate)](./server.chunklattice.getblock.md)
|
88
|
+
|
89
|
+
|
90
|
+
</td><td>
|
91
|
+
|
92
|
+
|
93
|
+
</td><td>
|
94
|
+
|
95
|
+
Get the block type id at a specific global coordinate.
|
96
|
+
|
97
|
+
|
84
98
|
</td></tr>
|
85
99
|
<tr><td>
|
86
100
|
|
@@ -95,6 +109,20 @@ Get all chunks in the lattice.
|
|
95
109
|
Get a chunk by its origin coordinate.
|
96
110
|
|
97
111
|
|
112
|
+
</td></tr>
|
113
|
+
<tr><td>
|
114
|
+
|
115
|
+
[hasBlock(globalCoordinate)](./server.chunklattice.hasblock.md)
|
116
|
+
|
117
|
+
|
118
|
+
</td><td>
|
119
|
+
|
120
|
+
|
121
|
+
</td><td>
|
122
|
+
|
123
|
+
Check if a block exists at a specific global coordinate.
|
124
|
+
|
125
|
+
|
98
126
|
</td></tr>
|
99
127
|
<tr><td>
|
100
128
|
|
@@ -120,7 +148,7 @@ Check if a chunk exists by its origin coordinate.
|
|
120
148
|
|
121
149
|
</td><td>
|
122
150
|
|
123
|
-
Set the block at a global coordinate by block type id, automatically creating a chunk if it doesn't exist.
|
151
|
+
Set the block at a global coordinate by block type id, automatically creating a chunk if it doesn't exist. Use block type id 0 for air.
|
124
152
|
|
125
153
|
|
126
154
|
</td></tr>
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
## ChunkLattice.setBlock() method
|
6
6
|
|
7
|
-
Set the block at a global coordinate by block type id, automatically creating a chunk if it doesn't exist.
|
7
|
+
Set the block at a global coordinate by block type id, automatically creating a chunk if it doesn't exist. Use block type id 0 for air.
|
8
8
|
|
9
9
|
**Signature:**
|
10
10
|
|
@@ -58,7 +58,7 @@ number
|
|
58
58
|
|
59
59
|
</td><td>
|
60
60
|
|
61
|
-
The block type id to set.
|
61
|
+
The block type id to set. Use 0 to remove the block and replace with air.
|
62
62
|
|
63
63
|
|
64
64
|
</td></tr>
|
package/docs/server.collider.md
CHANGED
@@ -198,6 +198,27 @@ RAPIER.Collider \| undefined
|
|
198
198
|
The raw collider object from the Rapier physics engine.
|
199
199
|
|
200
200
|
|
201
|
+
</td></tr>
|
202
|
+
<tr><td>
|
203
|
+
|
204
|
+
[shape](./server.collider.shape.md)
|
205
|
+
|
206
|
+
|
207
|
+
</td><td>
|
208
|
+
|
209
|
+
`readonly`
|
210
|
+
|
211
|
+
|
212
|
+
</td><td>
|
213
|
+
|
214
|
+
[ColliderShape](./server.collidershape.md)
|
215
|
+
|
216
|
+
|
217
|
+
</td><td>
|
218
|
+
|
219
|
+
The shape of the collider.
|
220
|
+
|
221
|
+
|
201
222
|
</td></tr>
|
202
223
|
<tr><td>
|
203
224
|
|
@@ -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) > [Collider](./server.collider.md) > [shape](./server.collider.shape.md)
|
4
|
+
|
5
|
+
## Collider.shape property
|
6
|
+
|
7
|
+
The shape of the collider.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get shape(): ColliderShape;
|
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) > [DEFAULT\_BLOCK\_ENTITY\_RIGID\_BODY\_OPTIONS](./server.default_block_entity_rigid_body_options.md)
|
4
|
+
|
5
|
+
## DEFAULT\_BLOCK\_ENTITY\_RIGID\_BODY\_OPTIONS variable
|
6
|
+
|
7
|
+
The default rigid body options for a block entity when EntityOptions.rigidBodyOptions is not provided.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
DEFAULT_BLOCK_ENTITY_RIGID_BODY_OPTIONS: RigidBodyOptions
|
13
|
+
```
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
## DEFAULT\_ENTITY\_RIGID\_BODY\_OPTIONS variable
|
6
6
|
|
7
|
-
The default rigid body options when EntityOptions.rigidBodyOptions is not provided.
|
7
|
+
The default rigid body options for a model entity when EntityOptions.rigidBodyOptions is not provided.
|
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) > [blockHalfExtents](./server.entity.blockhalfextents.md)
|
4
|
+
|
5
|
+
## Entity.blockHalfExtents property
|
6
|
+
|
7
|
+
The half extends of the visual size of the block entity when blockTextureUri is set.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get blockHalfExtents(): Vector3 | undefined;
|
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) > [Entity](./server.entity.md) > [blockTextureUri](./server.entity.blocktextureuri.md)
|
4
|
+
|
5
|
+
## Entity.blockTextureUri property
|
6
|
+
|
7
|
+
The URI or path to the texture to be used, if this is set, the entity is a block entity.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
get blockTextureUri(): string | undefined;
|
13
|
+
```
|
package/docs/server.entity.md
CHANGED
@@ -104,6 +104,48 @@ Description
|
|
104
104
|
</th></tr></thead>
|
105
105
|
<tbody><tr><td>
|
106
106
|
|
107
|
+
[blockHalfExtents](./server.entity.blockhalfextents.md)
|
108
|
+
|
109
|
+
|
110
|
+
</td><td>
|
111
|
+
|
112
|
+
`readonly`
|
113
|
+
|
114
|
+
|
115
|
+
</td><td>
|
116
|
+
|
117
|
+
[Vector3](./server.vector3.md) \| undefined
|
118
|
+
|
119
|
+
|
120
|
+
</td><td>
|
121
|
+
|
122
|
+
The half extends of the visual size of the block entity when blockTextureUri is set.
|
123
|
+
|
124
|
+
|
125
|
+
</td></tr>
|
126
|
+
<tr><td>
|
127
|
+
|
128
|
+
[blockTextureUri](./server.entity.blocktextureuri.md)
|
129
|
+
|
130
|
+
|
131
|
+
</td><td>
|
132
|
+
|
133
|
+
`readonly`
|
134
|
+
|
135
|
+
|
136
|
+
</td><td>
|
137
|
+
|
138
|
+
string \| undefined
|
139
|
+
|
140
|
+
|
141
|
+
</td><td>
|
142
|
+
|
143
|
+
The URI or path to the texture to be used, if this is set, the entity is a block entity.
|
144
|
+
|
145
|
+
|
146
|
+
</td></tr>
|
147
|
+
<tr><td>
|
148
|
+
|
107
149
|
[characterController](./server.entity.charactercontroller.md)
|
108
150
|
|
109
151
|
|
@@ -400,6 +442,48 @@ _(Optional)_ A function that is called when the entity is spawned.
|
|
400
442
|
_(Optional)_ A function that is called every tick.
|
401
443
|
|
402
444
|
|
445
|
+
</td></tr>
|
446
|
+
<tr><td>
|
447
|
+
|
448
|
+
[tag](./server.entity.tag.md)
|
449
|
+
|
450
|
+
|
451
|
+
</td><td>
|
452
|
+
|
453
|
+
`readonly`
|
454
|
+
|
455
|
+
|
456
|
+
</td><td>
|
457
|
+
|
458
|
+
string \| undefined
|
459
|
+
|
460
|
+
|
461
|
+
</td><td>
|
462
|
+
|
463
|
+
An arbitrary identifier tag of the entity. Useful for your own logic.
|
464
|
+
|
465
|
+
|
466
|
+
</td></tr>
|
467
|
+
<tr><td>
|
468
|
+
|
469
|
+
[tintColor](./server.entity.tintcolor.md)
|
470
|
+
|
471
|
+
|
472
|
+
</td><td>
|
473
|
+
|
474
|
+
`readonly`
|
475
|
+
|
476
|
+
|
477
|
+
</td><td>
|
478
|
+
|
479
|
+
[RgbColor](./server.rgbcolor.md) \| undefined
|
480
|
+
|
481
|
+
|
482
|
+
</td><td>
|
483
|
+
|
484
|
+
The tint color of the entity.
|
485
|
+
|
486
|
+
|
403
487
|
</td></tr>
|
404
488
|
<tr><td>
|
405
489
|
|
@@ -469,6 +553,20 @@ Despawns the entity from the world.
|
|
469
553
|
Sets the character controller for the entity.
|
470
554
|
|
471
555
|
|
556
|
+
</td></tr>
|
557
|
+
<tr><td>
|
558
|
+
|
559
|
+
[setTintColor(tintColor)](./server.entity.settintcolor.md)
|
560
|
+
|
561
|
+
|
562
|
+
</td><td>
|
563
|
+
|
564
|
+
|
565
|
+
</td><td>
|
566
|
+
|
567
|
+
Sets the tint color of the entity.
|
568
|
+
|
569
|
+
|
472
570
|
</td></tr>
|
473
571
|
<tr><td>
|
474
572
|
|
@@ -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) > [setTintColor](./server.entity.settintcolor.md)
|
4
|
+
|
5
|
+
## Entity.setTintColor() method
|
6
|
+
|
7
|
+
Sets the tint color of the entity.
|
8
|
+
|
9
|
+
**Signature:**
|
10
|
+
|
11
|
+
```typescript
|
12
|
+
setTintColor(tintColor: RgbColor | 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
|
+
tintColor
|
36
|
+
|
37
|
+
|
38
|
+
</td><td>
|
39
|
+
|
40
|
+
[RgbColor](./server.rgbcolor.md) \| undefined
|
41
|
+
|
42
|
+
|
43
|
+
</td><td>
|
44
|
+
|
45
|
+
The tint color of the entity.
|
46
|
+
|
47
|
+
|
48
|
+
</td></tr>
|
49
|
+
</tbody></table>
|
50
|
+
**Returns:**
|
51
|
+
|
52
|
+
void
|
53
|
+
|