[1.11] Fixes for Chunk.getBlockLightOpacity implementation (#3537)

This commit is contained in:
Ben Staddon 2016-12-21 19:12:48 +00:00 committed by LexManos
parent 95e523f943
commit e32cc2a607
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@
IBlockState iblockstate = this.func_186032_a(j, l - 1, k);
- if (iblockstate.func_185891_c() != 0)
+ if (iblockstate.getLightOpacity(this.field_76637_e, new BlockPos(j, l - 1, k)) != 0)
+ if (this.func_150808_b(j, l - 1, k) != 0)
{
this.field_76634_f[k << 4 | j] = l;
@ -21,7 +21,7 @@
{
- return this.func_186032_a(p_150808_1_, p_150808_2_, p_150808_3_).func_185891_c();
+ IBlockState state = this.func_186032_a(p_150808_1_, p_150808_2_, p_150808_3_); //Forge: Can sometimes be called before we are added to the global world list. So use the less accurate one during that. It'll be recalculated later
+ return this.field_189550_d ? state.func_185891_c() : state.getLightOpacity(this.field_76637_e, new BlockPos(p_150808_1_, p_150808_2_, p_150808_3_));
+ return !field_76636_d ? state.func_185891_c() : state.getLightOpacity(field_76637_e, new BlockPos(field_76635_g << 4 | p_150808_1_ & 15, p_150808_2_, field_76647_h << 4 | p_150808_3_ & 15));
}
public IBlockState func_177435_g(BlockPos p_177435_1_)