2016-02-29 22:32:46 +01:00
|
|
|
--- a/net/minecraft/server/EntityShulkerBullet.java
|
|
|
|
+++ b/net/minecraft/server/EntityShulkerBullet.java
|
2018-07-15 02:00:00 +02:00
|
|
|
@@ -42,8 +42,29 @@
|
2016-02-29 22:32:46 +01:00
|
|
|
this.target = entity;
|
|
|
|
this.c = EnumDirection.UP;
|
|
|
|
this.a(enumdirection_enumaxis);
|
|
|
|
+ projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
|
|
|
|
}
|
|
|
|
|
2016-03-06 04:56:09 +01:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ public EntityLiving getShooter() {
|
|
|
|
+ return this.shooter;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setShooter(EntityLiving e) {
|
|
|
|
+ this.shooter = e;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public Entity getTarget() {
|
|
|
|
+ return this.target;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setTarget(Entity e) {
|
|
|
|
+ this.target = e;
|
|
|
|
+ this.c = EnumDirection.UP;
|
|
|
|
+ this.a(EnumDirection.EnumAxis.X);
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
+
|
2018-07-15 02:00:00 +02:00
|
|
|
public SoundCategory bV() {
|
|
|
|
return SoundCategory.HOSTILE;
|
|
|
|
}
|
2017-08-02 10:05:28 +02:00
|
|
|
@@ -287,6 +308,7 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
protected void a(MovingObjectPosition movingobjectposition) {
|
|
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Craftbukkit - Call event
|
|
|
|
if (movingobjectposition.entity == null) {
|
2018-07-15 02:00:00 +02:00
|
|
|
((WorldServer) this.world).a(Particles.u, this.locX, this.locY, this.locZ, 2, 0.2D, 0.2D, 0.2D, 0.0D);
|
|
|
|
this.a(SoundEffects.ENTITY_SHULKER_BULLET_HIT, 1.0F, 1.0F);
|
2018-07-20 08:04:37 +02:00
|
|
|
@@ -296,7 +318,7 @@
|
|
|
|
if (flag) {
|
|
|
|
this.a(this.shooter, movingobjectposition.entity);
|
|
|
|
if (movingobjectposition.entity instanceof EntityLiving) {
|
|
|
|
- ((EntityLiving) movingobjectposition.entity).addEffect(new MobEffect(MobEffects.LEVITATION, 200));
|
|
|
|
+ ((EntityLiving) movingobjectposition.entity).addEffect(new MobEffect(MobEffects.LEVITATION, 200), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|