Skip to content

Commit

Permalink
Merge branch 'LNSSPsd:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
chfwd authored Jan 15, 2023
2 parents dd91e8d + b9a836e commit 78a1768
Show file tree
Hide file tree
Showing 41 changed files with 67,113 additions and 1,046 deletions.
21 changes: 16 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# PhoenixBuilder

PhoenixBuilder is a multifunctional structure generating tool for Minecraft China Edition based on gophertunnel.

PhoenixBuilder 是一个基于 gophertunnel 的多功能 Minecraft 中国版 结构生成工具。
<h1 align="center">PhoenixBuilder</h1>
<p align="center">
<a href="https://github.com/LNSSPsd/PhoenixBuilder/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-AGPL%203.0-brightgreen.svg?style=flat" alt="LICENSE"></a>
<a href="https://github.com/LNSSPsd/PhoenixBuilder/releases"><img src="https://img.shields.io/github/v/release/LNSSPsd/PhoenixBuilder?display_name=tag&sort=semver" alt="Releases"></a>
<img src="https://img.shields.io/github/stars/LNSSPsd/PhoenixBuilder.svg?style=falt" alt="Stars">
</p>

<p align="center">
<a href="https://github.com/LNSSPsd/PhoenixBuilder/issues"><img src="https://img.shields.io/github/issues/LNSSPsd/PhoenixBuilder.svg?style=flat" alt="opissues"></a>
<a href="https://github.com/LNSSPsd/PhoenixBuilder/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed/LNSSPsd/PhoenixBuilder.svg?style=flat&color=success" alt="clissues"></a>
<a href="https://github.com/LNSSPsd/PhoenixBuilder/pulls"><img src="https://img.shields.io/github/issues-pr/LNSSPsd/PhoenixBuilder.svg?style=falt" alt="oppr">
<a href="https://github.com/LNSSPsd/PhoenixBuilder/pulls?q=is%3Apr+is%3Aclosed"><img src="https://img.shields.io/github/issues-pr-closed/LNSSPsd/PhoenixBuilder.svg?style=flat&color=success" alt="clpr">
</p>
<p align="center">
<h5 align="center">PhoenixBuilder is a multifunctional structure generating tool for Minecraft China Edition based on gophertunnel.
</p>
11 changes: 6 additions & 5 deletions doc/bdump/bdump-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,12 @@ BDump v3 文件的后缀名为`.bdx`,且文件头为`BD@`, 代表本bdump文
| 34, `0x22` | `PlaceRuntimeBlockWithCommandBlockData` | 使用特定的 `运行时ID` 在当前画笔的位置放置命令方块,并设置其数据 | `unsigned short runtimeId`<br/>`unsigned int mode {脉冲=0, 重复=1, 连锁=2}`<br/>`char *command`<br/>`char *customName`<br/>`char *lastOutput (此项无效,可被设为 '\0')`<br/>`int tickdelay`<br/>`bool executeOnFirstTick`<br/>`bool trackOutput`<br/>`bool conditional`<br/>`bool needRedstone` |
| 35, `0x23` | `PlaceRuntimeBlockWithCommandBlockDataAndUint32RuntimeID` | 使用特定的 `运行时ID` 在当前画笔的位置放置指令方块,并设置其数据 | `unsigned int runtimeId`<br/>`unsigned int mode {脉冲 = 0, 循环 = 1, 连锁 = 2}`<br/>`char *command`<br/>`char *customName`<br/>`char *lastOutput (此项无效,可被设为 '\0')`<br/>`int tickdelay`<br/>`bool executeOnFirstTick`<br/>`bool trackOutput`<br/>`bool conditional`<br/>`bool needRedstone` |
| 36, `0x24` | `PlaceCommandBlockWithCommandBlockData` | 根据给定的 `方块数据值(附加值)` 在当前画笔所在位置放置一个指令方块,并设置其数据值 | `unsigned short data`<br/>`unsigned int mode {脉冲 = 0, 循环 = 1, 连锁 = 2}`<br/>`char *command`<br/>`char *customName`<br/>`char *lastOutput (此项无效,可被设为 '\0')`<br/>`int tickdelay`<br/>`bool executeOnFirstTick`<br/>`bool trackOutput`<br/>`bool conditional`<br/>`bool needRedstone` |
| 37, `0x25` | `PlaceRuntimeBlockWithChestData` | 在画笔所在位置放置一个 `runtimeId`(特定的 `运行时ID`) 所表示的方块(如箱子、熔炉、唱片机等),并向此方块载入数据<br/>其中 `slotCount` 的数据类型为 `unsigned char`,因为我的世界用一个字节来存储物品栏编号。此参数指的是要载入的次数,即要载入的 `ChestData` 结构体数量 | `unsigned short runtimeId` <br/> `unsigned char slotCount` <br/> `struct ChestData data` |
| 38, `0x26` | `PlaceRuntimeBlockWithChestDataAndUint32RuntimeID` | 在画笔所在位置放置一个 `runtimeId`(特定的 `运行时ID`) 所表示的方块(如箱子、熔炉、唱片机等),并向此方块载入数据<br/>其中 `slotCount` 的数据类型为 `unsigned char`,因为我的世界用一个字节来存储物品栏编号。此参数指的是要载入的次数,即要载入的 `ChestData` 结构体数量 | `unsigned int runtimeId`<br/>`unsigned char slotCount`<br/>`struct ChestData data` |
| 39, `0x27` | `RecordBlockEntityData` | 记录画笔所在方块的 `方块实体` 数据,但亦可用于记录其他信息<br/>`uint32_t length` 指代 `unsigned char buffer[length]` 的具体长度,而 `unsigned char buffer[length]` 自身则用于记录信息<br/>应当说明的是,由于一些限制,`PhoenixBuilder` 在此处记录的字段不是完整的 `NBT` | `uint32_t length`<br>`unsigned char buffer[length]` |
| 88, `'X'`, `0x58` | `Terminate` | 停止读入。注意!虽然通常的结尾应该是 `XE` (2字节),但是用 `X` (1字节)是允许的 | - |
| 90, `0x5A` | `isSigned` (此命令并非是一个真实的命令) | 这是一个与其他命令功能稍有不同的命令,其参数应当出现在其前面,而这个指令呢也只能出现在文件的末尾。在不知道所以然的情况下,请不要使用它,因为无效的签名会使得 `PhoenixBuilder` 无法去构建你的结构。详见 `签名` 部分。 | `unsigned char signatureSize` |
| 37, `0x25` | `PlaceRuntimeBlockWithChestData` | 在画笔所在位置放置一个 `runtimeId`(特定的 `运行时ID`) 所表示的方块,并向此方块载入数据<br/>其中 `slotCount` 的数据类型为 `unsigned char`,因为我的世界用一个字节来存储物品栏编号。此参数指的是要载入的次数,即要载入的 `ChestData` 结构体数量 | `unsigned short runtimeId` <br/> `unsigned char slotCount` <br/> `struct ChestData data` |
| 38, `0x26` | `PlaceRuntimeBlockWithChestDataAndUint32RuntimeID` | 在画笔所在位置放置一个 `runtimeId`(特定的 `运行时ID`) 所表示的方块,并向此方块载入数据<br/>其中 `slotCount` 的数据类型为 `unsigned char`,因为我的世界用一个字节来存储物品栏编号。此参数指的是要载入的次数,即要载入的 `ChestData` 结构体数量 | `unsigned int runtimeId`<br/>`unsigned char slotCount`<br/>`struct ChestData data` |
| 39, `0x27` | `AssignDebugData` | 记录调试数据,不对建造过程产生任何影响。 | `uint32_t length`<br>`unsigned char buffer[length]` |
| 40, `0x28` | `PlaceBlockWithChestData` | 放置一个 constantBlockID 表示的方块,并指定容器数据。 | `uint16_t blockConstantStringID`<br/>`uint16_t blockData`<br/>`struct ChestData data` |
| 88, `'X'`, `0x58` | `Terminate` | 停止读入。虽然通常的结尾应该是 `XE` (2字节),但是用 `X` (1字节)是允许的 | - |
| 90, `0x5A` | `isSigned` (伪命令) | 这是一个与其他命令功能稍有不同的命令,其参数应当出现在其前面,而这个指令呢也只能出现在文件的末尾。在不知道所以然的情况下,请不要使用它,因为无效的签名会使得 `PhoenixBuilder` 无法去构建你的结构。详见 `签名` 部分。 | `unsigned char signatureSize` |

