Skip to content

Commit 0ca7b48

Browse files
committed
1.21.11
Signed-off-by: Octol1ttle <[email protected]>
1 parent 4c6020b commit 0ca7b48

File tree

12 files changed

+66
-5
lines changed

12 files changed

+66
-5
lines changed

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
kotlin("jvm")
33
kotlin("plugin.serialization")
44
id("dev.isxander.modstitch.base") version "0.7.0-unstable"
5+
id("fabric-loom") version "1.14.6" apply false
56
id("me.modmuss50.mod-publish-plugin")
67
id("me.fallenbreath.yamlang") version "1.5.0"
78
}
@@ -68,7 +69,7 @@ modstitch {
6869
modName = mod.name
6970
modVersion = mod.version
7071

71-
fun <K, V> MapProperty<K, V>.populate(block: MapProperty<K, V>.() -> Unit) {
72+
fun <K : Any, V : Any> MapProperty<K, V>.populate(block: MapProperty<K, V>.() -> Unit) {
7273
block()
7374
}
7475

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ stonecutter {
3737
mc("1.21.1", "fabric", "neoforge")
3838
mc("1.21.6", "fabric")
3939
mc("1.21.9", "fabric")
40+
mc("1.21.11", "fabric")
4041
}
4142
}
4243

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package net.minecraft
2+
3+
//? if >=1.21.11 {
4+
/*typealias Util = net.minecraft.util.Util
5+
//}*/
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package net.minecraft.resources
2+
3+
//? if >=1.21.11
4+
/*typealias ResourceLocation = Identifier*/

src/main/kotlin/ru/octol1ttle/flightassistant/FlightAssistant.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ import ru.octol1ttle.flightassistant.config.FAConfig
1515
import ru.octol1ttle.flightassistant.impl.computer.ComputerHost
1616
import ru.octol1ttle.flightassistant.impl.display.HudDisplayHost
1717

18+
//? if >=1.21.11 {
19+
/*private val net.minecraft.client.Camera.xRot: Float
20+
get() = this.xRot()
21+
22+
private val net.minecraft.client.Camera.yRot: Float
23+
get() = this.yRot()
24+
*///?}
25+
1826
object FlightAssistant {
1927
const val MOD_ID: String = "flightassistant"
2028
internal val mc: Minecraft = Minecraft.getInstance()

src/main/kotlin/ru/octol1ttle/flightassistant/api/util/ScreenSpace.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ object ScreenSpace {
8686
return vec.x.toInt()
8787
}
8888

89+
//? if >=1.21.11 {
90+
/*private val net.minecraft.client.Camera.yRot: Float
91+
get() = this.yRot()
92+
*///?}
93+
8994
fun getY(pitch: Float): Int? {
9095
val vec: Vector3f = fromWorldSpace(Vec3.directionFromRotation(-pitch, mc.entityRenderDispatcher.camera!!.yRot), true)
9196
if (!isVisible(vec)) {

src/main/kotlin/ru/octol1ttle/flightassistant/api/util/extensions/GuiGraphicsExtensions.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ fun org.joml.Matrix3x2fStack.pop() {
152152

153153
//? if >=1.21.9 {
154154
/*fun GuiGraphics.renderOutline(x: Int, y: Int, width: Int, height: Int, color: Int) {
155-
submitOutline(x, y, width, height, color)
155+
//? if >=1.21.11 {
156+
/^renderOutline(
157+
^///?} else
158+
submitOutline(
159+
x, y, width, height, color)
156160
renderDeferredElements()
157161
}
158162
*///?}

src/main/kotlin/ru/octol1ttle/flightassistant/screen/components/CycleTextOnlyButton.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ class CycleTextOnlyButton<E : NameableEnum>(x: Int, y: Int, private val entries:
2424
refreshMessage()
2525
}
2626

27-
override fun renderWidget(guiGraphics: GuiGraphics, mouseX: Int, mouseY: Int, partialTick: Float) {
27+
//? if >=1.21.11 {
28+
/*override fun renderContents(
29+
*///?} else
30+
override fun renderWidget(
31+
guiGraphics: GuiGraphics, mouseX: Int, mouseY: Int, partialTick: Float) {
2832
val message: Component = TextOnlyButton.getMessageComponent(this)
2933

3034
this.width = font.width(message)

src/main/kotlin/ru/octol1ttle/flightassistant/screen/components/SmartStringWidget.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package ru.octol1ttle.flightassistant.screen.components
33
import net.minecraft.client.gui.components.StringWidget
44
import net.minecraft.network.chat.Component
55
import ru.octol1ttle.flightassistant.api.util.extensions.font
6+
//? if >=1.21.11
7+
/*import ru.octol1ttle.flightassistant.api.util.extensions.setColor*/
68

79
class SmartStringWidget(x: Int, y: Int, component: Component) : StringWidget(x, y, font.width(component), font.lineHeight, component, font) {
810
init {
@@ -25,4 +27,11 @@ class SmartStringWidget(x: Int, y: Int, component: Component) : StringWidget(x,
2527
this.x -= this.width
2628
return this
2729
}
30+
31+
//? if >=1.21.11 {
32+
/*fun setColor(color: Int): SmartStringWidget {
33+
this.message = this.message.copy().setColor(color)
34+
return this
35+
}
36+
*///?}
2837
}

0 commit comments

Comments
 (0)