--- a/net/minecraft/world/entity/monster/Pillager.java
+++ b/net/minecraft/world/entity/monster/Pillager.java
@@ -43,8 +43,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;
@@ -58,29 +62,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
@@ -89,12 +89,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
@@ -110,13 +110,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
@@ -139,9 +133,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(randomSource, difficulty);
+        RandomSource randomsource = world.getRandom();
+
+        this.populateDefaultEquipmentSlots(randomsource, difficulty);
+        this.populateDefaultEquipmentEnchantments(randomsource, difficulty);
         return super.finalizeSpawn(world, difficulty, spawnReason, entityData);
     }
 
@@ -154,12 +149,14 @@
     protected void enchantSpawnedWeapon(RandomSource random, float power) {
         super.enchantSpawnedWeapon(random, power);
         if (random.nextInt(300) == 0) {
-            ItemStack itemStack = this.getMainHandItem();
-            if (itemStack.is(Items.CROSSBOW)) {
-                itemStack.enchant(Enchantments.PIERCING, 1);
-                this.setItemSlot(EquipmentSlot.MAINHAND, itemStack);
+            ItemStack itemstack = this.getMainHandItem();
+
+            if (itemstack.is(Items.CROSSBOW)) {
+                itemstack.enchant(Enchantments.PIERCING, 1);
+                this.setItemSlot(EquipmentSlot.MAINHAND, itemstack);
             }
         }
+
     }
 
     @Override
@@ -189,18 +186,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) {
@@ -209,25 +209,29 @@
 
     @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(int wave, boolean unused) {
         Raid raid = this.getCurrentRaid();
-        boolean bl = this.random.nextFloat() <= raid.getEnchantOdds();
-        if (bl) {
-            ItemStack itemStack = new ItemStack(Items.CROSSBOW);
+        boolean flag1 = this.random.nextFloat() <= raid.getEnchantOdds();
+
+        if (flag1) {
+            ItemStack itemstack = new ItemStack(Items.CROSSBOW);
+
             if (wave > raid.getNumGroups(Difficulty.NORMAL)) {
-                itemStack.enchant(Enchantments.QUICK_CHARGE, 2);
+                itemstack.enchant(Enchantments.QUICK_CHARGE, 2);
             } else if (wave > raid.getNumGroups(Difficulty.EASY)) {
-                itemStack.enchant(Enchantments.QUICK_CHARGE, 1);
+                itemstack.enchant(Enchantments.QUICK_CHARGE, 1);
             }
 
-            itemStack.enchant(Enchantments.MULTISHOT, 1);
-            this.setItemSlot(EquipmentSlot.MAINHAND, itemStack);
+            itemstack.enchant(Enchantments.MULTISHOT, 1);
+            this.setItemSlot(EquipmentSlot.MAINHAND, itemstack);
         }
+
     }
 
     @Override
