--- a/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.java
+++ b/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.java
@@ -69,6 +69,13 @@
             BlockDoor blockdoor = (BlockDoor) iblockdata.getBlock();
 
             if (!blockdoor.h(iblockdata)) {
+                // CraftBukkit start - entities opening doors
+                org.bukkit.event.entity.EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(entityliving.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(entityliving.level, blockposition));
+                entityliving.level.getCraftServer().getPluginManager().callEvent(event);
+                if (event.isCancelled()) {
+                    return;
+                }
+                // CraftBukkit end
                 blockdoor.setDoor(entityliving, worldserver, iblockdata, blockposition, true);
             }
 
@@ -82,6 +89,13 @@
             BlockDoor blockdoor1 = (BlockDoor) iblockdata1.getBlock();
 
             if (!blockdoor1.h(iblockdata1)) {
+                // CraftBukkit start - entities opening doors
+                org.bukkit.event.entity.EntityInteractEvent event = new org.bukkit.event.entity.EntityInteractEvent(entityliving.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(entityliving.level, blockposition));
+                entityliving.level.getCraftServer().getPluginManager().callEvent(event);
+                if (event.isCancelled()) {
+                    return;
+                }
+                // CraftBukkit end
                 blockdoor1.setDoor(entityliving, worldserver, iblockdata1, blockposition1, true);
                 this.c(worldserver, entityliving, blockposition1);
             }
@@ -130,7 +144,7 @@
     private static boolean a(WorldServer worldserver, EntityLiving entityliving, BlockPosition blockposition) {
         BehaviorController<?> behaviorcontroller = entityliving.getBehaviorController();
 
-        return !behaviorcontroller.hasMemory(MemoryModuleType.NEAREST_LIVING_ENTITIES) ? false : ((List) behaviorcontroller.getMemory(MemoryModuleType.NEAREST_LIVING_ENTITIES).get()).stream().filter((entityliving1) -> {
+        return !behaviorcontroller.hasMemory(MemoryModuleType.NEAREST_LIVING_ENTITIES) ? false : (behaviorcontroller.getMemory(MemoryModuleType.NEAREST_LIVING_ENTITIES).get()).stream().filter((entityliving1) -> { // CraftBukkit - decompile error
             return entityliving1.getEntityType() == entityliving.getEntityType();
         }).filter((entityliving1) -> {
             return blockposition.a((IPosition) entityliving1.getPositionVector(), 2.0D);
@@ -172,7 +186,7 @@
         if (behaviorcontroller.getMemory(MemoryModuleType.DOORS_TO_CLOSE).isPresent()) {
             ((Set) behaviorcontroller.getMemory(MemoryModuleType.DOORS_TO_CLOSE).get()).add(globalpos);
         } else {
-            behaviorcontroller.setMemory(MemoryModuleType.DOORS_TO_CLOSE, (Object) Sets.newHashSet(new GlobalPos[]{globalpos}));
+            behaviorcontroller.setMemory(MemoryModuleType.DOORS_TO_CLOSE, Sets.newHashSet(new GlobalPos[]{globalpos})); // CraftBukkit - decompile error
         }
 
     }
