Minecraft Data Packs / Other

Mapmakers Tool: Movable builds

  • check_circle Functions
  • 3,600 views, 9 today
  • 139 downloads, 1 today
  • 19
  • 15
  • 15
Required Resource Pack
EDTA avatar EDTA
Level 32 : Artisan Engineer

Movable builds

Converts builds of limited size to a movable form that can move and rotate in all directions. (The build becomes a collection of armorstands).

Demo map: www.planetminecraft.com/project/movable-builds-datapack-demo-map/

Current version: v1.4 (03/11/2020)
* Drop the .zip in your .minecraft/saves/<NAME_OF_SAVE>/datapacks
* /reload

1. Building

The first step is to build something that you want to convert into a movable build. There are a few rules for this.
* Limit yourself to the maximum number of blocks as defined in the init.mcfunction file (default 200).
* Make sure your build is not touching any blocks not part of it (not the ground, or a cliff, or ...).
* All blocks that need to be part should be touching each other. You can cheat this rule by using String: it will be scanned,
but not be visible.

2. Scanning

To scan your build you should execute the function movable_builds:scan/init_scan at a location in your build.
This location will be the center of your build and as such the axis of all rotations.
To help you with scanning you can run the function movable_builds:scan/help to provide a scan funtion or give you a scan-tool.
There are three other tools. The Hinge tool let's you mark a block before scanning. During the scan, from that block on, everything will belong to a seperate structure/build, which can move independent, but still remains attached to the root build.
The third tool is an Ignore tool. When scanning a block marked with this tool will be ignored when the scan-process runs into it.
The last tool that fits in this categroy is the separator tool: You can mark the edge between 2 blocks as a separator: scans will not go through there.
This is mostly useful if you want to create a sub-build that can rotate independantly using the hing marker and you want some control over which blocks belong to which part.

3. Moving
From the in-game move help section you can get a tool that helps you place your latest scanned build wherever you want.
This is only intended for getting a structure to it's initial location. It will only move the latest scan.
It will reset all rotations. After that you can animate this scan as follows:
* Use the movement tools given to you after a scan
* Use commands in a more flexible and more manual approach

3.1 Movement Tools
There are 3 types of movement tools
* Relative movements such as 'forward' or 'left'
* Absolute movements such as "towards positive x"
* Rotations (Note: the 360 rotations, use tricks to be able to rotate past the 90° up or down rotation, but miht behave weirdly in conjunction with other movements)

Each tool also has different modes. Simply drop the tool to switch mode. Use SNEAK+DROP to actualy drop the tool.
When right-clicking a tool you can try it out, but it will not be a fluent movement (only every 4 ticks).

The best way to use these tools is by putting them in a chest on top of a specific command block which you can get through the ingame help menu
or running the function '/function movable_builds:tools/get_command_block';
In essence you just need a command block that runs the '/function movable_builds:command_block/read_moves' command.
You can configure the command block to your needs (impulse/repeat/chain, whether or not to require redstone). This system is best controlled by redstone.

Whenever the command block is triggered, all movement tools that are present in the chest on top of it, will be triggered, and your build will move.

Since, using this system, you will often need the same tool multiple times, there is a way to duplicate them.
Get the duplicator tool from the ingame help menu or use the function '/function movable_builds:tools/get_duplicator_tool'

Simply put the duplicator tool in your off hand and SNEAK+DROP any tool, to duplicate it.

3.2 Movement through commands
To move your build, you need to:
A. tp the center
B. run the function movable_builds:update/update_position at the center

There are a lot of (optional) functions in the movable_builds:move directory that do this for you. These are helper functions to make
things easier for you, but they are less flexible then writing it yourself using the 2 simple steps above.
You can remove these functions of you don't need them.

In the below examples, replace ID with the id you get when scanning a build.

- Example doing it yourself:
/execute as @e[​type=armor_stand,tag=edta_movable_build,tag=center,scores={mb_build_id=ID}] at @s run tp @s ~ ~ ~ ~10 ~
/execute as @e[​type=armor_stand,tag=edta_movable_build,tag=center,scores={mb_build_id=ID}] at @s run function movable_builds:update/update_position

- Example using a helper function:
/execute as @e[​type=armor_stand,tag=edta_movable_build,tag=center,scores={mb_build_id=ID}] at @s run function movable_builds:move/rotate_clockwise

4. Clean up
There are also some clean up functions to kill the last or all created builds (kill all armorstands that are part of it).
Note that builds in unloaded chunks can not be removed.

