[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

@@ -3,6 +3,7 @@ package net.minecraft.server;
import java.util.List;
// CraftBukkit start
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
// CraftBukkit end
@@ -41,6 +42,7 @@ public class EntityArrow extends Entity implements IProjectile {
super(world);
this.k = 10.0D;
this.shooter = entityliving;
this.projectileSource = (LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
if (entityliving instanceof EntityHuman) {
this.fromPlayer = 1;
}
@@ -69,6 +71,7 @@ public class EntityArrow extends Entity implements IProjectile {
super(world);
this.k = 10.0D;
this.shooter = entityliving;
this.projectileSource = (LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
if (entityliving instanceof EntityHuman) {
this.fromPlayer = 1;
}