Entity Door AI Tasks Seem Buggy

Published by JiggyKoopa on
Status
Resolved
Issue description

Entities with door AI tasks don't really seem to be capable of correctly interacting with doors. Sorry if this counts as a request list, but I figured since they all have to do with how an entity interacts with doors that they all fall under the same umbrella, so making multiple issues would be a waste of everyone's time. I'm also aware that there was another post like this, but it was never solved or even acknowledged by devs. And sorry for the wall of text, but I felt it might be helpful if I share my experimentation to show I didn't simply do it wrong. Skip to the bold text if you don't really care about the experiments.

First I noticed that they have to be in a group of 3 or greater to break down doors and the game has to be set to hard difficulty.
Second thing I noticed is that their AI doesn't consider the door their goal. If they happen to be piled up in front of the door, they'll start to break it, but if one of them walks off at all before the door is broken, it stops.

While testing whether entities open doors or not, I created a prison of wooden doors with 1 x 2 x 1 open blocks in the middle and put an entity in it which had 'open doors' as the highest on the list, 'close doors' second in line, and wander as the third. Nothing happened. I bumped it up to 7 cells, and left some unenclosed to wander around, and none of them ever bothered to open any of the doors.

I did discover that when the door opening entity had another entity as an attack target, and the target entity wandered into the cluster of door cells, the attacking entity would open any door it happened to be standing near when its AI found the target entity, but only if there was a direct, uninterrupted path to the target. Attack entities with a door as an obstacle would attempt to attack the target entity, but wouldn't open the door to achieve that goal.

I think AI tasks in general need some attention, some functions just don't work as advertised, and I can create issue tickets for the AI Tasks that don't work properly, but for doors, I think the entity should treat the door as a path goal, and open it, or break it, when it reaches that goal.

While writing this, I managed to figure out how to get mobs to open doors. Minecraft counts a door as being open depending on the sound it makes. If the door is in the way, but is technically open, entities that open doors won't count it as closed, and won't open it.

Entities that were programmed to open and close doors would close an open door that was in the way and leave through it, but would refuse to open a closed door. However, if I opened the closed door for them, they'd walk over and close it. I couldn't get them to open a closed door that was in the way and leave through it, but they'd close a obstructing open door to leave without fail, even though 'open door' is much higher on the AI Task List than 'close door'. However, they would make the door make a bunch of noise before it finally moved to an unobstructive position and walk through.
The door prisons failed, because they were all closed doors, which the AI wouldn't open.

The entities programmed to break doors would break doors that weren't obstructing their path, and ignore ones that were. They were too inconsistent to really get nailed down what they would and wouldn't break, and what would cause them to break down a door when it was an obstruction. I noticed that some of them, while operating solo, would break down a door on their own, and those in groups would fail to break down a door, so I guess my observation on groups greater than 3 was based on a flawed guess.

Maybe it's not correct to have both open door and close door in an AI Task list. If so, I'm man enough to admit it's my bad, but how are we supposed to know that when some wiki pages are bare bones, and others are so out of date, they still refer to functions that don't exist anymore, or fail to make any mention of functions that were added in an update? The Mob AI wiki page doesn't even mention opening and closing doors. And even NorthWestTrees Gaming was unsuccessful at getting his mobs to break down doors in his tutorial.

My goal behind AI opening and closing doors is to make mobs that will try to seek shelter, open a door, go inside, and close it like villagers do. If that's not what open door, move inside if possible, and close door are meant for, then I'd be more than happy to make request ticket for a Seek Shelter If <Condition> task where they go inside and close the doors, or a Politeness AI task where they close any door they move through.

Issue comments

If so, I'm man enough to admit it's my bad, but how are we supposed to know that when some wiki pages are bare bones, and others are so out of date, they still refer to functions that don't exist anymore, or fail to make any mention of functions that were added in an update?

Feel free to request for wiki contributor and help out. MCreator is a free project driven by the community. Look, it is only me working on code parts and maintaining the whole website..

Doors AI is used directly from vanilla, just constructed, check the code. So it works the way MC devs designed it.

Seek Shelter If <Condition> task where they go inside and close the doors, or a Politeness AI task where they close any door they move through.

That would be custom AI tasks which is a bit out of scope at the moment, but if you are ready to help with this, fill out this form please: https://mcreator.net/forum/62785/survey-contributorsdevelopers-if-mcreator-would-go-open-source

It's just you? Well now I feel bad for getting so impatient with how long it takes for the features I need. I'm sorry man. I had no idea you were the only guy.

Feel free to request for wiki contributor and help out. MCreator is a free project driven by the community. Look, it is only me working on code parts and maintaining the whole website.

Are you asking me to become a wiki contributor? I mean, I suppose I could be, if that's what you're asking, but I don't know how everything functions. I'd need a list of each of the functions and their behaviors, and then I could write an in-depth wiki.

Example: Imitate overworld behavior, has skylight from sun, disable global light source, I still haven't been able to fully figure out what these do. But if I had an answer to those questions, I could write a detailed guide to its use.

 

That would be custom AI tasks which is a bit out of scope at the moment, but if you are ready to help with this

Can't say I'll be super helpful. But I can try. I'll go fill it out.

Are you asking me to become a wiki contributor? I mean, I suppose I could be, if that's what you're asking, but I don't know how everything functions. I'd need a list of each of the functions and their behaviors, and then I could write an in-depth wiki.

No need to rush, if you feel like it later down the road you can apply when you think you know enough for the wiki contributor ;) Thank you for your readiness to help :)

It's just you? Well now I feel bad for getting so impatient with how long it takes for the features I need. I'm sorry man. I had no idea you were the only guy.

Programming yes, but there are other people doing moderating and wiki pages too, check https://mcreator.net/team :D