--- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
+++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
@@ -82,14 +82,23 @@
 
     public Sniffer(EntityTypes<? extends EntityAnimal> entitytypes, World world) {
         super(entitytypes, world);
-        this.entityData.define(Sniffer.DATA_STATE, Sniffer.State.IDLING);
-        this.entityData.define(Sniffer.DATA_DROP_SEED_AT_TICK, 0);
+        // this.entityData.define(Sniffer.DATA_STATE, Sniffer.State.IDLING); // CraftBukkit - moved down to appropriate location
+        // this.entityData.define(Sniffer.DATA_DROP_SEED_AT_TICK, 0); // CraftBukkit - moved down to appropriate location
         this.getNavigation().setCanFloat(true);
         this.setPathfindingMalus(PathType.WATER, -1.0F);
         this.setPathfindingMalus(PathType.DANGER_POWDER_SNOW, -1.0F);
         this.setPathfindingMalus(PathType.DAMAGE_CAUTIOUS, -1.0F);
     }
 
+    // CraftBukkit start - SPIGOT-7295: moved from constructor to appropriate location
+    @Override
+    protected void defineSynchedData() {
+        super.defineSynchedData();
+        this.entityData.define(Sniffer.DATA_STATE, Sniffer.State.IDLING);
+        this.entityData.define(Sniffer.DATA_DROP_SEED_AT_TICK, 0);
+    }
+    // CraftBukkit end
+
     @Override
     protected float getStandingEyeHeight(EntityPose entitypose, EntitySize entitysize) {
         return this.getDimensions(entitypose).height * 0.6F;
@@ -270,6 +279,13 @@
                 ItemStack itemstack = (ItemStack) iterator.next();
                 EntityItem entityitem = new EntityItem(worldserver, (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()) {
+                    continue;
+                }
+                // CraftBukkit end
                 entityitem.setDefaultPickUpDelay();
                 worldserver.addFreshEntity(entityitem);
             }
@@ -309,7 +325,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;
     }
 
@@ -461,7 +477,7 @@
 
     @Override
     public BehaviorController<Sniffer> getBrain() {
-        return super.getBrain();
+        return (BehaviorController<Sniffer>) super.getBrain(); // CraftBukkit - decompile error
     }
 
     @Override
