> For the complete documentation index, see [llms.txt](https://dzx-dzx.gitbook.io/normaconstructor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dzx-dzx.gitbook.io/normaconstructor/generator-jie-shao/positionblocktypedirection-yi-ji-ta-men-de-cao-zuo-han-shu.md).

# position,blockType,direction,以及他们的操作函数

## Position

```javascript
class Coordinate {
    constructor(x, y, z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }
}
class Position {
    constructor(coordinate, tickingArea) {
        this.coordinate = coordinate;
        this.tickingArea = tickingArea;
    }
}

```

Position是一个复合的结构体，第一个结构体是Coordinate，表示坐标。第二个是tickingArea。

## BlockType

```javascript
class BlockType {
    constructor(blockIdentifier, blockState) {
        this.blockIdentifier = blockIdentifier;
        this.blockState = blockState;
    }
}
```

BlockType描述方块类型。blockIdentifier是方块名，而blockState是minecraft中block的component，描述方块的额外信息。（比如，混凝土的颜色）

## Direction

```javascript
class Direction {
    constructor(x, y) {
        this.x = x;
        this.y = y;
    }
}
```

这在minecraft中的标准名称是rotation……表示玩家的朝向。
