1.21 update

update to 1.21, remove timer
This commit is contained in:
kawaiizenbo 2024-06-15 16:38:24 -07:00
parent c68631010d
commit 69b444c3c2
11 changed files with 36 additions and 31 deletions

View file

@ -11,18 +11,16 @@ import me.kawaiizenbo.moonlight.ui.HUDOverlay;
import me.kawaiizenbo.moonlight.ui.ModulesListOverlay;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.InGameHud;
import net.minecraft.client.render.RenderTickCounter;
@Mixin(InGameHud.class)
public class InGameHudMixin {
@Shadow private int scaledWidth;
@Shadow private int scaledHeight;
@Inject(at = @At("TAIL"), method = "render")
public void onRender (DrawContext drawContext, float tickDelta, CallbackInfo info)
public void onRender (DrawContext drawContext, RenderTickCounter tickCounter, CallbackInfo info)
{
if (ModuleManager.INSTANCE.getModuleByName("HUD").enabled) HUDOverlay.INSTANCE.render(drawContext, scaledWidth, scaledHeight);
if (ModuleManager.INSTANCE.getModuleByName("ModulesList").enabled) ModulesListOverlay.INSTANCE.render(drawContext, scaledWidth, scaledHeight);
if (ModuleManager.INSTANCE.getModuleByName("HUD").enabled) HUDOverlay.INSTANCE.render(drawContext, drawContext.getScaledWindowWidth(), drawContext.getScaledWindowHeight());
if (ModuleManager.INSTANCE.getModuleByName("ModulesList").enabled) ModulesListOverlay.INSTANCE.render(drawContext, drawContext.getScaledWindowWidth(), drawContext.getScaledWindowHeight());
}
}