Hey dudes, what's up? I'm working on a mod that has multiple entities(EntityHerobrine and EntityHerobrineMinion), but for some reason, whenever I try to spawn one, it always spawns EntityHerobrine.
public class EntityHerobrine extends EntityMob implements IBossDisplayData
{
public static String Herobrine;
public EntityHerobrine(World world)
{
super(world);
this.getNavigator().setBreakDoors(false);
this.isImmuneToFire = true;
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAIOpenDoor(this, true));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
}
public void onLivingUpdate()
{
super.onLivingUpdate();
BossStatus.setBossStatus(this, true);
}
}
EntityHerobrineMinion:
public class EntityHerobrineMinion extends EntityMob
{
public EntityHerobrineMinion(World world)
{
super(world);
this.getNavigator().setBreakDoors(false);
this.isImmuneToFire = false;
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityVillager.class, 1.0D, false));
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAIOpenDoor(this, true));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.tasks.addTask(8, new EntityAIRedstoneTorch(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, true));
}
Entity registries:
EntityRegistry.registerModEntity(EntityHerobrineMinion.class, "herobrineminion", 0, this, 120, 3, false);
EntityHerobrine:
{
public static String Herobrine;
public EntityHerobrine(World world)
{
super(world);
this.getNavigator().setBreakDoors(false);
this.isImmuneToFire = true;
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAIOpenDoor(this, true));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
}
@Override
public void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(15.0D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(30.0D);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(2000.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(110.0D);
}
public void onLivingUpdate()
{
super.onLivingUpdate();
BossStatus.setBossStatus(this, true);
}
}
EntityHerobrineMinion:
{
public EntityHerobrineMinion(World world)
{
super(world);
this.getNavigator().setBreakDoors(false);
this.isImmuneToFire = false;
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
this.tasks.addTask(3, new EntityAIAttackOnCollide(this, EntityVillager.class, 1.0D, false));
this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
this.tasks.addTask(6, new EntityAIOpenDoor(this, true));
this.tasks.addTask(7, new EntityAILookIdle(this));
this.tasks.addTask(8, new EntityAIRedstoneTorch(this));
this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, 0, true));
}
@Override
public void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(10.0D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(13.0D);
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(555.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(110.0D);
}
}
Hope someone can help me fix this, thanks in advance!