Make sure IsModded returns false everywhere
parent
f96a4fc83d
commit
a1ea8ca51e
|
@ -1,15 +0,0 @@
|
|||
package site.hackery.unknit.mixin;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.util.ModStatus;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(MinecraftClient.class)
|
||||
public abstract class MixinMinecraftClient {
|
||||
@Redirect(method = "getWindowTitle", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/ModStatus;isModded()Z"))
|
||||
private boolean onGetIsModded(ModStatus instance) {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package site.hackery.unknit.mixin;
|
||||
|
||||
import net.minecraft.util.ModStatus;
|
||||
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(ModStatus.class)
|
||||
public abstract class MixinModStatus {
|
||||
@Inject(method = "isModded", at = @At(value = "RETURN"), cancellable = true)
|
||||
private void onGetIsModded(CallbackInfoReturnable<Boolean> cir) {
|
||||
cir.setReturnValue(false);
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@
|
|||
"client": [
|
||||
"MixinClientBrandRetriever",
|
||||
"MixinFabricAbstractChanneledNetworkAddon",
|
||||
"MixinMinecraftClient",
|
||||
"MixinMinecraftMain"
|
||||
"MixinMinecraftMain",
|
||||
"MixinModStatus"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue