Posted May 15, 201312 yr Hi. Is there a way to change the mob attack range? Right now, they attack if you are in a 16 radius. I want mobs to attack you in a, lets say, 20 radius when sprinting. I've tried some things without succes. This is in the EntityMob class: protected Entity findPlayerToAttack() { EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D); return entityplayer != null && this.canEntityBeSeen(entityplayer) ? entityplayer : null; } It should be done in this: @ForgeSubscribe public void playerSprinting(LivingUpdateEvent event){ if (event.entityLiving.isSprinting()){ } }
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.