Investigate Entity AI of Minecart Riding Entities for Issues
CovertJaguar opened this issue ยท 16 comments
As demonstrated in the following video, apparently non-player entities riding minecarts can now move the minecart randomly while doing so. They can do this even against the pull of a Locomotive.
Well first attempt is only partially successful. I disabled the AI tasks when riding, which works, pigs don't follow carrots anymore. However it doesn't seem to have stopped random wandering and running when hurt.
I don't actually know which code has authority over ridden entity control translation. Kind of hard to fix without knowing that.
damn should have reimplemented the pigs following carrots... i could have amde a nice minigame :P
The code is in EntityMinecart#update
block, which we have little control over. Thus, we cannot really fix this.
@CovertJaguar So what do we do on this?
By the way MinecraftForge/MinecraftForge#4665 may fix this issue once accepted.
I assume that fully Railcraft objects give one more control, so what about a "cage-cart" that disables riding NPCs' AI/movement?
Or if disabling AI/movement is not actually a thing, would it work to have a "cage-cart" that stores the entity, ala MFR safari-net, and then renders said stored entity to appear inside the cage?
At worst, I'm pretty sure that you can add an AI task that prevents movement tasks from executing.
@purpleposeidon yes, that's pretty simple actually