mojira.dev
MC-96565

Entities with NoAI no longer ignore the Motion tag

(It says 16w05a but it's 16w05b, the bug tracker didn't have 16w05b and now it's archived. If a mod sees this, please remove it from the archived, as this bug is only due in 16w05b)
(I don't care if Searge said this is Works as Intended, I'm not ignoring this bug until it's fixed.)

As of previous versions and snapshots, NoAI would remove the entity's AI and make it ignore its Motion tag completely, however as of 16w05b this is not the case. The AI is removed, but the Motion tag is still obeyed.

Now please don't go ahead and quote Searge's

Any part of an entities behavior that is not implemented as part of the AI is not affected by the NoAI tag.

It's getting seriously annoying.

The no gravity thing anyway was forever here, and the chances of it being intended are 999/1000. Plus, if this removal is intended, the entire concept of NoAI is useless.

For the sake of making a good report and getting more interest, I'll use the normal report format;
What I expected to happen was...
The entities that have a NoAI tag set to 1 won't obey physics.
What actually happened was...
The entities with NoAI set to 1 would still obey physics.
Steps to reproduce:
1. Open any snapshot or version between snapshot 14w32a to snapshot 16w05a.
2. In a normal world, use the command

/summon Villager ~ ~ ~ {NoAI:1}

(This could be most entities, but villagers are one of those that seem to work best)

3. Observe the villager/entity not obeying psychics (Not obeying gravity, punching/shooting it won't result in knockback, can't push it, etc.).
4. Open snapshot 16w05b or higher.
5. In the same world, observe the villager/entity obeying psychics (If the villager/entity is no longer there, spawn in another one. You can also use another normal world).

Related issues

Comments

Skylinerw

Confirmed.

migrated

Unfortunately, WAI. MC-75979

Skylinerw

@@unknown That report is the opposite of this report. As of 16w05b, NoAI no longer obeys a rule that it has obeyed since its existence.

migrated

I did enjoy the creation of areas underneath the Bedrock with this....

hmmmnnnn....

migrated

Confirmed

migrated

@Thomas Mobley how did you do that?

migrated

This might as well be the right place to post this.
I have always wanted to suggest to split NoAI into two tags: NoAI and NoGravity.
This would make 100% more sense. Why? If you take the AI from a mob, e.g. a zombie, does his lack of (artificial) intelligence mean he doesn't know how to 'use' gravity?

The only complains I've heard about this bug is that people want certain entities to have no gravity. Instead of fixing this 'bug', please add NoGravity, as we can do so much cool stuff with it.
Examples:
{NoAI:1b} = You can make a zombie fall, but it wouldn't approach you, nor move. Which can be handy in some cases (for example an adventure map)
{NoGravity:1b} = You could make items 'float', or basically make any entity float. And you can keep doing the normal stuff with it, like putting Armor Stands mid-air. Also, Armor Stands don't even have AI, they're made of wood and a some stone.

I can post this on /r/minecraftsuggestions if people like this idea, because I really think this makes sense, and is very, very cool for all mapmakers & commandblockers.

migrated

That would be quite interesting, however that also makes map makers have to fix all the entities that used NoAI before (Like in my case).
Now, as for "does his lack of (artificial) intelligence mean he doesn't know how to 'use' gravity?", I'm thinking NoAI ignores the Motion tag because, if someone were to use the NoAI tag, they would probably use it for making mobs that don't move, statues, etc. And if NoAI wouldn't ignore the Motion tag, that would mean you could punch the mobs and knock them back, which wouldn't be very realistic for a statue. However I do think your suggestion has an interesting idea, so I want to just add something to it; The NoGravity tag won't exist for mobs that don't have NoAI set to 1. If NoAI is set to 1, the NoGravity tag is added, and is by default set to 1. Then you can alter it to do have gravity, but it won't break any maps.

migrated

In that case, it should be called "NoMotion", so an entity isn't affected by gravity, but also cannot be punched or pushed. And the 'breaking maps' thing: 1.9 hasn't been released yet, and people making adventure maps in snapshots need to realize that stuff might chance. Same thing with the Passengers:[] tag.

migrated

Stuff shouldn't break if you just load the world for just a moment, especially when it's a distance of only one snapshot that is very minor.

Cavinator1

Can also confirm.

michael

The NoAI tag just disables the AI for entities. If this also disables gravity for these entities, that's an unintended side effect.

migrated

@unknown Hy there, please calm down, I understand your rage, but please read these 3 comments:
https://bugs.mojang.com/browse/MC-88099?focusedCommentId=247684&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-247684
https://bugs.mojang.com/browse/MC-88099?focusedCommentId=247814&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-247814
https://bugs.mojang.com/browse/MC-32575?focusedCommentId=277511&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-277511

Believe me, I also overly use mobs etc. in my creations, and for some I'd love if NoAI would always work properly, but I accepted the fact that it isn't possible at the moment, and that has nothing to do with lazyness on the Devs' side or anything like that.
All we can do is being patient and wait until the whole code is restructured in a way that fixing some things is not just a dirty hack, but a clean fix }=)

