Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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!

Moved to modder support if you say its not your code then remove your code from the equation and present it as a Forge bug.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author

-.- I just put it there, because if i don't then others will ask for it.

But okey i will try to present it again.

 

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.