Jump to content

[1.7.10] Entity: disabling other AI when using custom AI [Unsolved]


larsgerrits

Recommended Posts

Hello, I added a new entity with some custom ai, and that works. But when my entity is using my custom ai, it is still going to walk away and screw up my custom AI. Does anyone know how to fix that?

 

My code is here. If anyone needs more info, please ask, I'll be happy to provide that.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

My entity extend EntityCreature, and this are the AI tasks:

this.tasks.addTask(0, new EntityAISwimming(this));
        this.tasks.addTask(1, new EntityAIRobotBuild(this));
        this.tasks.addTask(2, new EntityAIWander(this, 1.0D));
        this.tasks.addTask(3, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
        this.tasks.addTask(4, new EntityAILookIdle(this));

The thing i want is that when the EntityAIRobotBuild is running, i don't want the EntityAIWander to execute, as that messes up the placement of the blocks. If you want to see more code, like EntityAIRobotBuild, you can use the link in the main post to go to my GitHub.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

You may want to see my tutorial on custom entity AI.  http://jabelarminecraft.blogspot.com/p/minecraft-forge-1721710-custom-entity-ai.html

 

Overall, it is a bit complicated but there is a priority system and a masking system (mutexbits).  With the masks you can make it so that certain AI can't be run while certain other AI is running.  I try to explain this in my tutorial.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

I now about the prioroty system, but that doesn't have anything to do with this. About the mutex bits: How can i make it compatible with swimming, but not with wander? You don't specify it in the list.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Does anyone know of a mutex bit so that my AI is compatible with swimming, but not with wander?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.