net.minecraft.world.ColorizerFoliage Java Examples
The following examples show how to use
net.minecraft.world.ColorizerFoliage.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ClientProxy.java From customstuff4 with GNU General Public License v3.0 | 6 votes |
@Override public void setBlockBiomeTint(Block block, IntFunction<BlockTint> tintTypeForSubtype) { if (!(block instanceof CSBlock)) return; BlockColors blockColors = Minecraft.getMinecraft().getBlockColors(); CSBlock csBlock = (CSBlock) block; blockColors.registerBlockColorHandler( (state, worldIn, pos, tintIndex) -> { if (worldIn == null || pos == null) return ColorizerFoliage.getFoliageColorBasic(); return tintTypeForSubtype.apply(csBlock.getSubtype(state)).getMultiplier(worldIn, pos); /*if (tintType == BiomeTintType.FOLIAGE) return BiomeColorHelper.getFoliageColorAtPos(worldIn, pos); if (tintType == BiomeTintType.GRASS) return BiomeColorHelper.getGrassColorAtPos(worldIn, pos); if (tintType == BiomeTintType.WATER) return BiomeColorHelper.getWaterColorAtPos(worldIn, pos); return -1;*/ }, block); }
Example #2
Source File: BlockWisdomLeaves.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
@Nullable @Override public Function2<ItemStack, Integer, Integer> getItemColorFunction() { return (stack, integer) -> ColorizerFoliage.getFoliageColorBasic(); }
Example #3
Source File: BlockWisdomLeaves.java From Wizardry with GNU Lesser General Public License v3.0 | 4 votes |
@Nullable @Override public Function4<IBlockState, IBlockAccess, BlockPos, Integer, Integer> getBlockColorFunction() { return (iBlockState, iBlockAccess, blockPos, integer) -> iBlockAccess != null && blockPos != null ? BiomeColorHelper.getFoliageColorAtPos(iBlockAccess, blockPos) : ColorizerFoliage.getFoliageColorBasic(); }
Example #4
Source File: BlockIvy.java From GardenCollection with MIT License | 4 votes |
@Override public int getBlockColor () { return ColorizerFoliage.getFoliageColorBasic(); }
Example #5
Source File: BlockIvy.java From GardenCollection with MIT License | 4 votes |
@Override public int getRenderColor (int meta) { return ColorizerFoliage.getFoliageColorBasic(); }