BrightnessCombiner .java

net.minecraft.client.renderer.blockentity.BrightnessCombiner (class): members: acceptDouble, acceptSingle, acceptNone. imports: Combiner, Int2IntFunction.

net.minecraft.client.renderer.blockentityclass26 linesclientextends BlockEntity>868 B

Implements

API Surface (3)

Int2IntFunction acceptDouble(final S first, final S second)
Int2IntFunction acceptSingle(final S single)
Int2IntFunction acceptNone()

Code Graph: Dependencies (3)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

BrightnessCombiner.java26 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client.renderer.blockentity;
2
3
import it.unimi.dsi.fastutil.ints.Int2IntFunction;
4
import net.fabricmc.api.EnvType;
5
import net.fabricmc.api.Environment;
6
import net.minecraft.util.LightCoordsUtil;
7
import net.minecraft.world.level.block.DoubleBlockCombiner.Combiner;
8
import net.minecraft.world.level.block.entity.BlockEntity;
9
10
@Environment(EnvType.CLIENT)
11
public class BrightnessCombiner<S extends BlockEntity> implements Combiner<S, Int2IntFunction> {
12
	public Int2IntFunction acceptDouble(final S first, final S second) {
13
		return i -> LightCoordsUtil.max(
14
			LightCoordsUtil.getLightCoords(first.getLevel(), first.getBlockPos()), LightCoordsUtil.getLightCoords(second.getLevel(), second.getBlockPos())
15
		);
16
	}
17
18
	public Int2IntFunction acceptSingle(final S single) {
19
		return i -> i;
20
	}
21
22
	public Int2IntFunction acceptNone() {
23
		return i -> i;
24
	}
25
}
26

Decompiled Minecraft 26.3 source of BrightnessCombiner (net/minecraft/client/renderer/blockentity/BrightnessCombiner.java) with Mojang official mappings, stored verbatim on the site.