I have one of those mazes where you guide an animal through a maze under your feet. However, I'm using two animals: a chicken and a pig. The problem is that when I move one animal, the other animal begins to wander and trigger things it isn't supposed to. So I figured I'd just use some simple entitydata commands to fix the problem. However, I'm running into issues...
Hypothetically speaking, this would turn off the pig's AI and turn on the chicken's AI while the player is holding seeds, and vice versa while the player is holding a carrot. However, the chicken just flat-out has no AI and I can't lead it with the seeds, and the pig works one time but won't switch when I toggle items. I spawn the animals in with NoAi:1b already in place.
Help? I don't understand why this isn't working...
I have one of those mazes where you guide an animal through a maze under your feet. However, I'm using two animals: a chicken and a pig. The problem is that when I move one animal, the other animal begins to wander and trigger things it isn't supposed to. So I figured I'd just use some simple entitydata commands to fix the problem. However, I'm running into issues...
I have the following system set up:
Repeating command block (always active): /testfor @p {SelectedItem:{id:"minecraft:carrot"}}
Chain command block (conditional): /entitydata @e[type=Pig] {NoAi:0}
Chain command block (conditional): /entitydata @e[type=Chicken] {NoAi:1b}
And a similar system nearby:
Repeating command block (always active): /testfor @p {SelectedItem:{id:"minecraft:wheat_seeds"}}
Chain command block (conditional): /entitydata @e[type=Pig] {NoAi:1b}
Chain command block (conditional): /entitydata @e[type=Chicken] {NoAi:0}
Hypothetically speaking, this would turn off the pig's AI and turn on the chicken's AI while the player is holding seeds, and vice versa while the player is holding a carrot. However, the chicken just flat-out has no AI and I can't lead it with the seeds, and the pig works one time but won't switch when I toggle items. I spawn the animals in with NoAi:1b already in place.
Help? I don't understand why this isn't working...
That was it! *Derp...* Thanks for the help!