5. Limitations
  • Entities in minecraft can only be teleported in certain ways. xyz, rotate around y and look up and down. This last one is not a real rotation and as such comes with limitations: you can only rotate 90 in each direction (up/down). In the rotate_up_360 function I use a trick to make it look okay (since v1.1). Since v1.5, I managed to work around this limitation.
  • Blocks are rendered differently in armorstands. For one they are smaller. Slabs are always bottom, stairs always face north, ...Use the Movable Builds Resource Pack to make stairs, slabs, observers, dispensers, droppers and furnaces face correctly.
  • No collision. You can simply walk/fall through. The best solution I have for this is invisible slime passengers with no AI (you still fall through, but you might have a hard time walking through and can get pushed. Note that is also possible to program in effects like damage when you walk into a build representing something deadly. I did experiment with collision in the add_colision function, but it's not working well.

Note: the resource pack that comes with v1.5 and up, may have compatibility issues with other datapacks that put things on armorstands. This resource pack is more compatible, but for certain rotations, the center may look a bit off:


Older videos:

CompatibilityMinecraft 1.14
toMinecraft 1.16

3 Update Logs

Update v1.5 : 11/07/2020 12:55:04 pmNov 7th, 2020

  • Fixed bug that only occurred when you would just have started
  • Improved rotation
    - now always is possible to rotate 360
    - can rotate around the third axis
    - resource pack now shifts everything a few pixels down, so that rotation center is correct and looks better.

Create an account or sign in to comment.

08/29/2020 6:39 pm
Level 18 : Journeyman uwu
the der discohund
the der discohund avatar
Not sure how easy it'd be to implement with your system, but it would make more sense if instead of your "ignore" tool, you just added a "separator" tool that can be placed on the side of a block and just makes it so your flood fill won't step over it.

For example, with this system you helicopter could be made simply by using this separator tool exactly once everywhere between the rotors and the rest of the helicopter and you could skip the annoying process of trial and error.
08/29/2020 7:04 pm
Level 32 : Artisan Engineer
EDTA avatar
It should be possible. The disadvantage is that I want it to be possible to make sub-structures of sub-structures (i.e. the legs and arms of the creepy robot at the end of the tutorial video: there is a top leg and and a bottom leg) and it would then become impossible to separate those.

Another issue with your solution is that a block might be scanned by the root structure first, but you want it to be part of the sub-structure.

I have to agree that the ignore does not work as well as I expected it. It is very flexible, but not very practical.

The solution I had in mind was that you would need to build one extra block in between. So for example when you build the helicopter you build the rotors 1 block higher. You mark this block and it is completely skipped, meaning that in the movable build the rotor is one block lower again as it should be.

I will have to tinker a bit about what solution is best and put that in the next version.
08/30/2020 4:12 pm
Level 18 : Journeyman uwu
the der discohund
the der discohund avatar
I don't really understand how any of the issues you raised wouldn't be possible to solve with making a separator like that.

1. Aren't sub-substructures just done by putting hinges on the substructures that are separated using hinges? What I proposed would only apply to the "Ignore" tool and leave the hinges unchanged.

2. If you don't want a block to connect to the root structure, put a separator between that block and each of its faces that touch the root structure. I can see how this may break if you made the separators disappear mid-process, but I don't see a reason for them to behave like ignored blocks in that regard.

In a sense, the separators would act as the 1 block buffer-layer you thought of, just that they don't occupy any space.
11/03/2020 10:57 am
Level 32 : Artisan Engineer
EDTA avatar
So I finally got around to releasing this solution for it ;).
08/30/2020 5:27 pm
Level 32 : Artisan Engineer
EDTA avatar
Ah, I understand now. The separator would be the side of a block instead of a full block I guess. That should be a good solution if I can think of a way to implement it.
08/29/2020 5:17 pm
Level 32 : Artisan Engineer
EDTA avatar
Demo map with the creepy robot:

Older youtube video that explains some older concepts of the datapack (the new video focusses on the new functionality):
03/15/2020 5:56 pm
Level 32 : Artisan Engineer
EDTA avatar
v 1.2 now uploaded!

  • Using the resource pack Movable Build Resource Pack, it now is possible to render stairs, slabs, observers, dispensers, droppers and furnaces better so that they are facing the same way as the original build
  • The blocks of a movable build are now locked so that you can not take them from the armorstand when right-clicking

If you have any questions, requests, suggestions or other feedback, it will be very welcome!
02/16/2020 5:38 amhistory
Level 32 : Artisan Engineer
EDTA avatar
New version v1.1 !

New Features:
- 2 tools: 1 for Scanning, 1 for moving them to their initial place.
- Different scan system (expand from center in all directions at the same time, instead of first doing 1 direction)
- New color-coded ui :
  • dark_aqua = other help page
  • blue = execute function
  • green = get tool
  • gray = function suggestion (still need to insert ID and can be easily copy-pasted
- improved function rotate_up_360 and rotate_down_360 so that rotation around the x/z axis looks somewhat okay
02/14/2020 12:50 am
Level 44 : Master Musician
CVerse avatar
My god I REALLY need to immigrate soon to 1.14 for my theme park. This is the first thing that wanna try out! Do I need permission for you to implement this to my map?
02/15/2020 6:07 am
Level 32 : Artisan Engineer
EDTA avatar
Anybody can use it, as long as you don't remove my credit from the pack.mcmeta.
02/15/2020 7:31 pm
Level 44 : Master Musician
CVerse avatar
Sure thing, thanks!
02/10/2020 1:23 pmhistory
Level 35 : Artisan Engineer
Griss avatar
Woow, that just beautiful ! Congratulations!
Could you just put a link to download the demo map please ?
02/12/2020 12:17 pm
Level 32 : Artisan Engineer
EDTA avatar
02/09/2020 3:30 pmhistory
Level 48 : Master Modder
ScriptFox avatar
This is amazing! This should be more popular.

I am not personally a map maker, but this looks very interesting. I didn't know it was possible to move blocks like that

02/09/2020 3:23 pm
Level 32 : Artisan Engineer
EDTA avatar
Let me know what you think of it please!
Planet Minecraft


© 2010 - 2021