blob: 10b67f0264a0c6547c1734982cd61d948f8e0277 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package shcm.shsupercm.fabric.citresewn.mixin;
import net.minecraft.util.Identifier;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Identifier.class)
public class IdentifierMixin {
@Inject(method = "isPathValid(Ljava/lang/String;)Z", cancellable = true, at = @At("HEAD"))
private static void isPathValid(String path, CallbackInfoReturnable<Boolean> ci) {
if(path.startsWith("citresewn") || path.startsWith("optifine") || path.startsWith("mcpatcher"))
ci.setReturnValue(true); return;
}
}
|