PaperMC/nms-patches/EntityLlamaSpit.patch

20 lines
783 B
Diff
Raw Normal View History

2016-11-17 02:41:03 +01:00
--- a/net/minecraft/server/EntityLlamaSpit.java
+++ b/net/minecraft/server/EntityLlamaSpit.java
@@ -7,7 +7,7 @@
public class EntityLlamaSpit extends Entity implements IProjectile {
- public EntityLlama shooter;
+ public EntityLiving shooter; // CraftBukkit - type
private NBTTagCompound b;
public EntityLlamaSpit(World world) {
@@ -143,6 +143,7 @@
}
public void a(MovingObjectPosition movingobjectposition) {
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Craftbukkit - Call event
if (movingobjectposition.entity != null && this.shooter != null) {
2018-07-15 02:00:00 +02:00
movingobjectposition.entity.damageEntity(DamageSource.a(this, (EntityLiving) this.shooter).c(), 1.0F);
}