Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

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/

What entity did you extend?  did you remove its existing AI? 

 

I'm guessing this is your issue.  You probably extended a mob like a Zombie.

Long time Bukkit & Forge Programmer

Happy to try and help

  • Author

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/

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/

  • Author

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/

  • Author

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/

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.