--- a/net/minecraft/world/entity/projectile/EntityArrow.java
+++ b/net/minecraft/world/entity/projectile/EntityArrow.java
@@ -51,6 +51,13 @@
 import net.minecraft.world.phys.Vec3D;
 import net.minecraft.world.phys.shapes.VoxelShape;
 
+// CraftBukkit start
+import net.minecraft.world.entity.item.EntityItem;
+import org.bukkit.event.entity.EntityCombustByEntityEvent;
+import org.bukkit.event.entity.EntityRemoveEvent;
+import org.bukkit.event.player.PlayerPickupArrowEvent;
+// CraftBukkit end
+
 public abstract class EntityArrow extends IProjectile {
 
     private static final double ARROW_BASE_DAMAGE = 2.0D;
@@ -88,7 +95,14 @@
     }
 
     protected EntityArrow(EntityTypes<? extends EntityArrow> entitytypes, double d0, double d1, double d2, World world, ItemStack itemstack, @Nullable ItemStack itemstack1) {
+        // CraftBukkit start - handle the owner before the rest of things
+        this(entitytypes, d0, d1, d2, world, itemstack, itemstack1, null);
+    }
+
+    protected EntityArrow(EntityTypes<? extends EntityArrow> entitytypes, double d0, double d1, double d2, World world, ItemStack itemstack, @Nullable ItemStack itemstack1, @Nullable EntityLiving ownerEntity) {
         this(entitytypes, world);
+        this.setOwner(ownerEntity);
+        // CraftBukkit end
         this.pickupItemStack = itemstack.copy();
         this.setCustomName((IChatBaseComponent) itemstack.get(DataComponents.CUSTOM_NAME));
         Unit unit = (Unit) itemstack.remove(DataComponents.INTANGIBLE_PROJECTILE);
@@ -114,8 +128,8 @@
     }
 
     protected EntityArrow(EntityTypes<? extends EntityArrow> entitytypes, EntityLiving entityliving, World world, ItemStack itemstack, @Nullable ItemStack itemstack1) {
-        this(entitytypes, entityliving.getX(), entityliving.getEyeY() - 0.10000000149011612D, entityliving.getZ(), world, itemstack, itemstack1);
-        this.setOwner(entityliving);
+        this(entitytypes, entityliving.getX(), entityliving.getEyeY() - 0.10000000149011612D, entityliving.getZ(), world, itemstack, itemstack1, entityliving); // CraftBukkit
+        // this.setOwner(entityliving); // SPIGOT-7744 - Moved to the above constructor
     }
 
     public void setSoundEvent(SoundEffect soundeffect) {
@@ -282,7 +296,7 @@
 
                 if (movingobjectpositionentity == null) {
                     if (this.isAlive() && movingobjectpositionblock.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
-                        this.hitTargetOrDeflectSelf(movingobjectpositionblock);
+                        this.preHitTargetOrDeflectSelf(movingobjectpositionblock); // CraftBukkit - projectile hit event
                         this.hasImpulse = true;
                     }
                 } else {
@@ -290,7 +304,7 @@
                         continue;
                     }
 
-                    ProjectileDeflection projectiledeflection = this.hitTargetOrDeflectSelf(movingobjectpositionentity);
+                    ProjectileDeflection projectiledeflection = this.preHitTargetOrDeflectSelf(movingobjectpositionentity); // CraftBukkit - projectile hit event
 
                     this.hasImpulse = true;
                     if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) {
@@ -357,7 +371,7 @@
     protected void tickDespawn() {
         ++this.life;
         if (this.life >= 1200) {
-            this.discard();
+            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
         }
 
     }
@@ -423,7 +437,7 @@
             }
 
             if (this.piercingIgnoreEntityIds.size() >= this.getPierceLevel() + 1) {
-                this.discard();
+                this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
                 return;
             }
 
