IndexType .java

com.mojang.renderpearl.api.pipeline.IndexType (enum, 21 lines): enum with 2 constants. members: SHORT, INT, least, bytes. imports: EnvType.

com.mojang.renderpearl.api.pipelineenum21 linesclient376 B

API Surface (1)

IndexType least(final int length)

Fields & Constants (1)

bytes

Full Source

IndexType.java21 lines · Minecraft 26.3 · verbatim
1
package com.mojang.renderpearl.api.pipeline;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
6
@Environment(EnvType.CLIENT)
7
public enum IndexType {
8
	SHORT(2),
9
	INT(4);
10
11
	public final int bytes;
12
13
	IndexType(final int bytes) {
14
		this.bytes = bytes;
15
	}
16
17
	public static IndexType least(final int length) {
18
		return (length & -65536) != 0 ? INT : SHORT;
19
	}
20
}
21

Decompiled Minecraft 26.3 source of IndexType (com/mojang/renderpearl/api/pipeline/IndexType.java) with Mojang official mappings, stored verbatim on the site.