Fixed a slight mistake in plant colouring

This commit is contained in:
Adubbz 2016-03-18 06:10:33 +11:00
parent e1bd50ecc0
commit 25c357fbbe

View file

@ -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;
}
};
}