I am trying to summon an object and then center it in Minecraft Bedrock Edition. I am trying to just make the coordinate the exact position (eg. 10.0 80.0 10.0 or teleporting to 10 80 10). I have tried to use a function to teleport it by 0.01 until it detects a new block, then teleports to it's centered coordinate, it works sometimes, but it also sometimes doesn't go to the correct cord, or goes on forever teleporting away. I do not have an exact cord that I am teleporting it to so that would not help.
2 Answers
There are two ways you could do this. The first is to just summon the entity at the correct place, as everyone else has been telling you (I will use a sheep for the remainder of this)
/summon sheep 23 24 25
instead of
/summon sheep ~ ~ ~
The other way you could do it is to take advantage of a shulker's auto-align feature. You can summon a shulker, it will align automatically to the axis'. You can then execute as the shulker, and summon a sheep at it. Example:
/execute @e[type=shulker,c=1] ~ ~ ~ summon sheep
After this, you just kill the shulker.
-
If this is the best that comes up for a few days I'll give you the bounty– PenguinJan 21, 2021 at 15:29
/summon entity 10 80 10 or /teleport @e[type=entity] 10 80 10 or teleport it by 0.5/1.0
-
2Some context would help. Is this supposed to be one chained command, three commands that are all necessary, or just a list of commands to try until the asker gets the effect they want? Right now, this answer is confusing and unclear.– KadimaJan 21, 2021 at 14:50
~ ~ ~
be say5 10 5
and not5.283 10.2 5.3955