--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -241,9 +241,9 @@
             IBlockState iblockstate = p_180597_1_.func_180495_p(new BlockPos(p_180597_3_));
             Block block = iblockstate.func_177230_c();
 
-            if (block == Blocks.field_150324_C)
+            if (block.isBed(p_180597_1_, new BlockPos(p_180597_3_), (EntityLivingBase)p_180597_3_))
             {
-                int i = ((EnumFacing)iblockstate.func_177229_b(BlockBed.field_176387_N)).func_176736_b();
+                int i = block.getBedDirection(p_180597_1_, new BlockPos(p_180597_3_)).func_176736_b();
                 this.field_78735_i = (float)(i * 90 + 180);
                 this.field_78732_j = 0.0F;
             }
