Minecraft / Data Packs

Mapmakers Tool: Movable builds

  • check_circle Functions
  • 8
  • 7
  • comment8
  • playlist_add
  • share
  • more_horiz
avatar EDTA
Level 5 : Apprentice 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.1 (16/02/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 100).
* 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.

3. Moving
To Get the scanned build in the correct initial location, you can use the Mover Tool

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

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).
  • Related to this is that up/down rotations don't actually tilt the armorstands head up/down. This can be fixed by uncommenting line 2 in the update_position function
  • Blocks are rendered differently in armorstands. For one they are smaller. Slabs are always bottom, stairs always face north, ... There is a fix for the stairs in the do_scan function, by rotating the head. A better solution (which works for all these issues) for this would be to use CustomModelData and a custom resource pack. That might be something for the future.
  • 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
CompatibilityMinecraft 1.14
toMinecraft 1.16 Snapshot

8 replies

02/16/2020 5:38 amhistory
Level 5 : Apprentice Engineer
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 43 : Master Musician
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 5 : Apprentice Engineer
Anybody can use it, as long as you don't remove my credit from the pack.mcmeta.
02/15/2020 7:31 pm
Level 43 : Master Musician
Sure thing, thanks!
02/10/2020 1:23 pmhistory
Level 25 : Expert Electrician
Woow, that just beautiful ! Congratulations!
Could you just put a link to download the demo map please ?
02/12/2020 12:17 pm
Level 5 : Apprentice Engineer
02/09/2020 3:30 pmhistory
Level 10 : Journeyman Modder
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 5 : Apprentice Engineer
Let me know what you think of it please!
Planet Minecraft Logo


© 2010 - 2020