Skip to content

Commit

Permalink
dont duplicate classpath
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Aug 1, 2024
1 parent df32ef1 commit 0eed649
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.polyfrost.spice.patcher.loadCache
import org.polyfrost.spice.platform.api.IClassTransformer
import org.polyfrost.spice.platform.api.Transformer
import org.polyfrost.spice.platform.bootstrapTransformer
import org.polyfrost.spice.platform.impl.fabric.util.collectResources
import org.polyfrost.spice.util.collectResources
import org.polyfrost.spice.util.UrlByteArrayConnection
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin
import org.spongepowered.asm.mixin.extensibility.IMixinInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.polyfrost.spice.platform.api.IClassTransformer
import org.polyfrost.spice.platform.api.Transformer
import org.polyfrost.spice.platform.bootstrapTransformer
import org.polyfrost.spice.platform.impl.forge.util.LaunchWrapperLogger
import org.polyfrost.spice.platform.impl.forge.util.collectResources
import org.polyfrost.spice.util.collectResources
import org.polyfrost.spice.util.SpiceClassWriter
import java.net.URL
import java.util.concurrent.TimeUnit
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
package org.polyfrost.spice.platform.impl.fabric.util
package org.polyfrost.spice.util

import java.io.File
import java.net.URL
import java.util.jar.JarInputStream

//TODO we can probably move this to core

fun collectResources(urls: Array<URL>): List<String> =
urls
.filter { it.protocol != "spice" }
.filter { it.protocol != "spice"
//#if FORGE
&& it.protocol != "asmgen"
//#endif
}
.map {
runCatching {
val file = File(it.toURI())
Expand Down

0 comments on commit 0eed649

Please sign in to comment.