summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/EntityArrow.java4
-rw-r--r--src/main/java/net/minecraft/server/EntityEgg.java3
-rw-r--r--src/main/java/net/minecraft/server/EntityFireball.java3
-rw-r--r--src/main/java/net/minecraft/server/EntityFishingHook.java2
-rw-r--r--src/main/java/net/minecraft/server/EntitySmallFireball.java3
-rw-r--r--src/main/java/net/minecraft/server/EntitySnowball.java2
6 files changed, 8 insertions, 9 deletions
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 6124c651..e968d592 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -201,8 +201,7 @@ public class EntityArrow extends Entity {
// CraftBukkit start
boolean stick;
- if (entity instanceof EntityLiving) {
-
+ if (entity instanceof EntityLiving || entity instanceof EntityComplexPart) {
org.bukkit.entity.Entity damagee = movingobjectposition.entity.getBukkitEntity();
Projectile projectile = (Projectile) this.getBukkitEntity();
@@ -218,6 +217,7 @@ public class EntityArrow extends Entity {
} else {
stick = movingobjectposition.entity.damageEntity(damagesource, l);
}
+
if (stick) {
// CraftBukkit end
if (movingobjectposition.entity instanceof EntityLiving) {
diff --git a/src/main/java/net/minecraft/server/EntityEgg.java b/src/main/java/net/minecraft/server/EntityEgg.java
index 71fe425d..f3145561 100644
--- a/src/main/java/net/minecraft/server/EntityEgg.java
+++ b/src/main/java/net/minecraft/server/EntityEgg.java
@@ -8,7 +8,6 @@ import org.bukkit.entity.Projectile;
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
-import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.player.PlayerEggThrowEvent;
public class EntityEgg extends EntityProjectile {
@@ -29,7 +28,7 @@ public class EntityEgg extends EntityProjectile {
// CraftBukkit start
if (movingobjectposition.entity != null) {
boolean stick;
- if (movingobjectposition.entity instanceof EntityLiving) {
+ if (movingobjectposition.entity instanceof EntityLiving || movingobjectposition.entity instanceof EntityComplexPart) {
org.bukkit.entity.Entity damagee = movingobjectposition.entity.getBukkitEntity();
Projectile projectile = (Projectile) this.getBukkitEntity();
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index e507fb7b..4925dafc 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -5,7 +5,6 @@ import java.util.List;
// CraftBukkit start
import org.bukkit.Bukkit;
import org.bukkit.craftbukkit.entity.CraftEntity;
-import org.bukkit.craftbukkit.entity.CraftLivingEntity;
import org.bukkit.entity.Explosive;
import org.bukkit.entity.Projectile;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
@@ -189,7 +188,7 @@ public class EntityFireball extends Entity {
// CraftBukkit start
if (movingobjectposition.entity != null) {
boolean stick;
- if (movingobjectposition.entity instanceof EntityLiving) {
+ if (movingobjectposition.entity instanceof EntityLiving || movingobjectposition.entity instanceof EntityComplexPart) {
org.bukkit.entity.Entity damagee = movingobjectposition.entity.getBukkitEntity();
Projectile projectile = (Projectile) this.getBukkitEntity();
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index 653c751e..e8602b81 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -192,7 +192,7 @@ public class EntityFishingHook extends Entity {
if (movingobjectposition.entity != null) {
// CraftBukkit start
boolean stick;
- if (movingobjectposition.entity instanceof EntityLiving) {
+ if (movingobjectposition.entity instanceof EntityLiving || movingobjectposition.entity instanceof EntityComplexPart) {
org.bukkit.entity.Entity damagee = movingobjectposition.entity.getBukkitEntity();
Projectile projectile = (Projectile) this.getBukkitEntity();
diff --git a/src/main/java/net/minecraft/server/EntitySmallFireball.java b/src/main/java/net/minecraft/server/EntitySmallFireball.java
index f36af592..e33055dc 100644
--- a/src/main/java/net/minecraft/server/EntitySmallFireball.java
+++ b/src/main/java/net/minecraft/server/EntitySmallFireball.java
@@ -36,8 +36,8 @@ public class EntitySmallFireball extends EntityFireball {
boolean stick;
org.bukkit.entity.Entity damagee = movingEntity.getBukkitEntity();
Projectile projectile = (Projectile) this.getBukkitEntity();
- if (movingEntity instanceof EntityLiving) {
+ if (movingEntity instanceof EntityLiving || movingEntity instanceof EntityComplexPart) {
EntityDamageByEntityEvent event = new EntityDamageByEntityEvent(projectile, damagee, EntityDamageEvent.DamageCause.PROJECTILE, 5);
pluginManager.callEvent(event);
@@ -50,6 +50,7 @@ public class EntitySmallFireball extends EntityFireball {
} else {
stick = movingEntity.damageEntity(DamageSource.fireball(this, this.shooter), 5);
}
+
if (stick) {
// if the fireball 'sticks', ignite the target
EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(projectile, damagee, 5);
diff --git a/src/main/java/net/minecraft/server/EntitySnowball.java b/src/main/java/net/minecraft/server/EntitySnowball.java
index 5090077b..f935fbf0 100644
--- a/src/main/java/net/minecraft/server/EntitySnowball.java
+++ b/src/main/java/net/minecraft/server/EntitySnowball.java
@@ -34,7 +34,7 @@ public class EntitySnowball extends EntityProjectile {
boolean stick = false;
if (movingEntity != null) {
- if (movingEntity instanceof EntityLiving) {
+ if (movingEntity instanceof EntityLiving || movingEntity instanceof EntityComplexPart) {
org.bukkit.entity.Entity damagee = movingEntity.getBukkitEntity();
Projectile projectile = (Projectile) this.getBukkitEntity();