Skip to content

Commit

Permalink
fix missing resources on shadeapi
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed May 9, 2024
1 parent bed33f3 commit 2da2270
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,15 @@ abstract class ShadeAPI @Inject constructor(@Internal val jvmdg: JVMDowngraderEx
os.write(writer.toByteArray())
}
}
forEachInZip(inputFile.get().asFile.toPath()) { name, stream ->
if (!name.endsWith(".class")) {
val path = fs.getPath(name)
path.parent?.createDirectories()
path.outputStream(StandardOpenOption.CREATE).use { os ->
stream.copyTo(os)
}
}
}
}
from(project.zipTree(tempOutput))
copy()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
@Adapter(value = "java/util/random/RandomGenerator")
public interface J_U_R_RandomGenerator {

public static boolean jvmdg$instanceof(Object obj) {
static boolean jvmdg$instanceof(Object obj) {
return obj instanceof J_U_R_RandomGenerator ||
obj instanceof java.util.Random;
}

public static J_U_R_RandomGenerator jvmdg$checkcast(Object obj) {
static J_U_R_RandomGenerator jvmdg$checkcast(Object obj) {
if (obj instanceof Random) {
throw MissingStubError.create();
}
Expand Down

0 comments on commit 2da2270

Please sign in to comment.