From 25c357fbbe2297a650aaa9c2cafbfdd0e57ec5f7 Mon Sep 17 00:00:00 2001 From: Adubbz Date: Fri, 18 Mar 2016 06:10:33 +1100 Subject: [PATCH] Fixed a slight mistake in plant colouring --- .../common/block/BlockBOPPlant.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java b/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java index ec2060f70..36424b846 100644 --- a/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java +++ b/src/main/java/biomesoplenty/common/block/BlockBOPPlant.java @@ -134,19 +134,18 @@ public class BlockBOPPlant extends BlockBOPDecoration implements IShearable @Override public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) { - if ( world != null && pos != null) - { - switch (getColoringType((BOPPlants) state.getValue(variantProp))) - { - case LIKE_LEAVES: - return BiomeColorHelper.getFoliageColorAtPos(world, pos); + boolean inWorld = world != null && pos != null; - case LIKE_GRASS: - return BiomeColorHelper.getGrassColorAtPos(world, pos); - } + switch (getColoringType((BOPPlants) state.getValue(variantProp))) + { + case LIKE_LEAVES: + return inWorld ? BiomeColorHelper.getFoliageColorAtPos(world, pos) : ColorizerFoliage.getFoliageColorBasic(); + + case LIKE_GRASS: + return inWorld ? BiomeColorHelper.getGrassColorAtPos(world, pos) : ColorizerGrass.getGrassColor(0.5D, 1.0D); } - return ColorizerFoliage.getFoliageColorBasic(); + return 0xFFFFFF; } }; }