@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/server/EntityArrow.java
|
||||
+++ b/net/minecraft/server/EntityArrow.java
|
||||
@@ -4,6 +4,12 @@
|
||||
import com.google.common.base.Predicates;
|
||||
@@ -5,6 +5,12 @@
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import org.bukkit.entity.LivingEntity;
|
||||
@@ -13,7 +13,7 @@
|
||||
public abstract class EntityArrow extends Entity implements IProjectile {
|
||||
|
||||
private static final Predicate<Entity> f = Predicates.and(new Predicate[] { IEntitySelector.e, IEntitySelector.a, new Predicate() {
|
||||
@@ -49,6 +55,7 @@
|
||||
@@ -50,6 +56,7 @@
|
||||
public EntityArrow(World world, EntityLiving entityliving) {
|
||||
this(world, entityliving.locX, entityliving.locY + (double) entityliving.getHeadHeight() - 0.10000000149011612D, entityliving.locZ);
|
||||
this.shooter = entityliving;
|
||||
@@ -21,7 +21,7 @@
|
||||
if (entityliving instanceof EntityHuman) {
|
||||
this.fromPlayer = EntityArrow.PickupStatus.ALLOWED;
|
||||
}
|
||||
@@ -228,7 +235,7 @@
|
||||
@@ -229,7 +236,7 @@
|
||||
|
||||
protected void a(MovingObjectPosition movingobjectposition) {
|
||||
Entity entity = movingobjectposition.entity;
|
||||
@@ -30,7 +30,7 @@
|
||||
if (entity != null) {
|
||||
float f = MathHelper.sqrt(this.motX * this.motX + this.motY * this.motY + this.motZ * this.motZ);
|
||||
int i = MathHelper.f((double) f * this.damage);
|
||||
@@ -245,11 +252,18 @@
|
||||
@@ -246,11 +253,18 @@
|
||||
damagesource = DamageSource.arrow(this, this.shooter);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if (entity instanceof EntityLiving) {
|
||||
EntityLiving entityliving = (EntityLiving) entity;
|
||||
|
||||
@@ -395,6 +409,20 @@
|
||||
@@ -397,6 +411,20 @@
|
||||
|
||||
public void d(EntityHuman entityhuman) {
|
||||
if (!this.world.isClientSide && this.inGround && this.shake <= 0) {
|
||||
@@ -72,7 +72,7 @@
|
||||
boolean flag = this.fromPlayer == EntityArrow.PickupStatus.ALLOWED || this.fromPlayer == EntityArrow.PickupStatus.CREATIVE_ONLY && entityhuman.abilities.canInstantlyBuild;
|
||||
|
||||
if (this.fromPlayer == EntityArrow.PickupStatus.ALLOWED && !entityhuman.inventory.pickup(this.j())) {
|
||||
@@ -453,6 +481,12 @@
|
||||
@@ -455,6 +483,12 @@
|
||||
return (b0 & 1) != 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user