This repository has been archived by the owner on Feb 10, 2022. It is now read-only.
generated from ChachyDev/KotlinForgeTemplate
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Add Bossbar scaling + Rewrite action bar customization + Hitbox Customization! + Toggle Hitbox + Toggle Hitbox for items, itemframes, and non-players + Force hitboxes + Disable hitboxes for self + Hitbox, Line Hitbox, and Line of sight hitbox color and toggling + Ingame Updater + Add Bundle support + Make Auto get features much more stable + Fix a bug where toggling name highlight would crash the game + Move from Pattern class to Regex class + Add license statements + Update Requisite + Update RequisiteLaunchwrapper + Update Essential - Remove pointless debug subcommand - Remove credits + Switch from JsonTGM to GSON
- Loading branch information
Showing
25 changed files
with
1,092 additions
and
262 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
src/main/java/net/wyvest/wyvtilities/mixin/MixinGuiIngameForgeHook.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Wyvtilities - Utilities for Hypixel 1.8.9. | ||
* Copyright (C) 2021 Wyvtilities | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser 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 Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package net.wyvest.wyvtilities.mixin; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.wyvest.wyvtilities.config.WyvtilsConfig; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Pseudo | ||
@Mixin(targets = "club.sk1er.patcher.hooks.GuiIngameForgeHook") | ||
public class MixinGuiIngameForgeHook { | ||
|
||
@SuppressWarnings({"UnresolvedMixinReference", "DefaultAnnotationParam"}) | ||
@Inject(remap = false, method = "drawActionbarText", at = @At(remap = true, value = "HEAD"), cancellable = true) | ||
private static void onActionBarTextDrawn(String recordPlaying, int color, CallbackInfo ci) { | ||
if (!WyvtilsConfig.INSTANCE.getActionBarCustomization()) return; | ||
int newX; | ||
int newY; | ||
if (WyvtilsConfig.INSTANCE.getActionBarPosition()) { | ||
newX = WyvtilsConfig.INSTANCE.getActionBarX(); | ||
newY = WyvtilsConfig.INSTANCE.getActionBarY(); | ||
} else { | ||
newX = -Minecraft.getMinecraft().fontRendererObj.getStringWidth(recordPlaying) >> 1; | ||
newY = -4; | ||
} | ||
Minecraft.getMinecraft().fontRendererObj.drawString( | ||
recordPlaying, | ||
newX, newY, | ||
color, WyvtilsConfig.INSTANCE.getActionBarShadow() | ||
); | ||
ci.cancel(); | ||
} | ||
|
||
} |
Oops, something went wrong.