--- a/net/minecraft/world/entity/monster/Pillager.java
+++ b/net/minecraft/world/entity/monster/Pillager.java
@@ -47,8 +47,12 @@
 import net.minecraft.world.level.Level;
 import net.minecraft.world.level.LevelReader;
 import net.minecraft.world.level.ServerLevelAccessor;
+// CraftBukkit start
+import org.bukkit.event.entity.EntityRemoveEvent;
+// CraftBukkit end
 
 public class Pillager extends AbstractIllager implements CrossbowAttackMob, InventoryCarrier {
+
     private static final EntityDataAccessor<Boolean> IS_CHARGING_CROSSBOW = SynchedEntityData.defineId(Pillager.class, EntityDataSerializers.BOOLEAN);
     private static final int INVENTORY_SIZE = 5;
     private static final int SLOT_OFFSET = 300;
@@ -62,29 +66,25 @@
     protected void registerGoals() {
         super.registerGoals();
         this.goalSelector.addGoal(0, new FloatGoal(this));
-        this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, 10.0F));
-        this.goalSelector.addGoal(3, new RangedCrossbowAttackGoal<>(this, 1.0, 8.0F));
-        this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6));
+        this.goalSelector.addGoal(2, new Raider.HoldGroundAttackGoal(this, 10.0F)); // Paper - decomp fix
+        this.goalSelector.addGoal(3, new RangedCrossbowAttackGoal<>(this, 1.0D, 8.0F));
+        this.goalSelector.addGoal(8, new RandomStrollGoal(this, 0.6D));
         this.goalSelector.addGoal(9, new LookAtPlayerGoal(this, Player.class, 15.0F, 1.0F));
         this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Mob.class, 15.0F));
-        this.targetSelector.addGoal(1, new HurtByTargetGoal(this, Raider.class).setAlertOthers());
+        this.targetSelector.addGoal(1, (new HurtByTargetGoal(this, new Class[]{Raider.class})).setAlertOthers());
         this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true));
         this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, AbstractVillager.class, false));
         this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<>(this, IronGolem.class, true));
     }
 
     public static AttributeSupplier.Builder createAttributes() {
-        return Monster.createMonsterAttributes()
-            .add(Attributes.MOVEMENT_SPEED, 0.35F)
-            .add(Attributes.MAX_HEALTH, 24.0)
-            .add(Attributes.ATTACK_DAMAGE, 5.0)
-            .add(Attributes.FOLLOW_RANGE, 32.0);
+        return Monster.createMonsterAttributes().add(Attributes.MOVEMENT_SPEED, 0.3499999940395355D).add(Attributes.MAX_HEALTH, 24.0D).add(Attributes.ATTACK_DAMAGE, 5.0D).add(Attributes.FOLLOW_RANGE, 32.0D);
     }
 
     @Override
     protected void defineSynchedData(SynchedEntityData.Builder builder) {
         super.defineSynchedData(builder);
-        builder.define(IS_CHARGING_CROSSBOW, false);
+        builder.define(Pillager.IS_CHARGING_CROSSBOW, false);
     }
 
     @Override
@@ -93,12 +93,12 @@
     }
 
     public boolean isChargingCrossbow() {
-        return this.entityData.get(IS_CHARGING_CROSSBOW);
+        return (Boolean) this.entityData.get(Pillager.IS_CHARGING_CROSSBOW);
     }
 
     @Override
     public void setChargingCrossbow(boolean charging) {
-        this.entityData.set(IS_CHARGING_CROSSBOW, charging);
+        this.entityData.set(Pillager.IS_CHARGING_CROSSBOW, charging);
     }
 
     @Override
@@ -114,13 +114,7 @@
 
     @Override
     public AbstractIllager.IllagerArmPose getArmPose() {
-        if (this.isChargingCrossbow()) {
-            return AbstractIllager.IllagerArmPose.CROSSBOW_CHARGE;
-        } else if (this.isHolding(Items.CROSSBOW)) {
-            return AbstractIllager.IllagerArmPose.CROSSBOW_HOLD;
-        } else {
-            return this.isAggressive() ? AbstractIllager.IllagerArmPose.ATTACKING : AbstractIllager.IllagerArmPose.NEUTRAL;
-        }
+        return this.isChargingCrossbow() ? AbstractIllager.IllagerArmPose.CROSSBOW_CHARGE : (this.isHolding(Items.CROSSBOW) ? AbstractIllager.IllagerArmPose.CROSSBOW_HOLD : (this.isAggressive() ? AbstractIllager.IllagerArmPose.ATTACKING : AbstractIllager.IllagerArmPose.NEUTRAL));
     }
 
     @Override
