mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
22 lines
1.3 KiB
Diff
22 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
|
|
@@ -223,12 +223,14 @@
|
|
|
|
if (par4EntityLivingBase.isPlayerSleeping())
|
|
{
|
|
- int i = par1World.getBlockId(MathHelper.floor_double(par4EntityLivingBase.posX), MathHelper.floor_double(par4EntityLivingBase.posY), MathHelper.floor_double(par4EntityLivingBase.posZ));
|
|
+ int x = MathHelper.floor_double(par4EntityLivingBase.posX);
|
|
+ int y = MathHelper.floor_double(par4EntityLivingBase.posY);
|
|
+ int z = MathHelper.floor_double(par4EntityLivingBase.posZ);
|
|
+ Block block = Block.blocksList[par1World.getBlockId(x, y, z)];
|
|
|
|
- if (i == Block.bed.blockID)
|
|
+ if (block != null && block.isBed(par1World, x, y, z, par4EntityLivingBase))
|
|
{
|
|
- int j = par1World.getBlockMetadata(MathHelper.floor_double(par4EntityLivingBase.posX), MathHelper.floor_double(par4EntityLivingBase.posY), MathHelper.floor_double(par4EntityLivingBase.posZ));
|
|
- int k = j & 3;
|
|
+ int k = block.getBedDirection(par1World, x, y, z);
|
|
this.playerViewY = (float)(k * 90 + 180);
|
|
this.playerViewX = 0.0F;
|
|
}
|