Перейти к содержимому
Mineforgian

World Edit Mini

A miniature version of WorldEdit... in a datapack.

Загрузки
438
Подписчики
0
Обновлён
30 мая 2026 г.
Лицензия
MIT

Опубликован 10 июля 2025 г.

You can run the command /function editor:get_items to get an "Open Editor" tool which, when used, will select the block you are looking at, and enter Selection Mode. (You will also get a "Teleport" tool; this is unrelated and just for utility.)

In Selection Mode (where any number of block positions can be selected), these tools are available:

  1. Toggle (gold): Select the block position you are looking at, or de-select it if it is already selected.
  2. Exit (wooden): De-select all selected blocks and exit the editor.
  3. Convert to Cube (diamond): Find the smallest cuboid containing all selected positions. Select this cuboid (deselecting all positions), and switch to Cube Mode.
  4. Set Blocks (stone): Set each selected block to the block you are currently looking at.
  5. Move (iron): Move all selected positions by one block in the direction you are looking.

In Cube Mode (where a cube(oid) is selected), these tools are available:

  1. More Options (book): Open the secondary Cube Mode menu.
  2. Exit (wooden): De-select the cube and exit the editor.
  3. Fill (stone): Fill the cube with the block you are looking at.
  4. Convert to Positions (diamond): Select one position at each corner of the selected cube. De-select the cube and switch to Selection Mode.
  5. Move (iron): Move the cube by its size in the direction you are looking. (For example, if the cube is 2 blocks high and you are looking up, it will move 2 blocks up. If you want to move by 1 block, convert to positions first.)
  6. Copy (copper): Copy the selected region to the clipboard. You will get a new "clipboard item" representing the copied structure. While holding the clipboard item, you can right-click to paste, or left-click to discard the copied structure. (Do not destroy the clipboard item through any other means, or you may experience bugs!)

In the secondary Cube Mode menu, these tools are available:

  1. Back (book): Return to the main Cube Mode menu.
  2. Select Same Blocks (gold): Select each block inside the selected cube which is exactly the same as the block you are looking at, and switch to Selection Mode.
  3. Expand (diamond): Expand the selected cube so it contains the block you are looking at.
  4. Generate Structure Block (netherite): Create a structure block configured to contain the selected cube.

Have fun! :)

