Add null check in BlockSpring#getBlockColor

This commit is contained in:
Martijn van den Brand 2023-08-01 13:28:15 +02:00 committed by GitHub
parent 5f9897ca1c
commit 6370e49edb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -33,7 +33,7 @@ public class BlockSpring extends BlockContainerImpl implements ICustomBlockState
@Override
@OnlyIn(Dist.CLIENT)
public BlockColor getBlockColor() {
return (state, level, pos, i) -> BiomeColors.getAverageWaterColor(level, pos);
return (state, level, pos, i) -> level == null || pos == null ? -1 : BiomeColors.getAverageWaterColor(level, pos);
}
@Override