blob: 06aafb9cc84101d1294def3ea10e138d2a188adf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
package moe.nea.ultranotifier.gui
import net.minecraft.client.gui.DrawContext
import net.minecraft.client.gui.screen.Screen
import net.minecraft.text.Text
//#if MC < 1.20.4
//$$import com.mojang.blaze3d.platform.GlStateManager
//#endif
class DrawingContext(
//#if MC > 1.20.4
val vanilla: DrawContext,
//#endif
) {
fun pushMatrix() {
//#if MC > 1.20.4
vanilla.matrices.push()
//#else
//$$ GlStateManager.pushMatrix()
//#endif
}
fun popMatrix() {
//#if MC > 1.20.4
vanilla.matrices.pop()
//#else
//$$ GlStateManager.popMatrix()
//#endif
}
fun translate(x: Double, y: Double, z: Double) {
//#if MC > 1.20.4
vanilla.matrices.translate(x, y, z)
//#else
//$$ GlStateManager.translate(x, y, z)
//#endif
}
fun scale(x: Float, y: Float, z: Float) {
//#if MC > 1.20.4
vanilla.matrices.scale(x, y, z)
//#else
//$$ GlStateManager.scale(x, y, z)
//#endif
}
}
abstract class BaseScreen(title: Text) : Screen(
//#if MC >= 11400
title
//#endif
) {
}
|