Mobs not agressive

Started by loressa on

Topic category: Troubleshooting, bugs, and solutions

Active 3 months ago
Joined Feb 2016
Points:
762

User statistics:

  • Modifications: 2
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
Mobs not agressive

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?

Active 7 years ago
Joined May 2016
Points:
702

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
Try This:
Tue, 05/31/2016 - 23:52

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.

Active 3 years ago
Joined May 2016
Points:
756

User statistics:

  • Modifications: 2
  • Forum topics: 5
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 18
did you make sure that you
Wed, 06/01/2016 - 00:17

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.

Active 3 months ago
Joined Feb 2016
Points:
762

User statistics:

  • Modifications: 2
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
Thanks guys.
Thu, 09/08/2016 - 03:14

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.

 

Active 5 years ago
Joined Aug 2014
Points:
909

User statistics:

  • Modifications: 1
  • Forum topics: 16
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 204
RE:Thanks guys.
Thu, 09/08/2016 - 08:49

@#3 How many "task points" you've setted on the other tasks (wander, look around etc.)?

Active 3 months ago
Joined Feb 2016
Points:
762

User statistics:

  • Modifications: 2
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
Tasks:
Thu, 09/08/2016 - 10:18

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...

 

Active 5 years ago
Joined Aug 2014
Points:
909

User statistics:

  • Modifications: 1
  • Forum topics: 16
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 204
RE:Tasks:
Thu, 09/08/2016 - 11:43

@#4 Just weird D: 

For me it always worked fine

Active 9 months ago
Joined Aug 2013
Points:
1161

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
Can I see the code of your
Thu, 09/08/2016 - 15:54

Can I see the code of your mob?

Active 3 months ago
Joined Feb 2016
Points:
762

User statistics:

  • Modifications: 2
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 14
I guess this part?
Fri, 09/09/2016 - 00:31

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);
}

Active 6 years ago
Joined Nov 2015
Points:
708

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
nothing works for me! :(
Mon, 10/16/2017 - 13:07

nothing works for me! :(

Active 6 years ago
Joined Nov 2015
Points:
708

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
RE:Can I see the code of your
Mon, 10/16/2017 - 13:10

@#5  you are online! can you help me?

Active 5 years ago
Joined Apr 2016
Points:
989

User statistics:

  • Modifications: 4
  • Forum topics: 22
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 273
Add the AI task "Attack on
Tue, 10/17/2017 - 11:54

Add the AI task "Attack on collide"

Trust me. Aggresive mobs have to have attack on collide AND Act aggressively against tasks enabled

Active 3 years ago
Joined Jun 2016
Points:
3742

User statistics:

  • Modifications: 10
  • Forum topics: 39
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5492
RE:Add the AI task "Attack on
Tue, 10/17/2017 - 13:33

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