@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/EntityShulkerBullet.java
|
||||
+++ b/net/minecraft/server/EntityShulkerBullet.java
|
||||
@@ -40,8 +40,29 @@
|
||||
@@ -34,8 +34,21 @@
|
||||
this.target = entity;
|
||||
this.dir = EnumDirection.UP;
|
||||
this.a(enumdirection_enumaxis);
|
||||
@@ -8,14 +8,6 @@
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public EntityLiving getShooter() {
|
||||
+ return this.shooter;
|
||||
+ }
|
||||
+
|
||||
+ public void setShooter(EntityLiving e) {
|
||||
+ this.shooter = e;
|
||||
+ }
|
||||
+
|
||||
+ public Entity getTarget() {
|
||||
+ return this.target;
|
||||
+ }
|
||||
@@ -30,20 +22,12 @@
|
||||
@Override
|
||||
public SoundCategory getSoundCategory() {
|
||||
return SoundCategory.HOSTILE;
|
||||
@@ -298,6 +319,7 @@
|
||||
}
|
||||
|
||||
protected void a(MovingObjectPosition movingobjectposition) {
|
||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // CraftBukkit - Call event
|
||||
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|
||||
Entity entity = ((MovingObjectPositionEntity) movingobjectposition).getEntity();
|
||||
boolean flag = entity.damageEntity(DamageSource.a(this, this.shooter).c(), 4.0F);
|
||||
@@ -305,7 +327,7 @@
|
||||
if (flag) {
|
||||
this.a(this.shooter, entity);
|
||||
if (entity instanceof EntityLiving) {
|
||||
- ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.LEVITATION, 200));
|
||||
+ ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.LEVITATION, 200), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
|
||||
}
|
||||
@@ -255,7 +268,7 @@
|
||||
if (flag) {
|
||||
this.a(entityliving, entity);
|
||||
if (entity instanceof EntityLiving) {
|
||||
- ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.LEVITATION, 200));
|
||||
+ ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.LEVITATION, 200), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
|
||||
}
|
||||
} else {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user