Skip to content

Commit

Permalink
test: resources.zip
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Oct 20, 2024
1 parent afb75fe commit ecf2a10
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/test/kotlin/dev/andante/audience/test/AudienceTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import dev.andante.audience.resource.ResourcePackHandler
import net.fabricmc.api.ModInitializer
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents
import net.fabricmc.fabric.api.networking.v1.ServerConfigurationConnectionEvents
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents
import net.minecraft.command.argument.EntityArgumentType.player
import net.minecraft.server.MinecraftServer
import net.minecraft.server.network.SendResourcePackTask
import net.minecraft.text.Text
import org.slf4j.LoggerFactory
import java.util.UUID
import kotlin.io.path.Path
import kotlin.io.path.readBytes
import kotlin.math.sin
Expand Down Expand Up @@ -69,5 +71,9 @@ object AudienceTest : ModInitializer {
val reference = handler.debugProfile as PlayerReference
println(reference.hardReference)
}

ServerConfigurationConnectionEvents.CONFIGURE.register { handler, server ->
handler.addTask(SendResourcePackTask(MinecraftServer.ServerResourcePackProperties(UUID.randomUUID(), "http://localhost:25565/${packOne.hash}", packOne.hash, true, Text.literal("EEEE"))))
}
}
}

0 comments on commit ecf2a10

Please sign in to comment.