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.

Featured Replies

Posted

So my problem is that my Entity does not attack. Its not just dealing no damage it does not even move towards the target or do anything at all really.

 

Entity: https://pastebin.com/d9dAzjM0

EntityNeutral: https://pastebin.com/R2R1Raqx

WalkHomeAi: https://pastebin.com/1ECiWBsD

AttackAI: https://pastebin.com/08Xvq8tt

 

But i dont think it is a problem with my AI since i also tried Minecrafts AIs EntityAIHurtByTarget and EntityAINearestAttackableTarget and they didnt work either. I also used System.out.println to see if the setattacktarget method of my entity is called and it does get called.

Edited by Robertusxd

  • Author
15 minutes ago, Dustpuppy said:

Try to set attrib Attack_Speed

 

i tried it but it didnt change anything :/

You're in survival mode right? I know I added a mob tinkering around one time, and it didn't do much because I was in creative mode. After I switched it to SV, the 20 or so mobs I had spawned all bumrushed me at once. . .

  • Author
32 minutes ago, Ugdhar said:

You're in survival mode right? I know I added a mob tinkering around one time, and it didn't do much because I was in creative mode. After I switched it to SV, the 20 or so mobs I had spawned all bumrushed me at once. . .

yes im in survival mode

as i said the setAttackTarget method of the entity gets called but the entity does not react to it.

You never seem to set any actual attack AI. The targeting AI just sets the target but doesn't do any movement or attack. You need something like EntityAIAttackMelee() also added to the tasks list. In other words, the targeting and the actual attack are meant to be separate AI and if you want the entity to move towards the target you need to add that AI as well.

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

  • Author
7 hours ago, jabelar said:

You never seem to set any actual attack AI. The targeting AI just sets the target but doesn't do any movement or attack. You need something like EntityAIAttackMelee() also added to the tasks list. In other words, the targeting and the actual attack are meant to be separate AI and if you want the entity to move towards the target you need to add that AI as well.

you are my hero right now, thank you so much

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.