migrated

Friendly reminder that this is not a discussion forum.

migrated

@unknown I can fully understand that, it's just important to me that the community isn't raging unjustified against the Devs out of not being fully aware of the reasons why some bugs are closed as "works as intended"; that it doesn't mean it won't ever fix and is probably only temporary until the whole code is restructured and finished. Mojang got of course no obligation to justify themself in public, I just feel it'd make some things smoother in the community.
By muting those "ragers" the problem often gets worse.
Sorry for being overprotective here, just having the best in mind.

migrated

Seriously? Removing the comments I spent lots of time to type? So you think that's going to help, redstonehelper?
If you know what's good for you, you'll ignore us. I know this is not a discussion forum. It's a place where you track bugs, and I'm trying to tell Mojang that this is a bug tracker myself, not a website where people take their time to type down a long bug report about a bug they need to be fixed just to get a "Works as Intended" at their face from Mojang. When someone's reporting a bug, they need help. They desperately need it to be fixed. "Works as Intended" is literally bullshit.

migrated

Last warning. This is not a discussion forum. Meta discussion goes to /r/Mojira on reddit.

migrated

@unknown Please vent here: https://www.reddit.com/r/Mojira
MC forums or reddit-suggestions might be maybe not as often looked at by Mojangsters & Co., but from what I saw that Mojira-Reddit is indeed frequented by the mods here, so start a discussion there, please? A chill one, preferrably, with arguments, no accusations };]

@mods: Sorry for meddling again, can't help it ;-;

migrated

Look, I wasn't gonna bring it up, but Reddit absolutely sucks. Seems like a bunch of hobos built the website and called it "The other side of the Internet".

Aleksandra Zajac

Dear @unknown,
The warning system is definitely not made up. There is no ground, for now, to ban you, as we appreciate your bug reporting efforts. However, I would like to politely ask you to stop flaming.
If you are not happy to discuss your frustrations on Reddit, you should not be happy with discussing them here on the bug tracker. That is my request, and please respect us, our work, time and effort we put in fixing (and sometimes adding) bugs. Saying that we "really" do not care is simply not true.
We did not remove your comments, we just marked them invisible to regular user, so they don't provoke arguments and further flaming.

Knowing our work system and bug handling, you should know by now that nothing is ever set in stone. Polite and civil discussion can lead to a lot of good things, like getting what you want. Disruption, being unpleasant or demanding will not lead to anything beneficial.

Thanks for contributing, we actually do appreciate it.

migrated

confirmed in 16w07a Please update!

migrated

@unknown This bugpost is resolved as "Works as intended".
It might fix itself over time as soon as the mob AI system has been reworked.
If you want to know more about it, follow the links in this comment here }=)

