I Found some of the code parts you were talking about, and implemented them into my code, but i have a small problem with 'this.damageEntity', which is giving the error 'Entity Living Base is not applicable for the arguments (EntityPlayer, float)
public class Jeff extends EntityMob
{
private EntityPlayer player;
private int explosionRadius = 3;
protected void initEntityAI()
{
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, 6.0F));
this.tasks.addTask(2, new EntityAILookIdle(this));
this.tasks.addTask(3, new EntityAIOpenDoor(this, false));
}
public float getEyeHeight()
{
return 0.5F;
}
protected void applyEntityAttributes()
{
this.getCreatureAttribute();
this.getCreatureAttribute();
}
protected Jeff(EntityType<?> type, World p_i48553_2_)
{
super(type, p_i48553_2_);
this.getAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.25D);
}
public boolean attackEntityFrom(DamageSource source, float amount)
{
if (this.damageEntity(this.player, amount))
{
return true;
World createExplosion;
}
else
{
return false;
}
}
}