Fix NPE with BlockSnapshots that caused items with TileEntities to be used up in creative mode.

This commit is contained in:
Lex Manos 2014-11-30 23:54:17 -08:00
parent 2a02804379
commit 7cc7056c57

View file

@ -154,7 +154,7 @@
+ // Split off from original setBlockState(BlockPos, IBlockState Block p_147465_4_, int) method in order to directly send client and physic updates
+ public void markAndNotifyBlock(BlockPos pos, Chunk chunk, IBlockState old, IBlockState new_, int flags)
+ {
+ if ((flags & 2) != 0 && (!this.field_72995_K || (flags & 4) == 0) && chunk.func_150802_k())
+ if ((flags & 2) != 0 && (!this.field_72995_K || (flags & 4) == 0) && (chunk == null || chunk.func_150802_k()))
+ {
+ this.func_175689_h(pos);
+ }