[Bleeding] Implement ProjectileSource API. Addresses BUKKIT-1038, BUKKIT-1156

This commit is contained in:
t00thpick1
2014-01-20 00:03:21 -05:00
committed by Nate Mortensen
parent ac53442e7e
commit 8a5ad89a68
14 changed files with 277 additions and 33 deletions

View File

@@ -25,6 +25,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
public EntityProjectile(World world, EntityLiving entityliving) {
super(world);
this.shooter = entityliving;
this.projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
this.a(0.25F, 0.25F);
this.setPositionRotation(entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight(), entityliving.locZ, entityliving.yaw, entityliving.pitch);
this.locX -= (double) (MathHelper.cos(this.yaw / 180.0F * 3.1415927F) * 0.16F);