|
7 | 7 | * `stateString` is the string representation of a block
|
8 | 8 | * `biomeId` is the biome numerical id
|
9 | 9 |
|
10 |
| -#### Block(type,biomeId,metadata) |
| 10 | +#### Block.fromProperties(typeId, properties, biomeId) |
| 11 | + |
| 12 | +* `typeId` - The block type ID (numerical or string) |
| 13 | +* `properties` - A dictionary of block state properties to build from |
| 14 | +* `biomeId` - The biome numerical id |
| 15 | + |
| 16 | +#### Block(type, biomeId, metadata, stateId = null) |
11 | 17 |
|
12 | 18 | Constructor of a block
|
13 | 19 | * `type` is the block numerical id
|
14 | 20 | * `biomeId` is the biome numerical id
|
15 | 21 | * `metadata` is the metadata numerical value
|
| 22 | +* `stateId` (optional) represents the state of the block (same as metadata in newer versions) |
16 | 23 |
|
17 | 24 | #### block.canHarvest(heldItemType)
|
18 | 25 |
|
@@ -45,15 +52,19 @@ Numerical id.
|
45 | 52 |
|
46 | 53 | #### block.name
|
47 | 54 |
|
| 55 | +Minecraft ID (string) of the block. |
| 56 | + |
48 | 57 | #### block.displayName
|
49 | 58 |
|
| 59 | +Display name of the block. |
| 60 | + |
50 | 61 | #### block.shapes
|
51 | 62 |
|
52 | 63 | Array of bounding boxes representing the block shape. Each bounding box is an array of the form `[xmin, ymin, zmin, xmax, ymax, zmax]`. Depends on the type and state of the block.
|
53 | 64 |
|
54 | 65 | #### block.entity
|
55 | 66 |
|
56 |
| -If this block is a block entity, this contains the NBT data for the entity |
| 67 | +If this block is a block entity, this contains the NBT data for the entity. |
57 | 68 |
|
58 | 69 | #### block.blockEntity
|
59 | 70 |
|
@@ -93,7 +104,7 @@ Boolean, whether the block is considered diggable.
|
93 | 104 |
|
94 | 105 | #### block.boundingBox
|
95 | 106 |
|
96 |
| -The shape of the block according to the physics engine's collision decection. Currently one of: |
| 107 | +The shape of the block according to the physics engine's collision detection. Currently one of: |
97 | 108 |
|
98 | 109 | * `block` - currently, partially solid blocks, such as half-slabs and ladders, are considered entirely solid.
|
99 | 110 | * `empty` - such as flowers and lava.
|
@@ -131,11 +142,12 @@ Sets the text for the sign, can be plaintext, or array of JSON or prismarine-cha
|
131 | 142 |
|
132 | 143 | #### getSignText (): [string, string?]
|
133 | 144 |
|
134 |
| -Gets the plain text content of the sign, the first item of the array returned and the second is the back and will be undefined for versions that don't support writing on the back of signs. |
| 145 | +Gets the plain text content of the sign. The first item of the array returned and the second is the back, which will be undefined for versions that don't support writing on the back of signs. |
135 | 146 |
|
136 | 147 | #### get .signText
|
137 | 148 |
|
138 |
| -Deprecated, returns a plaintext string containing the sign's text |
| 149 | +Deprecated, returns a plaintext string containing the sign's text. |
139 | 150 |
|
140 | 151 | #### set .signText
|
141 |
| -Deprecated, sets the text for a sign's text, can be plaintext, or array of JSON or prismarine-chat instances |
| 152 | + |
| 153 | +Deprecated, sets the text for a sign's text. Can be plaintext, or array of JSON or prismarine-chat instances. |
0 commit comments