mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 02:20:01 +03:00
45 lines
1.7 KiB
Diff
45 lines
1.7 KiB
Diff
--- ../src-base/minecraft/net/minecraft/entity/projectile/EntityThrowable.java
|
|
+++ ../src-work/minecraft/net/minecraft/entity/projectile/EntityThrowable.java
|
|
@@ -31,8 +31,8 @@
|
|
private Block inTile;
|
|
protected boolean inGround;
|
|
public int throwableShake;
|
|
- protected EntityLivingBase thrower;
|
|
- private String throwerName;
|
|
+ public EntityLivingBase thrower;
|
|
+ public String throwerName;
|
|
private int ticksInGround;
|
|
private int ticksInAir;
|
|
public Entity ignoreEntity;
|
|
@@ -57,6 +57,7 @@
|
|
{
|
|
this(worldIn, throwerIn.posX, throwerIn.posY + (double)throwerIn.getEyeHeight() - 0.10000000149011612D, throwerIn.posZ);
|
|
this.thrower = throwerIn;
|
|
+ this.projectileSource = (org.bukkit.entity.LivingEntity) throwerIn.getBukkitEntity();
|
|
}
|
|
|
|
protected void entityInit()
|
|
@@ -196,7 +197,7 @@
|
|
{
|
|
flag = true;
|
|
}
|
|
- else if (this.thrower != null && this.ticksExisted < 2 && this.ignoreEntity == null)
|
|
+ else if (this.thrower != null && this.ticksExisted < 2 && this.ignoreEntity == null && this.thrower == entity1) // CraftBukkit - MC-88491
|
|
{
|
|
this.ignoreEntity = entity1;
|
|
flag = true;
|
|
@@ -244,9 +245,12 @@
|
|
{
|
|
this.setPortal(raytraceresult.getBlockPos());
|
|
}
|
|
- else
|
|
+ else if (!net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, raytraceresult))
|
|
{
|
|
this.onImpact(raytraceresult);
|
|
+ if (this.isDead) {
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, raytraceresult);
|
|
+ }
|
|
}
|
|
}
|
|
|