A few notes:

  • As the "fill cube" method is relatively inefficent due to command limitations, /gamerule max_command_sequence_length (by default set to 65536) determines (approximately) the maximum number of blocks that may be filled. You may wish to set this to a larger value (for example, /gamerule max_command_sequence_length 16777216).
  • Similarily, /gamerule max_block_modifications (by default set to 32768) determines the number of blocks that may be copied, pasted, or filled at once. You can set this to a larger value (for example, /gamerule max_block_modifications 2147483647), however the server may slow down or crash if lots of blocks are being modified.
  • If you find any bugs, let me know! (I'm on Discord!)

(Disclaimer: I haven't used WorldEdit and have no idea how it works, but I wasn't really sure what else to name this datapack. I just made this because I wanted to be able to use /fill easier, and use copy-paste.)

Ченджлог

2.19.3Релиз26.1, 26.1.1, 26.1.2 · 30 мая 2026 г.

In cube2 mode, there is a new "Expand" tool that expands the selected cube to contain the position you are looking at.

You can also put multiple commands in one item, for example:

give @s minecraft:carrot_on_a_stick[minecraft:custom_name="Teleport to Other Player",minecraft:item_model="minecraft:ender_eye",minecraft:enchantment_glint_override=true,minecraft:custom_data={editor:{is_command:1b,command:"execute at @p[distance=1..] run tp @s ^ ^1 ^-1",next:{command:"execute unless entity @p[distance=1..] at @r run tp @s ^ ^1 ^-1",next:{}}}}]

Or perhaps...

give @s minecraft:carrot_on_a_stick[minecraft:custom_name="Parkour",minecraft:item_model="minecraft:netherite_upgrade_smithing_template",minecraft:enchantment_glint_override=true,minecraft:custom_data={editor:{is_command:1b,command:"fill ~-2 ~-2 ~-2 ~2 ~6 ~18 sandstone",next:{command:"fill ~-1 ~ ~-1 ~1 ~5 ~17 air",next:{command:"fill ~-1 ~-1 ~3 ~1 ~-1 ~15 lava",next:{command:"fill ~-1 ~-2 ~3 ~1 ~-2 ~15 stone",next:{command:"setblock ~ ~-1 ~4 nether_brick_fence",next:{command:"setblock ~-1 ~-1 ~6 nether_brick_fence",next:{command:"setblock ~ ~-1 ~7 nether_brick_fence",next:{command:"setblock ~ ~ ~7 nether_brick_fence",next:{command:"setblock ~ ~-1 ~10 nether_brick_fence",next:{command:"setblock ~ ~ ~10 nether_brick_fence",next:{command:"setblock ~1 ~-1 ~12 nether_brick_fence",next:{command:"setblock ~1 ~ ~12 nether_brick_fence",next:{command:"setblock ~1 ~1 ~12 nether_brick_fence",next:{command:"setblock ~ ~-2 ~17 repeating_command_block{auto:1b,Command:\"/execute as @a[distance=0..3,nbt={OnGround:1b}] run function editor:onclick/custom {command:\\\"title @s actionbar [{\\\\\\\"text\\\\\\\":\\\\\\\"You did it!\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"green\\\\\\\"}]\\\",next:{command:\\\"fill ~-2 ~-1 ~-19 ~2 ~8 ~1 air\\\",next:{command:\\\"fill ~-1 ~1 ~-1 ~1 ~1 ~ sandstone\\\",next:{command:\\\"summon firework_rocket ~ ~2 ~-0.5 {LifeTime:10,FireworksItem:{id:firework_rocket,components:{fireworks:{flight_duration:1,explosions:[{shape:\\\\\\\"large_ball\\\\\\\",has_twinkle:1,has_trail:1,colors:[I;4312372],fade_colors:[I;3887386,4312372]}]}}}}\\\",next:{}}}}}\",TrackOutput:0b}",next:{command:"setblock ~ ~-3 ~8 repeating_command_block{auto:1b,Command:\"/execute as @a[distance=0..10] run function editor:onclick/custom {command:\\\"execute at @s unless block ~ ~-0.25 ~ stone run return 0\\\",next:{command:\\\"title @s actionbar [{\\\\\\\"text\\\\\\\":\\\\\\\"You failed!\\\\\\\",\\\\\\\"color\\\\\\\":\\\\\\\"red\\\\\\\"}]\\\",next:{command:\\\"fill ~-2 ~ ~-10 ~2 ~9 ~10 air\\\",next:{command:\\\"execute at @s run setblock ~ ~-1.5 ~ sandstone\\\",next:{}}}}}\",TrackOutput:0b}",next:{}}}}}}}}}}}}}}}}}]

2.18.8Бета26.1, 26.1.1, 26.1.2 · 27 мая 2026 г.

All tools are now snowballs, which allows for instant (0-tick) click detection. This means that the datapack still works even if the game is frozen. However, you can sometimes see the snowball entity, and none of this works in Survival mode anymore, so this idea will be on hold until Mojang gives us a way to detect right clicks.

2.17.2Релиз26.1, 26.1.1, 26.1.2 · 25 мая 2026 г.

Adds a book item to Cube Mode, which can be used to switch between a secondary menu (containing Select Same Blocks and Generate Structure Block) and the main menu. This was done to free up hotbar space.

2.16.5Релиз26.1, 26.1.1, 26.1.2 · 25 мая 2026 г.

Shows a preview of which block you're going to select. Also, adds custom command items (with component minecraft:custom_data={editor:{is_command:1b,command:"..."}}).

2.16.3Релиз26.2-snapshot-4, 26.2-snapshot-5, 26.2-snapshot-6 · 9 мая 2026 г.

Added a new tool to cube mode, "Select Same Blocks", which will select each position inside the selected cube which is the same as the block you're looking at.

Also, fixed a bug where blocks which need support from below (such as redstone) in the bottom layer of a copied structure would disappear.

2.14.2Релиз26.1, 26.1.1, 26.1.2 · 27 апреля 2026 г.

When you use tools, those hotbar spaces are saved in your inventory, and then restored when you exit.

2.13.5Релиз26.1, 26.1.1, 26.1.2 · 25 апреля 2026 г.

Added support for copying and pasting! When using the "Copy" tool, you will be given an item representing the copied structure. Right-clicking with that item pastes, while left-clicking discards the copied structure.

2.11.3Альфа1.21.9, 1.21.10, 1.21.11 · 25 апреля 2026 г.

Added functionality for three tools.

  • Fill (stone; fills selected cube with the block you are looking at)
  • Generate Structure Block (netherite; generates structure block containing selected cube)
  • Move (iron; moves selected cube by its size in the direction you are looking)

Copy and paste is coming soon!

Комментарии

Загружаем…