fix assets
All checks were successful
/ Build BaseBand Loader (push) Successful in 1m25s

This commit is contained in:
Daniella / Tove 2024-06-11 20:15:50 +02:00
parent 1b67cf9d2e
commit 9b8ac6a3d5
Signed by: TudbuT
GPG key ID: B3CF345217F202D3

View file

@ -5,7 +5,6 @@ import de.tudbut.security.*;
import de.tudbut.security.permissionmanager.CallClassRestriction;
import de.tudbut.security.permissionmanager.ClassLoaderRestriction;
import de.tudbut.security.permissionmanager.PermissionOR;
import de.tudbut.tools.ReflectUtil;
import net.minecraft.launchwrapper.Launch;
import com.baseband.launcher.util.Util;
import org.spongepowered.asm.mixin.transformer.MixinTransformer;
@ -88,15 +87,11 @@ public class CustomClassLoader extends ClassLoader implements Util {
@Override
protected URL findResource(String name) {
final byte[][] data = {null};
//if (name.startsWith("assets/minecraft") && !name.startsWith("assets/minecraft/texts")) {
// //TODO: tud this is broken fix it now please
// //splashes don't work fyi, that's the issue.
// URL launchCLResponse = Launch.classLoader.findResource(name);
// if (launchCLResponse != null)
// return launchCLResponse;
//}
if (!name.endsWith(".class")) {
binaryKeeper.access(m -> data[0] = m.getValue().get(name));
while(name.startsWith("/"))
name = name.substring(1);
String finalName = name;
binaryKeeper.access(m -> data[0] = m.getValue().get(finalName));
}
if (data[0] == null) {