CameraType .java

net.minecraft.client.CameraType (enum, 33 lines): members: FIRST_PERSON, THIRD_PERSON_BACK, THIRD_PERSON_FRONT, isMirrored, mirrored, isFirstPerson, cycle.

net.minecraft.clientenum33 linesclient721 B

API Surface (3)

boolean isFirstPerson()
boolean isMirrored()
CameraType cycle()

Fields & Constants (3)

VALUES
firstPerson
mirrored

Full Source

CameraType.java33 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.client;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
6
@Environment(EnvType.CLIENT)
7
public enum CameraType {
8
	FIRST_PERSON(true, false),
9
	THIRD_PERSON_BACK(false, false),
10
	THIRD_PERSON_FRONT(false, true);
11
12
	private static final CameraType[] VALUES = values();
13
	private final boolean firstPerson;
14
	private final boolean mirrored;
15
16
	CameraType(final boolean firstPerson, final boolean mirrored) {
17
		this.firstPerson = firstPerson;
18
		this.mirrored = mirrored;
19
	}
20
21
	public boolean isFirstPerson() {
22
		return this.firstPerson;
23
	}
24
25
	public boolean isMirrored() {
26
		return this.mirrored;
27
	}
28
29
	public CameraType cycle() {
30
		return VALUES[(this.ordinal() + 1) % VALUES.length];
31
	}
32
}
33

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