mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 03:25:18 +00:00
23 lines
1.3 KiB
Diff
23 lines
1.3 KiB
Diff
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
|
@@ -213,12 +213,14 @@
|
|
|
|
if (par4EntityLiving.isPlayerSleeping())
|
|
{
|
|
- int var7 = par1World.getBlockId(MathHelper.floor_double(par4EntityLiving.posX), MathHelper.floor_double(par4EntityLiving.posY), MathHelper.floor_double(par4EntityLiving.posZ));
|
|
-
|
|
- if (var7 == 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 var8 = par1World.getBlockMetadata(MathHelper.floor_double(par4EntityLiving.posX), MathHelper.floor_double(par4EntityLiving.posY), MathHelper.floor_double(par4EntityLiving.posZ));
|
|
- int var9 = var8 & 3;
|
|
+ int var9 = block.getBedDirection(par1World, x, y, z);;
|
|
this.playerViewY = (float)(var9 * 90 + 180);
|
|
this.playerViewX = 0.0F;
|
|
}
|