I'm creating a cannon using Ender Crystals and need a test subject that is not a player. I tried spawning a skeleton that cannot move or take damage for this, using this command:
Only using NoAI won't keep it in place 100% of the time. It will disable it's AI but it can still be pushed by other entities, like the player, and objects, like water and pistons. If you want to completely disable it's movement you will either have to make it a passenger of an entity which cannot be moved or constantly teleport it to an entity which cannot be moved. Two examples of entities which cannot be moved are AreaEffectClouds and NoGravity ArmorStands. If you set the skeleton as the passenger then you wont have to worry about any extra commands running, however the skeletons feet stick out due to it riding the entity. If you teleport it to the entity then you don't have to worry about the feet issue but it also means you have one extra command running.
I'm creating a cannon using Ender Crystals and need a test subject that is not a player. I tried spawning a skeleton that cannot move or take damage for this, using this command:
/summon Skeleton 48 75 257 {ActiveEffects:[{Id:2,Amplifier:255,Duration:10000000}][{Id:11,Amplifier:5,Duration:10000000}]}
Doesn't seem to be working. Help?
Thank you!
Only using NoAI won't keep it in place 100% of the time. It will disable it's AI but it can still be pushed by other entities, like the player, and objects, like water and pistons. If you want to completely disable it's movement you will either have to make it a passenger of an entity which cannot be moved or constantly teleport it to an entity which cannot be moved. Two examples of entities which cannot be moved are AreaEffectClouds and NoGravity ArmorStands. If you set the skeleton as the passenger then you wont have to worry about any extra commands running, however the skeletons feet stick out due to it riding the entity. If you teleport it to the entity then you don't have to worry about the feet issue but it also means you have one extra command running.
An example: /summon ArmorStand ~ ~-1 ~ {Passengers:[{"id:Skeleton"}]}
That should work in this situation.