-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d47549d
commit 7100260
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ class EvergreenHUD { | |
Armour() | ||
Biome() | ||
BlockAbove() | ||
CCounter() | ||
Combo() | ||
Coordinates() | ||
CPS() | ||
|
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,33 @@ | ||
package cc.polyfrost.evergreenhud.hud | ||
|
||
import cc.polyfrost.oneconfig.config.Config | ||
import cc.polyfrost.oneconfig.config.annotations.HUD | ||
import cc.polyfrost.oneconfig.config.annotations.Switch | ||
import cc.polyfrost.oneconfig.config.data.Mod | ||
import cc.polyfrost.oneconfig.config.data.ModType | ||
import cc.polyfrost.oneconfig.hud.SingleTextHud | ||
import cc.polyfrost.oneconfig.utils.dsl.mc | ||
|
||
class CCounter: Config(Mod("C Counter", ModType.HUD, "/assets/evergreenhud/evergreenhud.svg"), "evergreenhud/ccounter.json", false) { | ||
@HUD(name = "Main") | ||
var hud = CCounterHud() | ||
|
||
init { | ||
initialize() | ||
} | ||
|
||
class CCounterHud: SingleTextHud("C", true, 400, 70) { | ||
|
||
@Switch( | ||
name = "Simplified" | ||
) | ||
var simplified = true | ||
|
||
override fun getText(example: Boolean): String { | ||
if (mc.thePlayer == null) return "Unknown" | ||
return if (simplified) mc.renderGlobal.debugInfoRenders.split("/")[0].replace("C: ", "") | ||
else mc.renderGlobal.debugInfoRenders.split(" ")[1] | ||
} | ||
} | ||
|
||
} |