migrated

I'd definitely agree that we very much need a NoGravity or a NoPush tag now or something for all entities, as this breaks a good number of maps out there and makes doing things like entity animations a lot harder as we can't guarantee where an entity will be now if the player can push them around. However that being said there is still one rather messy and potentially laggy work around for this:

Give your previous NoAI mobs levitation with an amplifier of -1 to make them float, ie: /entitydata @e[type=Enderman] {ActiveEffects:[{Id:25,Duration:999999999,Amplifier:-1}]}

However a player can still push it around so you will also have to give your entity a unique tag and then set up a repeat command block constantly teleporting the mob to the spot they should be in.

For entity animations you will probably want to hook up an invisible armor stand with each entity as armor stands don't get pushed around. So you'd actually be moving the armor stand as needed with commands and then at the end of the command block chain have the entity be teleported to the armor stand.

Again that is a really messy sub-par solution, especially when before we only needed to type in NoAI:1 and be happy. This really stinks for someone like me who literally has over 100 NoAI entities in my main map that I've been working on for a year now.

migrated

After discussing that problem that NoAI-entities are now affected by gravity with some of my tech buddies, here a workaround for gravity affecting entities you can use:
a) riding an invisible, Marker:1, NoGravity-ArmorStand
or
b) set via entitydata the {Motion:[0,0,0]} for all entities you don't want to have gravity (set it at a purple/repeater-CB)

a) would dismount the mob from an AS underwater, b) would work underwater, so it really depends on your usage.

And, should be self-explainable, I'll just add it regardless as I like to forget such stuff myself:
If you want a mob to no longer have any collision, put it on a team whose collisionRule is "never".

I'll probably make a workaround-video on that, but I'd like to wait a little bit about Mojang's reaction, maybe it'd be obsolete next snapshot/prelease or so, I don't know what they are planning, if there is something that could make up for the loss of the (unintended) "frozen" NoAI-mobs from before.

No idea if it's possible though (e.g. to add a NoGravity-tag for all entities, not only AS), or if that would affect the current code badly in any way (and just be a "dirty hack" in a sense).

[Mod] Neko

Spake Miner, you shouldn't add new affected versions once a ticket is closed.

migrated

Meh, just wanted to bump this ticket so people won't forget about it.

migrated

Bumping is not allowed...

migrated

Don't remember that rule anywhere. Oh well, the more you know.

migrated

}xD It gets bumped automatically with new versions, if it still persists 😸
Not sure if there'll be a NoGravity for all entities at one point, but until then just use the workaround }=Þ

this was no meta-discussion but a (hopefully) on-topic-helpful comment }=Þ

migrated

OK, I don't wanna get more warnings on being off topic, so I'm gonna make this quick; So far, the workarounds you suggested each has its own problem. The first one, as you said, doesn't work in water. The second one, what if you want to have lots of floating entities at the same time? That's lag.

migrated

Use one of the solutions I suggested for having an entity float - give it levitation with a -1 amplifier for example: /entitydata @e[type=Enderman] {ActiveEffects:[{Id:25,Duration:999999999,Amplifier:-1}]}

In general you should be able to find an appropriate solution with a combination of these:
*Give an entity levitation with a -1 amplifier
*Run a clock tping them to the spot where they should be at
*Run a clock setting their motion to Motion:[0d,0d,0d]
*Have them ride an entity that isn't effected by gravity/knockback - ie: NoGravity armor stand or an area effect cloud
*Have them join a scoreboard team which has the collisionRule set to never

michael

This is not a discussion forum, as our mods said before. Last warning. Take this discussion somewhere else, please.

migrated

A simple splution is to put this command inside a repeating command block:
/entitydata @e {Motion:[0.0,0.0,0.0]}

migrated

michael

Community Consensus

Minecraft 16w05a, Minecraft 16w05b, Minecraft 16w06a, Minecraft 1.9

Retrieved