I wanted to summon a villager with custom trades and without AI so I took a command block, placed it down and started typing the command. Notice I used relative coordinates:
/summon Villager ~ ~1 ~ {NoGravity:1,NoAI:1}
What I expected to happen was:
when I pressed the button on the command block, it would summon the villager standing on the command block.
This also happens when using /execute .
What actually happened was:
the villager summoned but not 1 block above the command block, but 1,5 block above.
Tried with other mobs and also items, it did the same. When I used ~ ~0.5 ~ it did summon exactly on the command block. Also, this doesn't happen with absolute coordinates, only with relative.
How to reproduce:
1. Give yourself a command block
2. Go into the command block and put in this: /summon <your entity> <your relative coordinates>
3. Attach a button to the command block and press it
4. You'll see it is 0.5 block higher than where you actually wanted your entity to be.
Linked issues
is duplicated by 3
Attachments
Comments 35
Mm, is possible. But when tried with a pressure plate is does the same, and if it were so with a button, it would be weird since it wasn't the case in previous snapshots...
This problem hasn't been solved in the prelease of 1.8, though I think it's a kinda major bug since /summon isn't used seldom...
I added the current summary/feedback of the community regarding this to the Redditpost, will update it in case it changes over time (until Mojang makes a decision whether or not to consider this bugpost valid ir as "works as intended").
WAI, see MC-67369.
@unknown I'm not sure if a Dev's statement from 2014, 2 years ago, can still be seen as valid, even more so considering all the changes we went through with commands and commandblocks. so personally I'd like to know if it is still reasonable, as it differs from other relative summon commands, e.g. if made by a player or executed at an entity.
Of course, for other things the very middle of the CB is taken as initial point and it should remain like that, but I feel as for summoning it should be consistent to others.
It'd be great if other CBers could voice their opinion on relative summon commands via a CB.
I suspect mapmakers will rather summon entities relative to other entities or at maximum at fix coordinates, so it might not be as big of an issue, but still, I feel it's inconsistent, and they said they aim for consistency.
If you chose to leave this bugpost closed, I'll add a post on Mojira to apply for reopening it.
Edit: Also, e.g. if you insert this command into a CB:
/teleport @e ~ ~2 ~
and trigger the CB, the entity will end up 1.5 blocks above the CB, because it executes from its very middle, so the entity does not end up exact 2, but 1.5 blocks above the CB, unlike if you teleport the entity via a player or relative to an entity.
That can be a bit confusing, and I'm not sure if that speaks for or against fixing this bugpost here, as the relative-tp to a CB would have to be changed then as well I guess, while other commands would still have to be executed starting from the very middle of the CB.
Thus I'd really like to know what Mojang intends to do about this inconsistency, if they want to make an exception in this case or not.
The command in the command block.