2016-02-29 22:32:46 +01:00
|
|
|
--- a/net/minecraft/server/EntityShulkerBullet.java
|
|
|
|
+++ b/net/minecraft/server/EntityShulkerBullet.java
|
2019-04-23 04:00:00 +02:00
|
|
|
@@ -40,8 +40,29 @@
|
2016-02-29 22:32:46 +01:00
|
|
|
this.target = entity;
|
2019-04-23 04:00:00 +02:00
|
|
|
this.dir = EnumDirection.UP;
|
2016-02-29 22:32:46 +01:00
|
|
|
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;
|
2019-04-23 04:00:00 +02:00
|
|
|
+ this.dir = EnumDirection.UP;
|
2016-03-06 04:56:09 +01:00
|
|
|
+ this.a(EnumDirection.EnumAxis.X);
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
+
|
2019-04-23 04:00:00 +02:00
|
|
|
@Override
|
|
|
|
public SoundCategory getSoundCategory() {
|
2018-07-15 02:00:00 +02:00
|
|
|
return SoundCategory.HOSTILE;
|
2019-12-10 23:00:00 +01:00
|
|
|
@@ -298,6 +319,7 @@
|
2017-08-02 10:05:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected void a(MovingObjectPosition movingobjectposition) {
|
2020-02-02 01:18:17 +01:00
|
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // CraftBukkit - Call event
|
2019-04-23 04:00:00 +02:00
|
|
|
if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
|
|
|
|
Entity entity = ((MovingObjectPositionEntity) movingobjectposition).getEntity();
|
|
|
|
boolean flag = entity.damageEntity(DamageSource.a(this, this.shooter).c(), 4.0F);
|
2019-12-10 23:00:00 +01:00
|
|
|
@@ -305,7 +327,7 @@
|
2018-07-20 08:04:37 +02:00
|
|
|
if (flag) {
|
2019-04-23 04:00:00 +02:00
|
|
|
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
|
2018-07-20 08:04:37 +02:00
|
|
|
}
|
|
|
|
}
|
2019-04-23 04:00:00 +02:00
|
|
|
} else {
|