I'm working to make a map that involves NoAI mob "statues". However, I don't want the player to be able to "shove" the statues just by walking into them. In previous versions, the NoAI tag would prevent mobs from being shoved, but not in 1.9.2. How do I prevent this?
The first command creates the team, the second one makes sure that the anyone on the team can not collide or push with anyone else. The third command summons the mob that won't be able to be pushed or punched, and the last one makes sure no players can push the mob.
Hope this helped!
~HMSCoder
Rollback Post to RevisionRollBack
If I helped you in any way, please smash that like button. I really appreciate it.
I'm working to make a map that involves NoAI mob "statues". However, I don't want the player to be able to "shove" the statues just by walking into them. In previous versions, the NoAI tag would prevent mobs from being shoved, but not in 1.9.2. How do I prevent this?
To make sure that even if a player bumps into or punches they won't move, use the following commands:
/scoreboard teams add NoCollision
/scoreboard teams option NoCollision collisionRule never
/summon Pig ~ ~1 ~ {Attributes:[{Name:generic.knockbackResistance,Base:1}],NoAI:1,Team:"NoCollision"}
/scoreboard teams join NoCollision @a
The first command creates the team, the second one makes sure that the anyone on the team can not collide or push with anyone else. The third command summons the mob that won't be able to be pushed or punched, and the last one makes sure no players can push the mob.
Hope this helped!
~HMSCoder
If I helped you in any way, please smash that like button. I really appreciate it.