Make sure IsModded returns false everywhere
This commit is contained in:
parent
f96a4fc83d
commit
a1ea8ca51e
3 changed files with 17 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
}
|
15
src/main/java/site/hackery/unknit/mixin/MixinModStatus.java
Normal file
15
src/main/java/site/hackery/unknit/mixin/MixinModStatus.java
Normal file
|
@ -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 a new issue