From 474c75644248f56c19ca860d08de6e6c1af24c8a Mon Sep 17 00:00:00 2001 From: LemADEC Date: Sun, 30 Jul 2023 16:04:29 +0200 Subject: [PATCH] Fixed #537 crash from maps updating too soon --- .../java/cr0s/warpdrive/block/forcefield/BlockForceField.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceField.java b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceField.java index da3e515f..4b5c97d7 100644 --- a/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceField.java +++ b/src/main/java/cr0s/warpdrive/block/forcefield/BlockForceField.java @@ -98,7 +98,8 @@ public class BlockForceField extends BlockAbstractForceField implements IDamageR public MapColor getMapColor(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos blockPos) { final IExtendedBlockState blockStateExtended = (IExtendedBlockState) getExtendedState(blockState, blockAccess, blockPos); final IBlockState blockStateCamouflage = blockStateExtended.getValue(BlockProperties.CAMOUFLAGE); - if (blockStateCamouflage != Blocks.AIR) { + if ( blockStateCamouflage != null + && blockStateCamouflage.getBlock() != Blocks.AIR ) { try { return blockStateCamouflage.getMapColor(blockAccess, blockPos); } catch (final Exception exception) {