Jump to content

[1.7.10]Mob path find


FLUFFY2

Recommended Posts

Hi,

Why ALL and my custom doing that? My AI task are from the EntityZombie class.

So it should be some kind of bug.

 

http://youtu.be/JZHMXSgLJmI

 

EntityGrunt:

public class EntityGrunt extends EntityMob{

public boolean entered = false;

public EntityGrunt(World par1World) {
	super(par1World);

	this.getNavigator().setBreakDoors(true);
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, true));
	this.tasks.addTask(3, new AmnesiaEntityAIBreakDoor(this));
	this.tasks.addTask(4, new EntityAIMoveTowardsRestriction(this, 1.0D));
	this.tasks.addTask(5, new EntityAIWander(this, 0.6D));
	this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 10.0F));
	this.tasks.addTask(7, new EntityAILookIdle(this));
	this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
	this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
}

@Override
public void applyEntityAttributes()
{
	super.applyEntityAttributes();
	this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(80.0D);
	this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(20.0D);
	this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.35D);
	this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(1.0D);
	this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(5.0D);
}

@Override
public boolean isAIEnabled()
{
	return true;
}

@Override
public void onUpdate()
{
	super.onUpdate();

	if(!entered){
		entered = true;
		this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, "amnesia:grunt.Enabled", 2.0F, 1.0F);
	}
}

@Override
protected String getLivingSound()
{
	return "amnesia:grunt.Idle";
}

@Override
protected String getHurtSound()
{
	return "amnesia:grunt.Hurt";
}

@Override
protected String getDeathSound()
{
	return "amnesia:grunt.Dead";
}

@Override
protected void func_145780_a(int x, int y, int z, Block block)
{
	this.playSound("amnesia:grunt.Step", 0.6F, 1.0F);
}
}

 

I don't know what messed up the mobs AI but its realy annoying.

 

Lex please don't put this to modder support. It has nothing to do with my code, because all hostile mobs doing that.

Thanks!

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.