From 3d00768a93ba3515a914c80c4872a80d53fdc6a1 Mon Sep 17 00:00:00 2001 From: btwonion Date: Sat, 19 Oct 2024 17:10:40 +0200 Subject: [PATCH] reset vcs --- .../kotlin/dev/nyon/autodrop/config/ConfigHandler.kt | 2 +- .../config/screen/ignored/IgnoredSlotsScreen.kt | 12 ++++++------ .../kotlin/dev/nyon/autodrop/extensions/Component.kt | 4 ++-- .../dev/nyon/autodrop/extensions/Serializers.kt | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/kotlin/dev/nyon/autodrop/config/ConfigHandler.kt b/src/main/kotlin/dev/nyon/autodrop/config/ConfigHandler.kt index 58e85d9..bdb7bce 100644 --- a/src/main/kotlin/dev/nyon/autodrop/config/ConfigHandler.kt +++ b/src/main/kotlin/dev/nyon/autodrop/config/ConfigHandler.kt @@ -35,7 +35,7 @@ internal fun migrate( archiveObject["items"]?.jsonArray?.map secMap@{ content -> val resourceLocation = resourceLocation(content.jsonPrimitive.contentOrNull ?: return null) return@secMap ItemIdentifier( - resourceLocation?.let { BuiltInRegistries.ITEM.get(it)/*? if >=1.21.2 {*/.getOrNull()?.value()/*?}*/ }, emptyStoredComponents, 1 + resourceLocation?.let { BuiltInRegistries.ITEM.get(it)/*? if >=1.21.2 {*//*.getOrNull()?.value()*//*?}*/ }, emptyStoredComponents, 1 ) }?.toMutableList() ?: return null, archiveObject["lockedSlots"]?.jsonArray?.map secMap@{ content -> diff --git a/src/main/kotlin/dev/nyon/autodrop/config/screen/ignored/IgnoredSlotsScreen.kt b/src/main/kotlin/dev/nyon/autodrop/config/screen/ignored/IgnoredSlotsScreen.kt index 7f85344..51655cc 100644 --- a/src/main/kotlin/dev/nyon/autodrop/config/screen/ignored/IgnoredSlotsScreen.kt +++ b/src/main/kotlin/dev/nyon/autodrop/config/screen/ignored/IgnoredSlotsScreen.kt @@ -13,7 +13,7 @@ import net.minecraft.client.gui.components.Button import net.minecraft.client.gui.components.EditBox import net.minecraft.client.gui.screens.Screen //? if >=1.21.2 -import net.minecraft.client.renderer.CoreShaders +/*import net.minecraft.client.renderer.CoreShaders*/ import net.minecraft.client.renderer.GameRenderer import net.minecraft.client.renderer.RenderType import dev.nyon.autodrop.minecraft as internalMinecraft @@ -79,7 +79,7 @@ class IgnoredSlotsScreen(private val archive: Archive, private val parent: Scree ?: error("Failed to load inventory slot guide image.") val imageSize = height / 2 - RenderSystem.setShader(/*? if <1.21.2 {*//*GameRenderer::getPositionTexShader*//*?} else {*/CoreShaders.POSITION_TEX/*?}*/) + RenderSystem.setShader(/*? if <1.21.2 {*/GameRenderer::getPositionTexShader/*?} else {*//*CoreShaders.POSITION_TEX*//*?}*/) RenderSystem.setShaderTexture(0, imageLocation) RenderSystem.enableBlend() @@ -87,7 +87,7 @@ class IgnoredSlotsScreen(private val archive: Archive, private val parent: Scree RenderSystem.enableDepthTest() /*? if >=1.21.2 {*/ - guiGraphics.blit( + /*guiGraphics.blit( RenderType::guiTextured, imageLocation, internalMinecraft.screen!!.width / 2 - imageSize / 2, @@ -99,8 +99,8 @@ class IgnoredSlotsScreen(private val archive: Archive, private val parent: Scree imageSize, imageSize ) - /*?} else {*/ - /*guiGraphics.blit( + *//*?} else {*/ + guiGraphics.blit( imageLocation, internalMinecraft.screen!!.width / 2 - imageSize / 2, OUTER_PAD + INNER_PAD * 2 + internalMinecraft.font.lineHeight + 20, @@ -112,7 +112,7 @@ class IgnoredSlotsScreen(private val archive: Archive, private val parent: Scree imageSize, imageSize ) - *//*?}*/ + /*?}*/ } override fun shouldCloseOnEsc(): Boolean { diff --git a/src/main/kotlin/dev/nyon/autodrop/extensions/Component.kt b/src/main/kotlin/dev/nyon/autodrop/extensions/Component.kt index 21defd3..2bb2496 100644 --- a/src/main/kotlin/dev/nyon/autodrop/extensions/Component.kt +++ b/src/main/kotlin/dev/nyon/autodrop/extensions/Component.kt @@ -11,8 +11,8 @@ fun screenComponent(key: String, vararg objects: Any): MutableComponent { val Item.narration: Component get() { //? if >=1.21.2 - return this.name + /*return this.name*/ //? if <1.21.2 - /*return Component.literal(this.description.toString())*/ + return Component.literal(this.description.toString()) } \ No newline at end of file diff --git a/src/main/kotlin/dev/nyon/autodrop/extensions/Serializers.kt b/src/main/kotlin/dev/nyon/autodrop/extensions/Serializers.kt index 508f3b1..2a2ca04 100644 --- a/src/main/kotlin/dev/nyon/autodrop/extensions/Serializers.kt +++ b/src/main/kotlin/dev/nyon/autodrop/extensions/Serializers.kt @@ -23,7 +23,7 @@ object ItemSerializer : KSerializer { override fun deserialize(decoder: Decoder): Item { val resourceLocation = resourceLocation(decoder.decodeString())!! - return BuiltInRegistries.ITEM.get(resourceLocation)/*? if >=1.21.2 {*/.get().value()/*?}*/ + return BuiltInRegistries.ITEM.get(resourceLocation)/*? if >=1.21.2 {*//*.get().value()*//*?}*/ } override fun serialize(