Files
MinecraftForge/patches/minecraft/net/minecraft/client/renderer/entity/RenderManager.java.patch
T
LexManos a04e7912b0 Sync up with FML, Will not run nativly as you need deobfusication_data.zip in your libs folder.
We have not setup the download for that yet, to make it yourself just zip joined.srg name it deobfusication_data.zip and put it in lib
2013-02-28 03:53:42 -08:00

23 lines
1.2 KiB
Diff

--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -218,12 +218,14 @@
if (par4EntityLiving.isPlayerSleeping())
{
- int i = par1World.getBlockId(MathHelper.floor_double(par4EntityLiving.posX), MathHelper.floor_double(par4EntityLiving.posY), MathHelper.floor_double(par4EntityLiving.posZ));
-
- if (i == Block.bed.blockID)
+ int x = MathHelper.floor_double(par4EntityLiving.posX);
+ int y = MathHelper.floor_double(par4EntityLiving.posY);
+ int z = MathHelper.floor_double(par4EntityLiving.posZ);
+ Block block = Block.blocksList[par1World.getBlockId(x, y, z)];
+
+ if (block != null && block.isBed(par1World, x, y, z, par4EntityLiving))
{
- int j = par1World.getBlockMetadata(MathHelper.floor_double(par4EntityLiving.posX), MathHelper.floor_double(par4EntityLiving.posY), MathHelper.floor_double(par4EntityLiving.posZ));
- int k = j & 3;
+ int k = block.getBedDirection(par1World, x, y, z);;
this.playerViewY = (float)(k * 90 + 180);
this.playerViewX = 0.0F;
}