Skip to content

Commit fa1d4c1

Browse files
committed
project reset
1 parent cef0c58 commit fa1d4c1

File tree

11 files changed

+71
-71
lines changed

11 files changed

+71
-71
lines changed

neoforge/src/main/kotlin/xyz/bluspring/unitytranslate/neoforge/ConfigScreenHelper.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ package xyz.bluspring.unitytranslate.neoforge
33
import net.neoforged.fml.ModLoadingContext
44

55
//? if >= 1.20.6 {
6-
/*import net.neoforged.neoforge.client.gui.IConfigScreenFactory
7-
*///? } else {
6+
import net.neoforged.neoforge.client.gui.IConfigScreenFactory
7+
//?} else {
88
/*import net.neoforged.neoforge.client.ConfigScreenHandler
9-
*///? }
9+
*///?}
1010

1111
object ConfigScreenHelper {
1212
fun createConfigScreen() {
1313
//? if >= 1.20.6 {
1414
ModLoadingContext.get().registerExtensionPoint(IConfigScreenFactory::class.java) {
1515
IConfigScreenFactory { mc, prev ->
16-
//? } else {
17-
ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory::class.java) {
16+
//?} else {
17+
/*ModLoadingContext.get().registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory::class.java) {
1818
ConfigScreenHandler.ConfigScreenFactory { mc, prev ->
19-
//? }
19+
*///?}
2020
UTConfigScreen(prev)
2121
}
2222
}

neoforge/src/main/kotlin/xyz/bluspring/unitytranslate/neoforge/UnityTranslateNeoForge.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent
99
import net.neoforged.neoforge.client.event.RegisterKeyMappingsEvent
1010

1111
//? if >= 1.20.4 {
12-
/*import thedarkcolour.kotlinforforge.neoforge.forge.MOD_BUS
13-
*///? }
12+
import thedarkcolour.kotlinforforge.neoforge.forge.MOD_BUS
13+
//?}
1414

1515
import xyz.bluspring.unitytranslate.UnityTranslate
1616
import xyz.bluspring.unitytranslate.client.UnityTranslateClient
@@ -21,9 +21,9 @@ class UnityTranslateNeoForge {
2121
UnityTranslate()
2222
//? if >= 1.20.4 {
2323
MOD_BUS.register(this)
24-
//? } else {
25-
FMLJavaModLoadingContext.get().modEventBus.register(this)
26-
//? }
24+
//?} else {
25+
/*FMLJavaModLoadingContext.get().modEventBus.register(this)
26+
*///?}
2727
NeoForgeEvents.init()
2828
}
2929

src/main/kotlin/xyz/bluspring/unitytranslate/Language.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package xyz.bluspring.unitytranslate
55
import net.minecraft.network.codec.StreamCodec
66
import net.minecraft.network.codec.StreamDecoder
77
import net.minecraft.network.codec.StreamEncoder
8-
*///? }
8+
*///?}
99
import net.minecraft.network.chat.Component
1010
import xyz.bluspring.modernnetworking.api.NetworkCodecs
1111
import xyz.bluspring.unitytranslate.client.transcribers.TranscriberType

src/main/kotlin/xyz/bluspring/unitytranslate/UnityTranslate.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ class UnityTranslate(val proxy: PlatformProxy = ServiceLoader.load(PlatformProxy
5555
fun id(path: String): ResourceLocation {
5656
//? if >= 1.21 {
5757
/*return ResourceLocation.fromNamespaceAndPath(MOD_ID, path)
58-
*///? } else {
58+
*///?} else {
5959
return ResourceLocation(MOD_ID, path)
60-
//? }
60+
//?}
6161
}
6262

6363
fun saveConfig() {

src/main/kotlin/xyz/bluspring/unitytranslate/client/UnityTranslateClient.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package xyz.bluspring.unitytranslate.client
22

33
//? if >= 1.20.6 {
44
/*import xyz.bluspring.unitytranslate.network.payloads.SendTranscriptToServerPayload
5-
*///? }
5+
*///?}
66
import com.mojang.blaze3d.platform.InputConstants
77
import kotlinx.coroutines.CoroutineStart
88
import kotlinx.coroutines.launch

src/main/kotlin/xyz/bluspring/unitytranslate/client/gui/EditTranscriptBoxesScreen.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package xyz.bluspring.unitytranslate.client.gui
22

33
//? if >= 1.20.6 {
44
/*import xyz.bluspring.unitytranslate.network.payloads.SetUsedLanguagesPayload
5-
*///? }
5+
*///?}
66
import net.minecraft.client.Minecraft
77
import net.minecraft.client.gui.GuiGraphics
88
import net.minecraft.client.gui.components.Button
@@ -91,9 +91,9 @@ class EditTranscriptBoxesScreen(val boxes: MutableList<TranscriptBox>, val paren
9191
if (Minecraft.getInstance().player == null) { // assume user is currently configuring in the config screen
9292
//? if >= 1.20.4 {
9393
/*this.renderBackground(guiGraphics, mouseX, mouseY, partialTick)
94-
*///? } else {
94+
*///?} else {
9595
this.renderBackground(guiGraphics)
96-
//? }
96+
//?}
9797

9898
for (box in boxes) {
9999
box.render(guiGraphics, partialTick)
@@ -168,7 +168,7 @@ class EditTranscriptBoxesScreen(val boxes: MutableList<TranscriptBox>, val paren
168168
super.renderBackground(guiGraphics, mouseX, mouseY, partialTick)
169169
}
170170
}
171-
*///? }
171+
*///?}
172172

173173
override fun mouseClicked(mouseX: Double, mouseY: Double, button: Int): Boolean {
174174
val result = super.mouseClicked(mouseX, mouseY, button)

src/main/kotlin/xyz/bluspring/unitytranslate/client/gui/LanguageSelectScreen.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class LanguageSelectScreen(val parent: Screen?, val type: LanguageSelectType) :
3838
override fun render(guiGraphics: GuiGraphics, mouseX: Int, mouseY: Int, partialTick: Float) {
3939
//? if >= 1.20.4 {
4040
/*this.renderBackground(guiGraphics, mouseX, mouseY, partialTick)
41-
*///? } else {
41+
*///?} else {
4242
this.renderBackground(guiGraphics)
43-
//? }
43+
//?}
4444
super.render(guiGraphics, mouseX, mouseY, partialTick)
4545

4646
guiGraphics.drawCenteredString(font, Component.translatable(
@@ -99,11 +99,11 @@ class LanguageSelectScreen(val parent: Screen?, val type: LanguageSelectType) :
9999
this@LanguageSelectScreen.width, this@LanguageSelectScreen.height
100100
//? if >= 1.20.4 {
101101
/*- 75
102-
*///? }
102+
*///?}
103103
, 32,
104104
//? if <= 1.20.1 {
105105
this@LanguageSelectScreen.height - 65 + 4,
106-
//? }
106+
//?}
107107
18
108108
) {
109109
init {

src/main/kotlin/xyz/bluspring/unitytranslate/client/gui/OpenBrowserScreen.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ class OpenBrowserScreen(val address: String) : Screen(Component.empty()) {
5555
override fun render(guiGraphics: GuiGraphics, mouseX: Int, mouseY: Int, partialTick: Float) {
5656
//? if >= 1.20.4 {
5757
/*this.renderBackground(guiGraphics, mouseX, mouseY, partialTick)
58-
*///? } else {
58+
*///?} else {
5959
this.renderBackground(guiGraphics)
60-
//? }
60+
//?}
6161
super.render(guiGraphics, mouseX, mouseY, partialTick)
6262

6363
val split = this.font.split(FormattedText.of(I18n.get("unitytranslate.open_browser.prompt")), this.width / 2)

src/main/kotlin/xyz/bluspring/unitytranslate/client/gui/UTConfigScreen.kt

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
2727
//? if >= 1.20.2 {
2828
/*val ARROW_UP = UnityTranslate.id("arrow_up")
2929
val ARROW_DOWN = UnityTranslate.id("arrow_down")
30-
*///? } else {
30+
*///?} else {
3131
val ARROW_UP = UnityTranslate.id("textures/gui/sprites/arrow_up.png")
3232
val ARROW_DOWN = UnityTranslate.id("textures/gui/sprites/arrow_down.png")
33-
//? }
33+
//?}
3434
}
3535

3636
override fun init() {
@@ -65,8 +65,8 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
6565

6666
override fun render(guiGraphics: GuiGraphics, mouseX: Int, mouseY: Int, partialTick: Float) {
6767
//? if < 1.20.4 {
68-
/*this.renderBackground(guiGraphics)
69-
*///? }
68+
this.renderBackground(guiGraphics)
69+
//?}
7070

7171
super.render(guiGraphics, mouseX, mouseY, partialTick)
7272

@@ -253,25 +253,25 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
253253

254254
//? if >= 1.20.4 {
255255
/*addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
256-
*///? } else {
256+
*///?} else {
257257
addRenderableWidget(TextAndImageButton.builder(Component.empty(), ARROW_UP) {
258-
//? }
258+
//?}
259259
member.setter.call(instance, Mth.clamp(value + range.increment, min, max))
260260
this.rebuildWidgets()
261261
//? if >= 1.20.4 {
262262
/*}, true)
263-
*///? } else {
263+
*///?} else {
264264
}
265-
//? }
265+
//?}
266266
//? if >= 1.20.4 {
267267
/*.sprite(ARROW_UP, 8, 8)
268268
.size(12, 12)
269-
*///? } else {
269+
*///?} else {
270270
.offset(0, 2)
271271
.texStart(0, 0)
272272
.textureSize(8, 8)
273273
.usedTextureSize(8, 8)
274-
//? }
274+
//?}
275275
.build()
276276
.apply {
277277
this.x = this@UTConfigSubScreen.width - 18
@@ -288,25 +288,25 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
288288

289289
//? if >= 1.20.4 {
290290
/*addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
291-
*///? } else {
291+
*///?} else {
292292
addRenderableWidget(TextAndImageButton.builder(Component.empty(), ARROW_DOWN) {
293-
//? }
293+
//?}
294294
member.setter.call(instance, Mth.clamp(value - range.increment, min, max))
295295
this.rebuildWidgets()
296296
//? if >= 1.20.4 {
297297
/*}, true)
298-
*///? } else {
298+
*///?} else {
299299
}
300-
//? }
300+
//?}
301301
//? if >= 1.20.4 {
302302
/*.sprite(ARROW_DOWN, 8, 8)
303303
.size(12, 12)
304-
*///? } else {
304+
*///?} else {
305305
.offset(0, 2)
306306
.texStart(0, 0)
307307
.textureSize(8, 8)
308308
.usedTextureSize(8, 8)
309-
//? }
309+
//?}
310310
.build()
311311
.apply {
312312
this.x = this@UTConfigSubScreen.width - 18
@@ -342,25 +342,25 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
342342

343343
//? if >= 1.20.4 {
344344
/*addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
345-
*///? } else {
345+
*///?} else {
346346
addRenderableWidget(TextAndImageButton.builder(Component.empty(), ARROW_UP) {
347-
//? }
347+
//?}
348348
member.setter.call(instance, Mth.clamp(value + range.increment, min, max))
349349
this.rebuildWidgets()
350350
//? if >= 1.20.4 {
351351
/*}, true)
352-
*///? } else {
352+
*///?} else {
353353
}
354-
//? }
354+
//?}
355355
//? if >= 1.20.4 {
356356
/*.sprite(ARROW_UP, 8, 8)
357357
.size(12, 12)
358-
*///? } else {
358+
*///?} else {
359359
.offset(0, 2)
360360
.texStart(0, 0)
361361
.textureSize(8, 8)
362362
.usedTextureSize(8, 8)
363-
//? }
363+
//?}
364364
.build()
365365
.apply {
366366
this.x = this@UTConfigSubScreen.width - 18
@@ -377,25 +377,25 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
377377

378378
//? if >= 1.20.4 {
379379
/*addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
380-
*///? } else {
380+
*///?} else {
381381
addRenderableWidget(TextAndImageButton.builder(Component.empty(), ARROW_DOWN) {
382-
//? }
382+
//?}
383383
member.setter.call(instance, Mth.clamp(value - range.increment, min, max))
384384
this.rebuildWidgets()
385385
//? if >= 1.20.4 {
386386
/*}, true)
387-
*///? } else {
387+
*///?} else {
388388
}
389-
//? }
389+
//?}
390390
//? if >= 1.20.4 {
391391
/*.sprite(ARROW_DOWN, 8, 8)
392392
.size(12, 12)
393-
*///? } else {
393+
*///?} else {
394394
.offset(0, 2)
395395
.texStart(0, 0)
396396
.textureSize(8, 8)
397397
.usedTextureSize(8, 8)
398-
//? }
398+
//?}
399399
.build()
400400
.apply {
401401
this.x = this@UTConfigSubScreen.width - 18
@@ -468,28 +468,28 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
468468
private fun <T> addArrows(x: Int, y: Int, index: Int, actualValue: MutableList<T>) {
469469
//? if >= 1.20.4 {
470470
/*addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
471-
*///? } else {
471+
*///?} else {
472472
addRenderableWidget(TextAndImageButton.builder(Component.empty(), ARROW_UP) {
473-
//? }
473+
//?}
474474
val oldValue = actualValue[index]
475475
val oldPrevValue = actualValue[index - 1]
476476
actualValue[index - 1] = oldValue
477477
actualValue[index] = oldPrevValue
478478
this.rebuildWidgets()
479479
//? if >= 1.20.4 {
480480
/*}, true)
481-
*///? } else {
481+
*///?} else {
482482
}
483-
//? }
483+
//?}
484484
//? if >= 1.20.4 {
485485
/*.sprite(ARROW_UP, 8, 8)
486486
.size(12, 12)
487-
*///? } else {
487+
*///?} else {
488488
.offset(0, 2)
489489
.texStart(0, 0)
490490
.textureSize(8, 8)
491491
.usedTextureSize(8, 8)
492-
//? }
492+
//?}
493493
.build()
494494
.apply {
495495
this.x = x
@@ -503,28 +503,28 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
503503

504504
//? if >= 1.20.4 {
505505
/*addRenderableWidget(SpriteIconButton.builder(Component.empty(), {
506-
*///? } else {
506+
*///?} else {
507507
addRenderableWidget(TextAndImageButton.builder(Component.empty(), ARROW_DOWN) {
508-
//? }
508+
//?}
509509
val oldValue = actualValue[index]
510510
val oldPrevValue = actualValue[index + 1]
511511
actualValue[index + 1] = oldValue
512512
actualValue[index] = oldPrevValue
513513
this.rebuildWidgets()
514514
//? if >= 1.20.4 {
515515
/*}, true)
516-
*///? } else {
516+
*///?} else {
517517
}
518-
//? }
518+
//?}
519519
//? if >= 1.20.4 {
520520
/*.sprite(ARROW_DOWN, 8, 8)
521521
.size(12, 12)
522-
*///? } else {
522+
*///?} else {
523523
.offset(0, 2)
524524
.texStart(0, 0)
525525
.textureSize(8, 8)
526526
.usedTextureSize(8, 8)
527-
//? }
527+
//?}
528528
.build()
529529
.apply {
530530
this.x = x
@@ -544,9 +544,9 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
544544
override fun render(guiGraphics: GuiGraphics, mouseX: Int, mouseY: Int, partialTick: Float) {
545545
//? if >= 1.20.4 {
546546
/*this.renderBackground(guiGraphics, mouseX, mouseY, partialTick)
547-
*///? } else {
547+
*///?} else {
548548
this.renderBackground(guiGraphics)
549-
//? }
549+
//?}
550550

551551
guiGraphics.fill(0, 50, this.width, this.height - 50, FastColor.ARGB32.color(150, 0, 0, 0))
552552
guiGraphics.drawCenteredString(this.font, this.title, this.width / 2, 20, 16777215)
@@ -634,9 +634,9 @@ class UTConfigScreen(private val parent: Screen?) : Screen(Component.literal("Un
634634
override fun mouseScrolled(mouseX: Double, mouseY: Double,
635635
//? if >= 1.20.4 {
636636
/*scrollX: Double, delta: Double
637-
*///? } else {
637+
*///?} else {
638638
delta: Double
639-
//? }
639+
//?}
640640
): Boolean {
641641
this.scrollAmount = Mth.clamp(this.scrollAmount - delta * (this.maxPosition / 4.0), 0.0, this.maxScroll.toDouble())
642642
updateScroll()

0 commit comments

Comments
 (0)