Java Code Examples for net.minecraft.block.Block#setLightLevel()
The following examples show how to use
net.minecraft.block.Block#setLightLevel() .
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: CLApi.java From GardenCollection with MIT License | 2 votes |
/** * Sets the lighting colors for a given block. Vanilla brightness is recomputed. * * @param block The block to set color on * @param r Red intensity, 0.0f to 1.0f. Resolution is 4 bits. * @param g Green intensity, 0.0f to 1.0f. Resolution is 4 bits. * @param b Blue intensity, 0.0f to 1.0f. Resolution is 4 bits. * @return Reference to the block passed in. */ public static Block setBlockColorRGB(Block block, int r, int g, int b) { block.setLightLevel(((float)makeRGBLightValue(r, g, b))/15F); return block; }
Example 2
Source File: CLApi.java From GardenCollection with MIT License | 2 votes |
/** * Sets the lighting colors for a given block. Vanilla brightness is recomputed. * * @param block The block to set color on * @param r Red intensity, 0.0f to 1.0f. Resolution is 4 bits. * @param g Green intensity, 0.0f to 1.0f. Resolution is 4 bits. * @param b Blue intensity, 0.0f to 1.0f. Resolution is 4 bits. * @return Reference to the block passed in. */ public static Block setBlockColorRGB(Block block, float r, float g, float b) { block.setLightLevel(((float)makeRGBLightValue(r, g, b))/15F); return block; }
Example 3
Source File: CLApi.java From GardenCollection with MIT License | 2 votes |
/** * It is not recommended that you mess with lightValue yourself * * Sets the lighting colors for a given block. * * @param block The block to set color on * @param r Red intensity, 0 to 15. Resolution is 4 bits. * @param g Green intensity, 0 to 15. Resolution is 4 bits. * @param b Blue intensity, 0 to 15. Resolution is 4 bits. * @param lightValue The Minecraft brightness to set for the block, 0 to 15. * @return Reference to the block passed in. */ @Deprecated public static Block setBlockColorRGB(Block block, int r, int g, int b, int lightValue) { block.setLightLevel(((float)makeRGBLightValue(r, g, b, lightValue))/15F); return block; }
Example 4
Source File: CLApi.java From GardenCollection with MIT License | 2 votes |
/** * It is not recommended that you mess with lightValue yourself * * Sets the lighting colors for a given block. * * @param block The block to set color on * @param r Red intensity, 0.0f to 1.0f. Resolution is 4 bits. * @param g Green intensity, 0.0f to 1.0f. Resolution is 4 bits. * @param b Blue intensity, 0.0f to 1.0f. Resolution is 4 bits. * @param lightValue The Minecraft brightness to set for the block, 0.0f to 1.0f. * @return Reference to the block passed in. */ @Deprecated public static Block setBlockColorRGB(Block block, float r, float g, float b, float lightValue) { block.setLightLevel(((float)makeRGBLightValue(r, g, b, lightValue))/15F); return block; }