--- a/net/minecraft/world/entity/decoration/EntityItemFrame.java
+++ b/net/minecraft/world/entity/decoration/EntityItemFrame.java
@@ -91,16 +91,27 @@
     @Override
     protected void updateBoundingBox() {
         if (this.direction != null) {
+            // CraftBukkit start code moved in to calculateBoundingBox
+            this.a(calculateBoundingBox(this, this.pos, this.direction, this.getHangingWidth(), this.getHangingHeight()));
+            // CraftBukkit end
+        }
+    }
+
+    // CraftBukkit start - break out BB calc into own method
+    public static AxisAlignedBB calculateBoundingBox(@Nullable Entity entity, BlockPosition blockPosition, EnumDirection direction, int width, int height) {
+        {
             double d0 = 0.46875D;
-            double d1 = (double) this.pos.getX() + 0.5D - (double) this.direction.getAdjacentX() * 0.46875D;
-            double d2 = (double) this.pos.getY() + 0.5D - (double) this.direction.getAdjacentY() * 0.46875D;
-            double d3 = (double) this.pos.getZ() + 0.5D - (double) this.direction.getAdjacentZ() * 0.46875D;
-
-            this.setPositionRaw(d1, d2, d3);
-            double d4 = (double) this.getHangingWidth();
-            double d5 = (double) this.getHangingHeight();
-            double d6 = (double) this.getHangingWidth();
-            EnumDirection.EnumAxis enumdirection_enumaxis = this.direction.n();
+            double d1 = (double) blockPosition.getX() + 0.5D - (double) direction.getAdjacentX() * 0.46875D;
+            double d2 = (double) blockPosition.getY() + 0.5D - (double) direction.getAdjacentY() * 0.46875D;
+            double d3 = (double) blockPosition.getZ() + 0.5D - (double) direction.getAdjacentZ() * 0.46875D;
+
+            if (entity != null) {
+                entity.setPositionRaw(d1, d2, d3);
+            }
+            double d4 = (double) width;
+            double d5 = (double) height;
+            double d6 = (double) width;
+            EnumDirection.EnumAxis enumdirection_enumaxis = direction.n();
 
             switch (enumdirection_enumaxis) {
                 case X:
@@ -116,9 +127,10 @@
             d4 /= 32.0D;
             d5 /= 32.0D;
             d6 /= 32.0D;
-            this.a(new AxisAlignedBB(d1 - d4, d2 - d5, d3 - d6, d1 + d4, d2 + d5, d3 + d6));
+            return new AxisAlignedBB(d1 - d4, d2 - d5, d3 - d6, d1 + d4, d2 + d5, d3 + d6);
         }
     }
+    // CraftBukkit end
 
     @Override
     public boolean survives() {
@@ -168,6 +180,11 @@
             return false;
         } else if (!damagesource.isExplosion() && !this.getItem().isEmpty()) {
             if (!this.level.isClientSide) {
+                // CraftBukkit start - fire EntityDamageEvent
+                if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false) || this.isRemoved()) {
+                    return true;
+                }
+                // CraftBukkit end
                 this.b(damagesource.getEntity(), false);
                 this.playSound(this.h(), 1.0F, 1.0F);
             }
@@ -277,6 +294,12 @@
     }
 
     public void setItem(ItemStack itemstack, boolean flag) {
+        // CraftBukkit start
+        this.setItem(itemstack, flag, true);
+    }
+
+    public void setItem(ItemStack itemstack, boolean flag, boolean playSound) {
+        // CraftBukkit end
         if (!itemstack.isEmpty()) {
             itemstack = itemstack.cloneItemStack();
             itemstack.setCount(1);
@@ -284,7 +307,7 @@
         }
 
         this.getDataWatcher().set(EntityItemFrame.DATA_ITEM, itemstack);
-        if (!itemstack.isEmpty()) {
+        if (!itemstack.isEmpty() && playSound) { // CraftBukkit
             this.playSound(this.l(), 1.0F, 1.0F);
         }
 
