--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -267,6 +267,13 @@
                 this.dropFromGiftLootTable(worldserver, LootTables.SNIFFER_DIGGING, (worldserver1, itemstack) -> {
                     EntityItem entityitem = new EntityItem(this.level(), (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack);
 
+                    // CraftBukkit start - handle EntityDropItemEvent
+                    org.bukkit.event.entity.EntityDropItemEvent event = new org.bukkit.event.entity.EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
+                    org.bukkit.Bukkit.getPluginManager().callEvent(event);
+                    if (event.isCancelled()) {
+                        return;
+                    }
+                    // CraftBukkit end
                     entityitem.setDefaultPickUpDelay();
                     worldserver1.addFreshEntity(entityitem);
                 });
@@ -308,7 +315,7 @@
         List<GlobalPos> list = (List) this.getExploredPositions().limit(20L).collect(Collectors.toList());
 
         list.add(0, GlobalPos.of(this.level().dimension(), blockposition));
-        this.getBrain().setMemory(MemoryModuleType.SNIFFER_EXPLORED_POSITIONS, (Object) list);
+        this.getBrain().setMemory(MemoryModuleType.SNIFFER_EXPLORED_POSITIONS, list); // CraftBukkit - decompile error
         return this;
     }
 
@@ -444,7 +451,7 @@
 
     @Override
     public BehaviorController<Sniffer> getBrain() {
-        return super.getBrain();
+        return (BehaviorController<Sniffer>) super.getBrain(); // CraftBukkit - decompile error
     }
 
     @Override
