ScissorState .java

com.mojang.blaze3d.systems.ScissorState (class, 65 lines): members: setFrom, enable, disable, enabled, width, height. imports: EnvType.

com.mojang.blaze3d.systemsclass65 linesclient1.1 KB

API Surface (8)

void enable(final int x, final int y, final int width, final int height)
void disable()
boolean enabled()
int x()
int y()
int width()
int height()
void setFrom(final ScissorState state)

Fields & Constants (5)

enabled
x
y
width
height

Full Source

ScissorState.java65 lines · Minecraft 26.3 · verbatim
1
package com.mojang.blaze3d.systems;
2
3
import net.fabricmc.api.EnvType;
4
import net.fabricmc.api.Environment;
5
6
@Environment(EnvType.CLIENT)
7
public class ScissorState {
8
	private boolean enabled;
9
	private int x;
10
	private int y;
11
	private int width;
12
	private int height;
13
14
	public ScissorState() {
15
	}
16
17
	public ScissorState(final ScissorState state) {
18
		this.enabled = state.enabled;
19
		this.x = state.x;
20
		this.y = state.y;
21
		this.width = state.width;
22
		this.height = state.height;
23
	}
24
25
	public void enable(final int x, final int y, final int width, final int height) {
26
		this.enabled = true;
27
		this.x = x;
28
		this.y = y;
29
		this.width = width;
30
		this.height = height;
31
	}
32
33
	public void disable() {
34
		this.enabled = false;
35
	}
36
37
	public boolean enabled() {
38
		return this.enabled;
39
	}
40
41
	public int x() {
42
		return this.x;
43
	}
44
45
	public int y() {
46
		return this.y;
47
	}
48
49
	public int width() {
50
		return this.width;
51
	}
52
53
	public int height() {
54
		return this.height;
55
	}
56
57
	public void setFrom(final ScissorState state) {
58
		this.enabled = state.enabled;
59
		this.x = state.x;
60
		this.y = state.y;
61
		this.width = state.width;
62
		this.height = state.height;
63
	}
64
}
65

Decompiled Minecraft 26.3 source of ScissorState (com/mojang/blaze3d/systems/ScissorState.java) with Mojang official mappings, stored verbatim on the site.