You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ Of course, this mod can also be used independently. As long as you can generate
33
33
34
34
* Keys are block IDs, and values are arrays of relative coordinates.
35
35
* You can use [**Minecraftify2.0**](https://github.com/Ivans-11/Minecraftify2/releases) to generate JSON files from 3D models. See its [repository documentation](https://github.com/Ivans-11/Minecraftify2) for details.
36
+
* You can also use the `/builder save` command to export JSON files from the current world. See the following content for specific usage.
36
37
37
38
2. Place a `builder:anchor_block` in the game world to define the reference origin and orientation.
38
39
@@ -55,6 +56,14 @@ Of course, this mod can also be used independently. As long as you can generate
55
56
```
56
57
57
58
This will revert the most recent build (up to 3 steps).
59
+
5. If you need to export a build from the current world, enter:
60
+
61
+
```
62
+
/builder save <x> <y> <z> <name>
63
+
```
64
+
Where `<x> <y> <z>` represents the selected area range.
65
+
The mod will use the nearest anchor block to the player as the starting point `(0,0,0)` and export the block data in the range from `(0,0,0)` to `(x,y,z)` to the `config/mybuilds/<name>.json` file.
66
+
Note that the x-axis corresponds to the red axis, the y-axis corresponds to the green axis, and the z-axis corresponds to the blue axis. The format of the exported JSON file is the same as that of the imported one.
58
67
59
68
## Command List
60
69
@@ -66,6 +75,12 @@ Of course, this mod can also be used independently. As long as you can generate
66
75
List the coordinates of all anchor blocks
67
76
*`/builder undo`
68
77
Undo the most recent build operation
78
+
*`/builder clear`
79
+
Clear all anchor blocks
80
+
*`/builder save <x> <y> <z> <name>`
81
+
Export the block data within the specified area to the `config/mybuilds/<name>.json` file.
82
+
*`/builder help`
83
+
Show help information
69
84
70
85
## Notes
71
86
@@ -77,6 +92,8 @@ Of course, this mod can also be used independently. As long as you can generate
77
92
78
93
* Undo only applies to blocks placed using the `/builder place` command, and does not affect manually placed blocks.
79
94
95
+
* Since JSON files only record the relative coordinates of blocks, it is not possible to import some special blocks (such as stairs, doors, etc., which contain more information) accurately.
96
+
80
97
## Acknowledgements
81
98
82
99
This project is based on [FabricMC/fabric-example-mod](https://github.com/FabricMC/fabric-example-mod).
BuildHandler.saveStructure(context.getSource(), x, y, z, name);
77
+
return1;
78
+
})
79
+
)
80
+
)
81
+
)
82
+
)
83
+
)
57
84
.then(literal("help")// Display help message
58
-
.executes(context -> {
85
+
.executes(context -> {
59
86
context.getSource().sendFeedback(() -> Text.literal("Builder Mod Commands:"), false);
60
-
context.getSource().sendFeedback(() -> Text.literal("/builder place <filename> - Place blocks based on the specified file."), false);
87
+
context.getSource().sendFeedback(() -> Text.literal("/builder place <filename> - Place blocks based on the specified JSON file."), false);
61
88
context.getSource().sendFeedback(() -> Text.literal("/builder list - List available build files."), false);
62
89
context.getSource().sendFeedback(() -> Text.literal("/builder anchors - List anchor positions."), false);
63
90
context.getSource().sendFeedback(() -> Text.literal("/builder undo - Undo the last build action."), false);
91
+
context.getSource().sendFeedback(() -> Text.literal("/builder clear - Clear all anchors."), false);
92
+
context.getSource().sendFeedback(() -> Text.literal("/builder save <x> <y> <z> <name> - Save the structure within the specified area to JSON file."), false);
0 commit comments