--- a/net/minecraft/world/entity/animal/EntityPanda.java
+++ b/net/minecraft/world/entity/animal/EntityPanda.java
@@ -65,6 +65,8 @@
 import net.minecraft.world.level.gameevent.GameEvent;
 import net.minecraft.world.phys.Vec3D;
 
+import org.bukkit.event.entity.EntityTargetEvent; // CraftBukkit
+
 public class EntityPanda extends EntityAnimal {
 
     private static final DataWatcherObject<Integer> UNHAPPY_COUNTER = DataWatcher.a(EntityPanda.class, DataWatcherRegistry.INT);
@@ -525,7 +527,7 @@
 
     @Override
     protected void b(EntityItem entityitem) {
-        if (this.getEquipment(EnumItemSlot.MAINHAND).isEmpty() && EntityPanda.PANDA_ITEMS.test(entityitem)) {
+        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, entityitem, 0, !(this.getEquipment(EnumItemSlot.MAINHAND).isEmpty() && EntityPanda.PANDA_ITEMS.test(entityitem))).isCancelled()) { // CraftBukkit
             this.a(entityitem);
             ItemStack itemstack = entityitem.getItemStack();
 
@@ -881,10 +883,10 @@
         private final EntityPanda panda;
 
         public c(EntityPanda entitypanda, Class<T> oclass, float f, double d0, double d1) {
-            Predicate predicate = IEntitySelector.NO_SPECTATORS;
+            // Predicate predicate = IEntitySelector.NO_SPECTATORS;
 
-            Objects.requireNonNull(predicate);
-            super(entitypanda, oclass, f, d0, d1, predicate::test);
+            // Objects.requireNonNull(predicate);
+            super(entitypanda, oclass, f, d0, d1, IEntitySelector.NO_SPECTATORS::test);
             this.panda = entitypanda;
         }
 
@@ -1131,7 +1133,7 @@
         @Override
         protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) {
             if (entityinsentient instanceof EntityPanda && ((EntityPanda) entityinsentient).isAggressive()) {
-                entityinsentient.setGoalTarget(entityliving);
+                entityinsentient.setGoalTarget(entityliving, EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); // CraftBukkit
             }
 
         }
