Fix NPE when sleeping in some custom beds. Closes #4956
This commit is contained in:
parent
1007d3e9c5
commit
464cccaa3e
1 changed files with 2 additions and 1 deletions
|
@ -359,7 +359,8 @@
|
|||
{
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPlayerWakeup(this, p_70999_1_, p_70999_2_, p_70999_3_);
|
||||
this.func_70105_a(0.6F, 1.8F);
|
||||
IBlockState iblockstate = this.field_70170_p.func_180495_p(this.field_71081_bT);
|
||||
- IBlockState iblockstate = this.field_70170_p.func_180495_p(this.field_71081_bT);
|
||||
+ IBlockState iblockstate = this.field_71081_bT == null ? null : this.field_70170_p.func_180495_p(this.field_71081_bT);
|
||||
|
||||
- if (this.field_71081_bT != null && iblockstate.func_177230_c() == Blocks.field_150324_C)
|
||||
+ if (this.field_71081_bT != null && iblockstate.func_177230_c().isBed(iblockstate, field_70170_p, field_71081_bT, this))
|
||||
|
|
Loading…
Reference in a new issue