ColorMapColorUtil .java

net.minecraft.world.level.ColorMapColorUtil (interface, 12 lines): interface declaring 1 method. members: get.

net.minecraft.world.levelinterface12 linescommon362 B

API Surface (0)

No public/protected methods detected (fields or constants only).

Full Source

ColorMapColorUtil.java12 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level;
2
3
public interface ColorMapColorUtil {
4
	static int get(final double temp, double rain, final int[] pixels, final int defaultMapColor) {
5
		rain *= temp;
6
		int x = (int)((1.0 - temp) * 255.0);
7
		int y = (int)((1.0 - rain) * 255.0);
8
		int index = y << 8 | x;
9
		return index >= pixels.length ? defaultMapColor : pixels[index];
10
	}
11
}
12

Decompiled Minecraft 26.3 source of ColorMapColorUtil (net/minecraft/world/level/ColorMapColorUtil.java) with Mojang official mappings, stored verbatim on the site.