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

Hi,

 

I have spent the last couple of days researching and trying to learn/figure out ways of dealing with changing the detection range on mobs.

 

I believe that this is handled through EntityMob, Specifically:

 

protected Entity findPlayerToAttack()

    {

        EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);

        return entityplayer != null && this.canEntityBeSeen(entityplayer) ? entityplayer : null;

    }

 

I blieve there is also a pathing distance I will need to look in to as well.

 

Anyhow my question is: How in the world do I go about changing the aggro range on mobs. If my assumption is right then it is currently set at 16 according to entitymob. I could be entirely wrong I guess. (Zombies in 1.6 for example have an insane aggro range now and I am still looking to figure out why that is).

 

Any help or pointers in the right direction is greatly appreciated.

  • 7 years later...
On 8/11/2013 at 9:34 PM, diesieben07 said:

FollowRange is handled by the new Attribute system as of 1.6.

In EntityLivingBase there is func_110147_ax which I would translate as "initAttributes".

In EntityZombie it has this line:

this.func_110148_a(SharedMonsterAttributes.field_111265_b).func_111128_a(40.0D);

Which I would translate as:

getAttribute(SharedMonsterAttributes.followRange).setValue(40.0D);

 

can u use this to modify followrange in a command block

 

  • Guest locked this topic
Guest
This topic is now closed to further replies.

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.