cuberite / cuberite

A lightweight, fast and extensible game server for Minecraft

Home Page:https://cuberite.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not Tested: Enderpearl should not make damage to mob

tonitch opened this issue · comments

following the ender pearl page: https://minecraft.fandom.com/wiki/Ender_Pearl
there is a line at the end saying that the enderpearl should not make damage to other entities
image

by looking into the code for implementing endermite, i found that line

void cThrownEnderPearlEntity::OnHitEntity(cEntity & a_EntityHit, Vector3d a_HitPos)
{
Super::OnHitEntity(a_EntityHit, a_HitPos);
int Damage = 0;
if (a_EntityHit.IsEnderCrystal())
{
// Endercrystals are destroyed:
Damage = CeilC(a_EntityHit.GetHealth());
}
a_EntityHit.TakeDamage(dtRangedAttack, this, Damage, 1);
TeleportCreator(a_HitPos);
Destroy();
}

which state the oppposite

I don't know if this is an old behaviour or anything and I haven't tested anything. just droping an issue in case someone whould like to figure it out.

Sorry, my mistake.... I though the final 1 at Line 31 was the dammage but it's the knock back and the damage is clearly set to 0. which is the exact behaviour.

Gonna keep going on my own stuff then ^^

Now we are sure it's done correctly :D