Skip to content

Commit

Permalink
stop using at for GuiIngame
Browse files Browse the repository at this point in the history
  • Loading branch information
Wyvest committed Dec 12, 2022
1 parent 3e508c5 commit 8a45e37
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 39 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,14 @@ configurations {

repositories {
maven { url 'https://repo.polyfrost.cc/releases' }
maven { url = "https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1" }
}

dependencies {
minecraft("com.mojang:minecraft:1.8.9")
mappings("de.oceanlabs.mcp:mcp_stable:22-1.8.9")
forge("net.minecraftforge:forge:1.8.9-11.15.1.2318-1.8.9")

compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.1.0-alpha114')
compileOnly('cc.polyfrost:oneconfig-1.8.9-forge:0.1.0-alpha+')
include('cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-alpha+')
compileOnly('org.spongepowered:mixin:0.7.11-SNAPSHOT')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import cc.woverflow.hytils.events.TitleEvent;
import cc.woverflow.hytils.handlers.cache.PatternHandler;
import cc.woverflow.hytils.handlers.chat.ChatReceiveResetModule;
import cc.woverflow.hytils.mixin.GuiIngameAccessor;
import cc.woverflow.hytils.util.HypixelAPIUtils;
import net.minecraft.client.Minecraft;
import net.minecraft.util.EnumChatFormatting;
Expand Down Expand Up @@ -138,8 +139,8 @@ private void doNotification() {
@Override
public void reset() {
victoryDetected = false;
Minecraft.getMinecraft().ingameGUI.displayedTitle = "";
Minecraft.getMinecraft().ingameGUI.displayedSubTitle = "";
((GuiIngameAccessor) Minecraft.getMinecraft().ingameGUI).setDisplayedTitle("");
((GuiIngameAccessor) Minecraft.getMinecraft().ingameGUI).setDisplayedSubTitle("");
}

private boolean isSupportedMode(LocrawInfo locraw) {
Expand Down
33 changes: 33 additions & 0 deletions src/main/java/cc/woverflow/hytils/mixin/GuiIngameAccessor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Hytils Reborn - Hypixel focused Quality of Life mod.
* Copyright (C) 2022 W-OVERFLOW
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package cc.woverflow.hytils.mixin;

import net.minecraft.client.gui.GuiIngame;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;

@Mixin(GuiIngame.class)
public interface GuiIngameAccessor {

@Accessor("displayedTitle")
void setDisplayedTitle(String title);

@Accessor("displayedSubTitle")
void setDisplayedSubTitle(String subtitle);
}
5 changes: 1 addition & 4 deletions src/main/resources/hytils_at.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
public net.minecraft.client.renderer.BlockModelRenderer$AmbientOcclusionFace

public net.minecraft.client.gui.GuiIngame field_175201_x
public net.minecraft.client.gui.GuiIngame field_175200_y
public net.minecraft.client.renderer.BlockModelRenderer$AmbientOcclusionFace
63 changes: 32 additions & 31 deletions src/main/resources/mixins.hytils.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
{
"compatibilityLevel": "JAVA_8",
"minVersion": "0.7",
"package": "cc.woverflow.hytils.mixin",
"plugin": "cc.woverflow.hytils.forge.HytilsMixinPlugin",
"refmap": "mixins.hytils.refmap.json",
"verbose": true,
"client": [
"beds.ModelLoaderMixin",
"CommandLimboMixin_FixCommand",
"EntityLivingBaseMixin_MiningFatigue",
"EntityPlayerSPMixin_MessageHandling",
"GuiChatMixin_PlayAutocomplete",
"GuiIngameForgeMixin_HideActionbar",
"GuiIngameForgeMixin_TitleEvent",
"GuiNewChatAccessor",
"GuiNewChatMixin_LocrawHider",
"GuiPlayerTabOverlayMixin_HideNPCs",
"GuiPlayerTabOverlayMixin_HidePing",
"LayerArmorBaseMixin_HideIngameArmour",
"MinecraftMixin_LeftClickInteract",
"MinecraftMixin_LimboLimiter",
"NetHandlerPlayClientMixin_GameChecker",
"RenderEntityItemMixin_UHCOverlay",
"cosmetics.RenderItemMixin",
"cosmetics.WorldMixin",
"lineseparator.GuiNewChatMixin",
"lineseparator.GuiUtilRenderComponentsMixin",
"overlay.BlockModelRendererMixin_NoOptiFine",
"overlay.BlockModelRendererMixin_OptiFine",
"overlay.VertexLighterFlatMixin"
]
"compatibilityLevel": "JAVA_8",
"minVersion": "0.7",
"package": "cc.woverflow.hytils.mixin",
"plugin": "cc.woverflow.hytils.forge.HytilsMixinPlugin",
"refmap": "mixins.hytils.refmap.json",
"verbose": true,
"client": [
"CommandLimboMixin_FixCommand",
"EntityLivingBaseMixin_MiningFatigue",
"EntityPlayerSPMixin_MessageHandling",
"GuiChatMixin_PlayAutocomplete",
"GuiIngameAccessor",
"GuiIngameForgeMixin_HideActionbar",
"GuiIngameForgeMixin_TitleEvent",
"GuiNewChatAccessor",
"GuiNewChatMixin_LocrawHider",
"GuiPlayerTabOverlayMixin_HideNPCs",
"GuiPlayerTabOverlayMixin_HidePing",
"LayerArmorBaseMixin_HideIngameArmour",
"MinecraftMixin_LeftClickInteract",
"MinecraftMixin_LimboLimiter",
"NetHandlerPlayClientMixin_GameChecker",
"RenderEntityItemMixin_UHCOverlay",
"beds.ModelLoaderMixin",
"cosmetics.RenderItemMixin",
"cosmetics.WorldMixin",
"lineseparator.GuiNewChatMixin",
"lineseparator.GuiUtilRenderComponentsMixin",
"overlay.BlockModelRendererMixin_NoOptiFine",
"overlay.BlockModelRendererMixin_OptiFine",
"overlay.VertexLighterFlatMixin"
]
}

0 comments on commit 8a45e37

Please sign in to comment.