MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / getStarBrightness

Method getStarBrightness

src/main/java/net/minecraft/world/World.java:1593–1599  ·  view source on GitHub ↗

How bright are stars in the sky

(float partialTicks)

Source from the content-addressed store, hash-verified

1591 * How bright are stars in the sky
1592 */
1593 public float getStarBrightness(float partialTicks)
1594 {
1595 float f = this.getCelestialAngle(partialTicks);
1596 float f1 = 1.0F - (MathHelper.cos(f * (float)Math.PI * 2.0F) * 2.0F + 0.25F);
1597 f1 = MathHelper.clamp_float(f1, 0.0F, 1.0F);
1598 return f1 * f1 * 0.5F;
1599 }
1600
1601 public void scheduleUpdate(BlockPos pos, Block blockIn, int delay)
1602 {

Callers 1

renderSkyMethod · 0.80

Calls 3

getCelestialAngleMethod · 0.95
cosMethod · 0.95
clamp_floatMethod · 0.95

Tested by

no test coverage detected