This commit is contained in:
bluepanee
2023-06-20 21:08:47 +05:00
committed by GitHub
parent b5a8fb0493
commit 9760dc2968
14 changed files with 68 additions and 64 deletions

View File

@@ -3,6 +3,7 @@ package anticope.rejects.mixin;
import anticope.rejects.mixininterface.INoRender;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.systems.modules.render.NoRender;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ChatInputSuggestor;
import net.minecraft.client.util.math.MatrixStack;
import org.spongepowered.asm.mixin.Mixin;
@@ -13,7 +14,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ChatInputSuggestor.class)
public class CommandSuggestorMixin {
@Inject(method = "render", at = @At(value = "HEAD"), cancellable = true)
public void onRenderCommandSuggestion(MatrixStack matrices, int mouseX, int mouseY, CallbackInfo info) {
public void onRenderCommandSuggestion(DrawContext context, int mouseX, int mouseY, CallbackInfo info) {
if (((INoRender) Modules.get().get(NoRender.class)).noCommandSuggestions()) info.cancel();
}
}