FOLLOW_RANGE not properly working in MCreator Snapshot?

Started by 0V3R10RD on Tue, 09/22/2020 - 23:52

Topic category: Help with modding (Java Edition)

Last seen on 13:40, 30. Oct 2020
Joined Sep 2020

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
FOLLOW_RANGE not properly working in MCreator Snapshot?
Tue, 09/22/2020 - 23:59 (edited)

Hi there, in my java code for my mob, I have inputted the following:

if (this.getAttribute(SharedMonsterAttributes.FOLLOW_RANGE) != null)

This should overwrite the default value of 16 blocks for follow range. This mob seems to stop following after the player moves 16 blocks away. I am using the latest MCreator snapshot version (2020.5 b35716). I have tried summoning my mob manually with /summon with a different specified follow_range with no effect.

/summon zombiex:zzombie ~ ~ ~ {Attributes:[{Name:"generic.follow_range", Base:100.0}]}

Additional Info: Behavior is set to Mob, Entity base is set to None with AI programming using the 'aggressive against player' preset, mob natural spawning is set to ambient, as I am trying to test around to get an enemy that can spawn in the daytime, evening, and night in various locations. If anyone has advice or tips on how to make a zombie-like mob that chases the player for extremely long ranges, let me know if I'm doing something wrong! 

EDIT: Solved. I didn't notice prior, I thought it was my own fault with forgetting to save, but every time I edited the mob file, the code would get reset removing the changes to my follow range attribute in the code and I had to re-add it. Oopsies! I'm silly.

Edited by 0V3R10RD on Tue, 09/22/2020 - 23:59