2016-02-29 22:32:46 +01:00
|
|
|
--- a/net/minecraft/server/EntityShulkerBullet.java
|
|
|
|
+++ b/net/minecraft/server/EntityShulkerBullet.java
|
2020-06-25 02:00:00 +02:00
|
|
|
@@ -34,8 +34,21 @@
|
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 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;
|
2020-08-11 23:00:00 +02:00
|
|
|
@@ -256,7 +269,7 @@
|
2020-06-25 02:00:00 +02:00
|
|
|
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
|
2018-07-20 08:04:37 +02:00
|
|
|
}
|
2020-06-25 02:00:00 +02:00
|
|
|
}
|
|
|
|
|
2020-09-06 10:13:21 +02:00
|
|
|
@@ -282,6 +295,11 @@
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean damageEntity(DamageSource damagesource, float f) {
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false)) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
if (!this.world.isClientSide) {
|
|
|
|
this.playSound(SoundEffects.ENTITY_SHULKER_BULLET_HURT, 1.0F, 1.0F);
|
|
|
|
((WorldServer) this.world).a(Particles.CRIT, this.locX(), this.locY(), this.locZ(), 15, 0.2D, 0.2D, 0.2D, 0.0D);
|