aboutsummaryrefslogtreecommitdiff
path: root/src/test/kotlin/io
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2024-04-12 14:32:41 +0200
committerGitHub <noreply@github.com>2024-04-12 14:32:41 +0200
commitafd3f0f861ebe7f8957eb6abc6e19f92c7b5896a (patch)
tree0e7990ed1e7083dd4da5f90a842d0122919f8c7c /src/test/kotlin/io
parenta4a1c15a0b0de01e862c0f11882b45fee2c0cca7 (diff)
downloadNotEnoughUpdates-afd3f0f861ebe7f8957eb6abc6e19f92c7b5896a.tar.gz
NotEnoughUpdates-afd3f0f861ebe7f8957eb6abc6e19f92c7b5896a.tar.bz2
NotEnoughUpdates-afd3f0f861ebe7f8957eb6abc6e19f92c7b5896a.zip
Add in-game updater (#1050)
Co-authored-by: IRONM00N <64110067+IRONM00N@users.noreply.github.com>
Diffstat (limited to 'src/test/kotlin/io')
-rw-r--r--src/test/kotlin/io/github/moulberry/notenoughupdates/util/BootstrapHook.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/kotlin/io/github/moulberry/notenoughupdates/util/BootstrapHook.kt b/src/test/kotlin/io/github/moulberry/notenoughupdates/util/BootstrapHook.kt
index cab10aaa..7aea2ca6 100644
--- a/src/test/kotlin/io/github/moulberry/notenoughupdates/util/BootstrapHook.kt
+++ b/src/test/kotlin/io/github/moulberry/notenoughupdates/util/BootstrapHook.kt
@@ -23,6 +23,7 @@ import net.minecraft.block.Block
import net.minecraft.block.BlockFire
import net.minecraft.init.Bootstrap
import net.minecraft.item.Item
+import net.minecraft.launchwrapper.Launch
import org.junit.jupiter.api.extension.BeforeAllCallback
import org.junit.jupiter.api.extension.Extension
import org.junit.jupiter.api.extension.ExtensionContext
@@ -40,7 +41,8 @@ class BootstrapHook : BeforeAllCallback, Extension {
try {
if (!bootstrapped) {
bootstrapped = true
-
+ Launch.blackboard = HashMap()
+ Launch.blackboard.put("fml.deobfuscatedEnvironment", true)
Bootstrap::class.java.getDeclaredField("alreadyRegistered").also { it.isAccessible = true }
.set(null, true)
Block.registerBlocks()