@@ -143,9 +137,10 @@
     @Nullable
     @Override
     public SpawnGroupData finalizeSpawn(ServerLevelAccessor world, DifficultyInstance difficulty, MobSpawnType spawnReason, @Nullable SpawnGroupData entityData) {
-        RandomSource randomSource = world.getRandom();
-        this.populateDefaultEquipmentSlots(randomSource, difficulty);
-        this.populateDefaultEquipmentEnchantments(world, randomSource, difficulty);
+        RandomSource randomsource = world.getRandom();
+
+        this.populateDefaultEquipmentSlots(randomsource, difficulty);
+        this.populateDefaultEquipmentEnchantments(world, randomsource, difficulty);
         return super.finalizeSpawn(world, difficulty, spawnReason, entityData);
     }
 
@@ -158,13 +153,13 @@
     protected void enchantSpawnedWeapon(ServerLevelAccessor world, RandomSource random, DifficultyInstance localDifficulty) {
         super.enchantSpawnedWeapon(world, random, localDifficulty);
         if (random.nextInt(300) == 0) {
-            ItemStack itemStack = this.getMainHandItem();
-            if (itemStack.is(Items.CROSSBOW)) {
-                EnchantmentHelper.enchantItemFromProvider(
-                    itemStack, world.registryAccess(), VanillaEnchantmentProviders.PILLAGER_SPAWN_CROSSBOW, localDifficulty, random
-                );
+            ItemStack itemstack = this.getMainHandItem();
+
+            if (itemstack.is(Items.CROSSBOW)) {
+                EnchantmentHelper.enchantItemFromProvider(itemstack, world.registryAccess(), VanillaEnchantmentProviders.PILLAGER_SPAWN_CROSSBOW, localDifficulty, random);
             }
         }
+
     }
 
     @Override
@@ -194,18 +189,21 @@
 
     @Override
     protected void pickUpItem(ItemEntity item) {
-        ItemStack itemStack = item.getItem();
-        if (itemStack.getItem() instanceof BannerItem) {
+        ItemStack itemstack = item.getItem();
+
+        if (itemstack.getItem() instanceof BannerItem) {
             super.pickUpItem(item);
-        } else if (this.wantsItem(itemStack)) {
+        } else if (this.wantsItem(itemstack)) {
             this.onItemPickup(item);
-            ItemStack itemStack2 = this.inventory.addItem(itemStack);
-            if (itemStack2.isEmpty()) {
-                item.discard();
+            ItemStack itemstack1 = this.inventory.addItem(itemstack);
+
+            if (itemstack1.isEmpty()) {
+                item.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
             } else {
-                itemStack.setCount(itemStack2.getCount());
+                itemstack.setCount(itemstack1.getCount());
             }
         }
+
     }
 
     private boolean wantsItem(ItemStack stack) {
@@ -214,32 +212,34 @@
 
     @Override
     public SlotAccess getSlot(int mappedIndex) {
-        int i = mappedIndex - 300;
-        return i >= 0 && i < this.inventory.getContainerSize() ? SlotAccess.forContainer(this.inventory, i) : super.getSlot(mappedIndex);
+        int j = mappedIndex - 300;
+
+        return j >= 0 && j < this.inventory.getContainerSize() ? SlotAccess.forContainer(this.inventory, j) : super.getSlot(mappedIndex);
     }
 
     @Override
     public void applyRaidBuffs(ServerLevel world, int wave, boolean unused) {
         Raid raid = this.getCurrentRaid();
-        boolean bl = this.random.nextFloat() <= raid.getEnchantOdds();
-        if (bl) {
-            ItemStack itemStack = new ItemStack(Items.CROSSBOW);
-            ResourceKey<EnchantmentProvider> resourceKey;
+        boolean flag1 = this.random.nextFloat() <= raid.getEnchantOdds();
+
+        if (flag1) {
+            ItemStack itemstack = new ItemStack(Items.CROSSBOW);
+            ResourceKey resourcekey;
+
             if (wave > raid.getNumGroups(Difficulty.NORMAL)) {
-                resourceKey = VanillaEnchantmentProviders.RAID_PILLAGER_POST_WAVE_5;
+                resourcekey = VanillaEnchantmentProviders.RAID_PILLAGER_POST_WAVE_5;
             } else if (wave > raid.getNumGroups(Difficulty.EASY)) {
-                resourceKey = VanillaEnchantmentProviders.RAID_PILLAGER_POST_WAVE_3;
+                resourcekey = VanillaEnchantmentProviders.RAID_PILLAGER_POST_WAVE_3;
             } else {
-                resourceKey = null;
+                resourcekey = null;
             }
 
-            if (resourceKey != null) {
-                EnchantmentHelper.enchantItemFromProvider(
-                    itemStack, world.registryAccess(), resourceKey, world.getCurrentDifficultyAt(this.blockPosition()), this.getRandom()
-                );
-                this.setItemSlot(EquipmentSlot.MAINHAND, itemStack);
+            if (resourcekey != null) {
+                EnchantmentHelper.enchantItemFromProvider(itemstack, world.registryAccess(), resourcekey, world.getCurrentDifficultyAt(this.blockPosition()), this.getRandom());
+                this.setItemSlot(EquipmentSlot.MAINHAND, itemstack);
             }
         }
+
     }
 
     @Override
