Quantcast
Channel: MythicCraft
Viewing all articles
Browse latest Browse all 11417

Mob custom melee attack radius

$
0
0
Code:
Options:
  AttackRadius: 15
Sets the attack radius of mob.
Implementation example (spigot 1.9.4, NMS v1_9_R2):
Override method a(EntityLiving) of class PathfinderGoalMeleeAttack:
Code:
protected double a(EntityLiving var1) {
    return (double)(this.b.width * 2.0F * this.b.width * 2.0F + var1.width);
}
replace with:
Code:
protected double a(EntityLiving var1) {
    return 15.0D; //attackRadius from mob config
}

Viewing all articles
Browse latest Browse all 11417

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>