此表为 bdump v4 到 2022/1/29 为止的全部指令。

Expand Down
11 changes: 6 additions & 5 deletions doc/bdump/bdump.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ Type definition:
| 2 | **DEPRECATED and REMOVED** | - | - |
| 3 | **DEPRECATED and REMOVED** | - | - |
| 4 | **DEPRECATED and REMOVED** | - | - |
| 5 | **DEPRECATED and REMOVED** | - | - |
| 5 | `PlaceBlockWithBlockStates` | Place a block on the current brush position using the ID of the string indicating the block's name returned by `CreateConstantString` command and the ID of the `BlockStates` constant string indicating the block states field for placing the block with `setblock` command in Minecraft. <br/>An example of `blockStates` is `["color":"orange"]` | `unsigned short blockConstantStringID`<br/>`unsigned short blockStatesConstantStringID` |
| 6 | `AddInt16ZValue0` | Add `value` to the brush position's `Z` value, does the same thing as `AddInt16ZValue`. | `unsigned short value` |
| 7 | `PlaceBlock` | Place a block on the current position of the brush using the ID of the string indicating the block's name returned by `CreateConstantString` command and the `BlockData` value indicating the data value for the block. | `unsigned short blockConstantStringID`<br/>`unsigned short blockData` |
| 8 | `AddZValue0` | Add `1` to the brush position's `Z` value, does the same thing as the command `AddZValue`. | - |
| 9 | `NoOperation` | Do nothing. (No Operation) | - |
| 10, `0x0A` | **DEPRECATED and REMOVED** | - | - |
| 11, `0x0B` | **DEPRECATED and REMOVED** | - | - |
| 12, `0x0C` | `AddInt32ZValue0` | Add `value` to the brush position's `Z`, does the same thing as `AddInt32ZValue`. | `unsigned int value` |
| 13, `0x0D` | `PlaceBlockWithBlockStates` | Place a block on the current position of the brush using the ID of the string indicating the block's name returned by `CreateConstantString` command and the `BlockStates` string indicating the block states field for placing the block with `setblock` command in Minecraft. <br/>An example of `blockStates` is `["color":"orange"]` | `unsigned short blockConstantStringID`<br/>`char *blockStatesString` |
| 13, `0x0D` | `PlaceBlockWithBlockStatesDeprecated` | Place a block on the current position of the brush using the ID of the string indicating the block's name returned by `CreateConstantString` command and the `BlockStates` string indicating the block states field for placing the block with `setblock` command in Minecraft. <br/>An example of `blockStates` is `["color":"orange"]` | `unsigned short blockConstantStringID`<br/>`char *blockStatesString` |
| 14, `0x0E` | `AddXValue` | Add `1` to the brush position's `X` value. | - |
| 15, `0x0F` | `SubtractXValue` | Subtract `1` from the brush position's `X` value. | - |
| 16, `0x10` | `AddYValue` | Add `1` to the brush position's `Y` value. | - |
Expand All @@ -75,9 +75,10 @@ Type definition:
| 34, `0x22` | `PlaceRuntimeBlockWithCommandBlockData` | Place a command block with the specified runtime id, and set its data at the brush's position. | `unsigned short runtimeId`<br/>`unsigned int mode {Impulse=0, Repeat=1, Chain=2}`<br/>`char *command`<br/>`char *customName`<br/>`char *lastOutput (no effect and can be set to'\0')`<br/>`int tickdelay`<br/>`bool executeOnFirstTick`<br/>`bool trackOutput`<br/>`bool conditional`<br/>`bool needRedstone` |
| 35, `0x23` | `PlaceRuntimeBlockWithCommandBlockDataAndUint32RuntimeID` | Place a command block with the specified runtime id, and set its data at the brush's position. | `unsigned int runtimeId`<br/>`unsigned int mode {Impulse=0, Repeat=1, Chain=2}`<br/>`char *command`<br/>`char *customName`<br/>`char *lastOutput (no effect and can be set to'\0')`<br/>`int tickdelay`<br/>`bool executeOnFirstTick`<br/>`bool trackOutput`<br/>`bool conditional`<br/>`bool needRedstone` |
| 36, `0x24` | `PlaceCommandBlockWithCommandBlockData` | Place a command block with the specified data value, and set its data at the brush's position. | `unsigned short data`<br/>`unsigned int mode {Impulse=0, Repeat=1, Chain=2}`<br/>`char *command`<br/>`char *customName`<br/>`char *lastOutput (no effect and can be set to'\0')`<br/>`int tickdelay`<br/>`bool executeOnFirstTick`<br/>`bool trackOutput`<br/>`bool conditional`<br/>`bool needRedstone` |
| 37, `0x25` | `PlaceRuntimeBlockWithChestData` | Place a (chest) block with the specified data within the chest. `slotCount`'s type is `unsigned char` since Minecraft uses only a byte for the slot ID. | `unsigned short runtimeId`<br/>`unsigned char slotCount`<br/>`struct ChestData data` |
| 38, `0x26` | `PlaceRuntimeBlockWithChestDataAndUint32RuntimeID` | Place a (chest) block with the specified data within the chest. `slotCount`'s type is `unsigned char` since Minecraft uses only a byte for the slot ID. | `unsigned int runtimeId`<br/>`unsigned char slotCount`<br/>`struct ChestData data` |
| 39, `0x27` | `RecordBlockEntityData` | Record the `Block Entity Data` where the brush is, and of course that other information can also be recorded.<br/>`uint32_t length` is refer to the length of `unsigned char buffer[length]` , and `unsigned char buffer[length]` itself is used to record some infomation.<br/>Due to some limitations, `PhoenixBuilder` can not record complete `NBT` data | `uint32_t length`<br/>`unsigned char buffer[length]` |
| 37, `0x25` | `PlaceRuntimeBlockWithChestData` | Place a block with specified container data. `slotCount`'s type is `unsigned char` since Minecraft uses only a byte for the slot ID. | `unsigned short runtimeId`<br/>`unsigned char slotCount`<br/>`struct ChestData data` |
| 38, `0x26` | `PlaceRuntimeBlockWithChestDataAndUint32RuntimeID` | Place a block with specified container data. `slotCount`'s type is `unsigned char` since Minecraft uses only a byte for the slot ID. | `unsigned int runtimeId`<br/>`unsigned char slotCount`<br/>`struct ChestData data` |
| 39, `0x27` | `AssignDebugData` | Assign debug data that would be ignored when resolving the structure. Comment-liked command. | `uint32_t length`<br/>`unsigned char buffer[length]` |
| 40, `0x28` | `PlaceBlockWithChestData` | Place a block with specified container data. | `uint16_t blockConstantStringID`<br/>`uint16_t blockData`<br/>`struct ChestData data` |
| 88, `'X'`, `0x58` | `Terminate` | Stop reading. Note that though the general end is "XE" (2 bytes long), but a 'X' (1 byte long) character is enough. | - |
| 90, `0x5A` | `isSigned` (fake command) | A command that functions a little different with other commands, its argument is the previous byte of it, would only appear in the end of the file. Please do not use it unless you know how to use since an invalid signature would prevent PhoenixBuilder from constructing your structure. See paragraph `Signing` for details. | `unsigned char signatureSize` |

Expand Down
Loading

0 comments on commit 78a1768

Please sign in to comment.