mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 02:20:01 +03:00
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/projectile/EntityLlamaSpit.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/projectile/EntityLlamaSpit.java
|
|
@@ -5,6 +5,7 @@
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.entity.Entity;
|
|
+import net.minecraft.entity.EntityLivingBase;
|
|
import net.minecraft.entity.IProjectile;
|
|
import net.minecraft.entity.passive.EntityLlama;
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
@@ -20,7 +21,7 @@
|
|
|
|
public class EntityLlamaSpit extends Entity implements IProjectile
|
|
{
|
|
- public EntityLlama owner;
|
|
+ public EntityLivingBase owner; // CraftBukkit - type EntityLlama -> EntityLivingBase
|
|
private NBTTagCompound ownerNbt;
|
|
|
|
public EntityLlamaSpit(World worldIn)
|
|
@@ -80,7 +81,7 @@
|
|
raytraceresult = new RayTraceResult(entity);
|
|
}
|
|
|
|
- if (raytraceresult != null)
|
|
+ if (raytraceresult != null && !net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, raytraceresult))
|
|
{
|
|
this.onHit(raytraceresult);
|
|
}
|
|
@@ -211,6 +212,7 @@
|
|
|
|
public void onHit(RayTraceResult p_190536_1_)
|
|
{
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, p_190536_1_);
|
|
if (p_190536_1_.entityHit != null && this.owner != null)
|
|
{
|
|
p_190536_1_.entityHit.attackEntityFrom(DamageSource.causeIndirectDamage(this, this.owner).setProjectile(), 1.0F);
|