@@ -444,7 +458,13 @@
         int k = entity.getRemainingFireTicks();
 
         if (this.isOnFire() && !flag) {
-            entity.igniteForSeconds(5.0F);
+            // CraftBukkit start
+            EntityCombustByEntityEvent combustEvent = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), 5.0F);
+            org.bukkit.Bukkit.getPluginManager().callEvent(combustEvent);
+            if (!combustEvent.isCancelled()) {
+                entity.igniteForSeconds(combustEvent.getDuration(), false);
+            }
+            // CraftBukkit end
         }
 
         if (entity.hurtOrSimulate(damagesource, (float) i)) {
@@ -490,7 +510,7 @@
 
             this.playSound(this.soundEvent, 1.0F, 1.2F / (this.random.nextFloat() * 0.2F + 0.9F));
             if (this.getPierceLevel() <= 0) {
-                this.discard();
+                this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
             }
         } else {
             entity.setRemainingFireTicks(k);
@@ -506,7 +526,7 @@
                         this.spawnAtLocation(worldserver2, this.getPickupItem(), 0.1F);
                     }
 
-                    this.discard();
+                    this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
                 }
             }
         }
@@ -675,7 +695,7 @@
         }
 
         if (nbttagcompound.contains("weapon", 10)) {
-            this.firedFromWeapon = (ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("weapon")).orElse((Object) null);
+            this.firedFromWeapon = (ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("weapon")).orElse(null); // CraftBukkit - decompile error
         } else {
             this.firedFromWeapon = null;
         }
@@ -688,34 +708,31 @@
         Entity entity1 = entity;
         byte b0 = 0;
 
-        EntityArrow.PickupStatus entityarrow_pickupstatus;
+        EntityArrow.PickupStatus entityarrow_pickupstatus = this.pickup; // CraftBukkit - decompile error
 
         label16:
-        while(true) {
-            //$FF: b0->value
-            //0->net/minecraft/world/entity/player/EntityHuman
-            //1->net/minecraft/world/entity/OminousItemSpawner
-            switch (entity1.typeSwitch<invokedynamic>(entity1, b0)) {
-                case -1:
-                default:
-                    entityarrow_pickupstatus = this.pickup;
-                    break label16;
-                case 0:
-                    EntityHuman entityhuman = (EntityHuman)entity1;
+        // CraftBukkit start - decompile error
+        while (true) {
+            switch (entity1) {
+                case EntityHuman entityhuman:
 
                     if (this.pickup != EntityArrow.PickupStatus.DISALLOWED) {
                         b0 = 1;
-                        break;
+                        break label16;
                     }
 
                     entityarrow_pickupstatus = EntityArrow.PickupStatus.ALLOWED;
                     break label16;
-                case 1:
-                    OminousItemSpawner ominousitemspawner = (OminousItemSpawner)entity1;
+                case OminousItemSpawner ominousitemspawner:
 
                     entityarrow_pickupstatus = EntityArrow.PickupStatus.DISALLOWED;
                     break label16;
+                case null: // SPIGOT-7751: Fix crash caused by null owner
+                default:
+                    entityarrow_pickupstatus = this.pickup;
+                    break label16;
             }
+            // CraftBukkit end
         }
 
         this.pickup = entityarrow_pickupstatus;
@@ -724,9 +741,24 @@
     @Override
     public void playerTouch(EntityHuman entityhuman) {
         if (!this.level().isClientSide && (this.isInGround() || this.isNoPhysics()) && this.shakeTime <= 0) {
-            if (this.tryPickup(entityhuman)) {
+            // CraftBukkit start
+            ItemStack itemstack = this.getPickupItem();
+            if (this.pickup == PickupStatus.ALLOWED && !itemstack.isEmpty() && entityhuman.getInventory().canHold(itemstack) > 0) {
+                EntityItem item = new EntityItem(this.level(), this.getX(), this.getY(), this.getZ(), itemstack);
+                PlayerPickupArrowEvent event = new PlayerPickupArrowEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), new org.bukkit.craftbukkit.entity.CraftItem(this.level().getCraftServer(), item), (org.bukkit.entity.AbstractArrow) this.getBukkitEntity());
+                // event.setCancelled(!entityhuman.canPickUpLoot); TODO
+                this.level().getCraftServer().getPluginManager().callEvent(event);
+
+                if (event.isCancelled()) {
+                    return;
+                }
+                itemstack = item.getItem();
+            }
+
+            if ((this.pickup == EntityArrow.PickupStatus.ALLOWED && entityhuman.getInventory().add(itemstack)) || (this.pickup == EntityArrow.PickupStatus.CREATIVE_ONLY && entityhuman.getAbilities().instabuild)) {
+                // CraftBukkit end
                 entityhuman.take(this, 1);
-                this.discard();
+                this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
             }
 
         }
