Started by
loressa
on
Topic category: Troubleshooting, bugs, and solutions
I'm trying to make aggressive mobs. I make them monsters and mobs not creatures and customize the AI so they act agressively against players with a task priority of 10. I also add wandering, looking around and swimming.
When I play them in Minecraft in survival mode, they are not agressive! I checked that it is not peaceful too.
I've tried in MCreator 167, 163 and the old 159 but still no agressive mobs.
What am I missing?
Try This:
Run the newest version, go into the AI tasks>Act agressivly to> EntityPlayer
if even says this in the information box next to it.
did you make sure that you set the type to mob? if it is flying, it is automaticcaly peaceful, which I think is kind of stupid. anyway, that, or havng a task equal or higher then act agressively against will do it.
Thanks guys.
I've actually tested all those things - set to 'mod', act agressive against player + 10 etc. I've even checked the code and it's correct. I've also checked all versions of MCreator with a Mac and PC. It only seems to work if I make it a known mob like a zombie etc, but you get their attributes.
Anyway, I've gone and made a non-aggressive mod - The Candy Boy mod! Uploaded it today on this site.
@#3 How many "task points" you've setted on the other tasks (wander, look around etc.)?
Tasks:
Agressive against Player - priority 10
Wander - priority 5
Look Around - priority 5
Swimming - priority 5
I also tested all to divide into 10
Say Aggressive against Player - 7
Wander - 1
Look Around - 1
Swimming - 1
For some reason in versions a year or two ago, before I even added priorities it seemed to work...
@#4 Just weird D:
For me it always worked fine
Can I see the code of your mob?
I guess this part?
public static class Entitytest extends EntityMob
{
World world = null;
public Entitytest(World var1)
{
super(var1);
world = var1;
experienceValue = 5;
this.isImmuneToFire = false;
addRandomArmor();
this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 2, true));
this.targetTasks.addTask(11, new EntityAIHurtByTarget(this, false));
this.tasks.addTask(5, new EntityAIWander(this, 0.8D));
this.tasks.addTask(5, new EntityAILookIdle(this));
this.tasks.addTask(5, new EntityAISwimming(this));
}
protected void applyEntityAttributes(){
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(10D);
if(this.getEntityAttribute(SharedMonsterAttributes.attackDamage)!=null)this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3D);
}
nothing works for me! :(
@#5 you are online! can you help me?
Add the AI task "Attack on collide"
Trust me. Aggresive mobs have to have attack on collide AND Act aggressively against tasks enabled
If the mod does ranged attacks, you need to use the ranged attack option without using the Attack on collide AI task. I don't know if you can make a mob that does bith ranged and colliding attacks