Fixed #537 crash from maps updating too soon
This commit is contained in:
parent
2adb8c2c50
commit
474c756442
1 changed files with 2 additions and 1 deletions
|
@ -98,7 +98,8 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR
|
||||||
public MapColor getMapColor(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
public MapColor getMapColor(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos blockPos) {
|
||||||
final IExtendedBlockState blockStateExtended = (IExtendedBlockState) getExtendedState(blockState, blockAccess, blockPos);
|
final IExtendedBlockState blockStateExtended = (IExtendedBlockState) getExtendedState(blockState, blockAccess, blockPos);
|
||||||
final IBlockState blockStateCamouflage = blockStateExtended.getValue(BlockProperties.CAMOUFLAGE);
|
final IBlockState blockStateCamouflage = blockStateExtended.getValue(BlockProperties.CAMOUFLAGE);
|
||||||
if (blockStateCamouflage != Blocks.AIR) {
|
if ( blockStateCamouflage != null
|
||||||
|
&& blockStateCamouflage.getBlock() != Blocks.AIR ) {
|
||||||
try {
|
try {
|
||||||
return blockStateCamouflage.getMapColor(blockAccess, blockPos);
|
return blockStateCamouflage.getMapColor(blockAccess, blockPos);
|
||||||
} catch (final Exception exception) {
|
} catch (final Exception exception) {
|
||||||
|
|
Loading…
Reference in a new issue