--- a/net/minecraft/world/level/block/BlockBed.java
+++ b/net/minecraft/world/level/block/BlockBed.java
@@ -88,7 +88,8 @@
                 }
             }
 
-            if (!a(world)) {
+            // CraftBukkit - moved world and biome check into EntityHuman
+            if (false && !a(world)) {
                 world.a(blockposition, false);
                 BlockPosition blockposition1 = blockposition.shift(((EnumDirection) iblockdata.get(BlockBed.FACING)).opposite());
 
@@ -105,7 +106,16 @@
 
                 return EnumInteractionResult.SUCCESS;
             } else {
+                // CraftBukkit start
+                IBlockData finaliblockdata = iblockdata;
+                BlockPosition finalblockposition = blockposition;
+                // CraftBukkit end
                 entityhuman.sleep(blockposition).ifLeft((entityhuman_enumbedresult) -> {
+                    // CraftBukkit start - handling bed explosion from below here
+                    if (entityhuman_enumbedresult == EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE) {
+                        this.explodeBed(finaliblockdata, world, finalblockposition);
+                    } else
+                    // CraftBukkit end
                     if (entityhuman_enumbedresult != null) {
                         entityhuman.a(entityhuman_enumbedresult.a(), true);
                     }
@@ -116,8 +126,27 @@
         }
     }
 
+    // CraftBukkit start
+    private EnumInteractionResult explodeBed(IBlockData iblockdata, World world, BlockPosition blockposition) {
+        {
+            {
+                world.a(blockposition, false);
+                BlockPosition blockposition1 = blockposition.shift(((EnumDirection) iblockdata.get(BlockBed.FACING)).opposite());
+
+                if (world.getType(blockposition1).getBlock() == this) {
+                    world.a(blockposition1, false);
+                }
+
+                world.createExplosion((Entity) null, DamageSource.a(), (ExplosionDamageCalculator) null, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, 5.0F, true, Explosion.Effect.DESTROY);
+                return EnumInteractionResult.SUCCESS;
+            }
+        }
+    }
+    // CraftBukkit end
+
     public static boolean a(World world) {
-        return world.getDimensionManager().isBedWorks();
+        // CraftBukkit - moved world and biome check into EntityHuman
+        return true || world.getDimensionManager().isBedWorks();
     }
 
     private boolean a(World world, BlockPosition blockposition) {
