Created
August 13, 2017 01:01
-
-
Save elucent/b7a1fafee6ee0a23cffb0ff5c7108c76 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public int getBrightnessForRender(float partialTicks){ | |
float f = 0.5F; | |
f = MathHelper.clamp_float(f, 0.0F, 1.0F); | |
int i = super.getBrightnessForRender(partialTicks); | |
int j = i & 255; | |
int k = i >> 16 & 255; | |
j = j + (int)(f * 15.0F * 16.0F); | |
if (j > 240) | |
{ | |
j = 240; | |
} | |
return j | k << 16; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment