MinecraftForge/MinecraftForge — pull request #1430 by coolAlias (2014-09-25 03:20:24+00:00)
Title: Add post-teleport event

Requires a single edit to EntityEnderman class in the teleportTo method on line 372, just before returning 'true':
MinecraftForge.EVENT_BUS.post(new PostEnderTeleport(this, d3, d4, d5, 0));

And a few extra lines in EntityEnderPearl:
// before setting new position:
double x = this.getThrower().posX;
double y = this.getThrower().posY;
double z = this.getThrower().posZ;
// unchanged from current patch:
this.getThrower().setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
// one more new line:
MinecraftForge.EVENT_BUS.post(new PostEnderTeleport(this.getThrower(), x, y, z, event.attackDamage));
// rest is unchanged