From c239badb14b207ccc370aeb30c481e88323a7438 Mon Sep 17 00:00:00 2001 From: Daniel Orr Date: Thu, 17 Oct 2024 19:04:54 +0100 Subject: [PATCH] Remove resource pack test --- .../dev/andante/audience/test/AudienceTest.kt | 38 ------------------- 1 file changed, 38 deletions(-) diff --git a/src/test/kotlin/dev/andante/audience/test/AudienceTest.kt b/src/test/kotlin/dev/andante/audience/test/AudienceTest.kt index ab11f03..7d720d5 100644 --- a/src/test/kotlin/dev/andante/audience/test/AudienceTest.kt +++ b/src/test/kotlin/dev/andante/audience/test/AudienceTest.kt @@ -5,19 +5,13 @@ import com.mojang.serialization.JsonOps import dev.andante.audience.Audience import dev.andante.audience.player.PlayerSet import dev.andante.audience.player.StandalonePlayerReference -import dev.andante.audience.resource.ByteResourcePack import net.fabricmc.api.ModInitializer -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents import org.slf4j.LoggerFactory -import java.nio.file.Path -import kotlin.io.path.readBytes import kotlin.math.sin import kotlin.time.measureTimedValue object AudienceTest : ModInitializer { - private const val TEST_RESOURCE_PACK: Boolean = false - private val logger = LoggerFactory.getLogger("Audience Test") override fun onInitialize() { @@ -32,38 +26,6 @@ object AudienceTest : ModInitializer { } } - if (TEST_RESOURCE_PACK) { - val byteArray = try { - Path.of("resources.zip").readBytes() - } catch (exception: Exception) { - logger.error("No resources.zip", exception) - throw exception - } - - val resourcePack = ByteResourcePack(byteArray) - - val otherByteArray = try { - Path.of("resources2.zip").readBytes() - } catch (exception: Exception) { - logger.error("No resources2.zip", exception) - throw exception - } - - val otherResourcePack = ByteResourcePack(otherByteArray) - - val resourcePackServer = ResourcePackServer("localhost", 25566).apply { - registerResourcePack(resourcePack) - registerResourcePack(otherResourcePack) - } - - resourcePackServer.startServer() - println("Started server on port ${resourcePackServer.port}") - - ServerLifecycleEvents.SERVER_STOPPING.register { - resourcePackServer.stopServer() - } - } - // test player reference codec IO (ensure possible migration of old uuids) val input = "{\"uuid\":\"50c7e7c5-2407-4102-875f-e4b1f49ea61a\"}" val inputJson = JsonParser.parseString(input)