aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/helperFunctions.js10
-rw-r--r--util/renderUtil.js93
2 files changed, 99 insertions, 4 deletions
diff --git a/util/helperFunctions.js b/util/helperFunctions.js
index ea91b68..b731e10 100644
--- a/util/helperFunctions.js
+++ b/util/helperFunctions.js
@@ -172,8 +172,9 @@ export class trackerGui
this.collectionMoveGui = new Gui()
}
- renderGui(x, y, notation = false, renderGui = true) // can only be called in renderOverlay
+ renderGui(x, y, toggle = true, notation = false, alwaysShow = false) // can only be called in renderOverlay
{
+ if(!toggle) return
let leftValues = [`${this.itemStringed}`, `${this.itemStringed}/hr`, `${this.itemStringed} gained`, "Uptime"]
this.itemGui.x = x
this.itemGui.y = y
@@ -189,8 +190,8 @@ export class trackerGui
return this.itemGui.renderGui()
}
- if(!renderGui) return
- if(this.itemValues[0] != undefined && /*this.trackingItem && */this.calcItemPerHour)
+ if(!toggle || !(alwaysShow || this.trackingItem || this.trackedItem == "")) return
+ if(this.itemValues[0] != undefined && this.calcItemPerHour)
{
this.itemValuesSum = 0
for(let i = 0; i < this.itemValues.length; i++)
@@ -385,7 +386,8 @@ export function checkInDwarven()
return false
}
-const foragingLocations = ["Dark", "Birch", "Spruce", "Savanna", "Jungle", "Forest"]
+const foragingLocations = ["§aDark Thic🐍§aket", "§aBirch Par🐍§ak", "§aSpruce Wo🐍§aods", "§aSavanna W🐍§aoodland", "§aJungle Is🐍§aland", "§bForest"]
+// pov: hypixel making a working game (i do the same thing)
export function checkInPark()
{
const scoreboard = Scoreboard.getLines()
diff --git a/util/renderUtil.js b/util/renderUtil.js
index f989cde..f3dce1d 100644
--- a/util/renderUtil.js
+++ b/util/renderUtil.js
@@ -1,7 +1,12 @@
export function trace(x, y, z, red, green, blue, alpha)
{
GL11.glLineWidth(2.0)
+ GlStateManager.func_179129_p() // disableCullFace
+ GlStateManager.func_179147_l() // enableBlend
+ GlStateManager.func_179112_b(770, 771) // blendFunc
+ GlStateManager.func_179132_a(false) // depthMask
GlStateManager.func_179090_x() // disableTexture2D
+
Tessellator.begin(1).colorize(red, green, blue, alpha)
if(Player.isSneaking())
@@ -10,6 +15,94 @@ export function trace(x, y, z, red, green, blue, alpha)
Tessellator.pos(Player.getRenderX(), Player.getRenderY()+1.6203, Player.getRenderZ()).tex(0, 0)
Tessellator.pos(x, y, z).tex(0, 0)
Tessellator.draw()
+ GlStateManager.func_179089_o() // enableCull
+ GlStateManager.func_179084_k() // disableBlend
+ GlStateManager.func_179132_a(true) // depthMask
+ GlStateManager.func_179098_w() // enableTexture2D
+}
+
+
+export function drawEspBox (x, y, z, red, green, blue, alpha, phase = true) // thanks to renderlib, don't need the whole module so I'm not adding it.
+{
+ Tessellator.pushMatrix()
+ GL11.glLineWidth(2.0)
+ GlStateManager.func_179129_p() // disableCullFace
+ GlStateManager.func_179147_l() // enableBlend
+ GlStateManager.func_179112_b(770, 771) // blendFunc
+ GlStateManager.func_179132_a(false) // depthMask
+ GlStateManager.func_179090_x() // disableTexture2D
+
+ if(phase)
+ GlStateManager.func_179097_i() // disableDepth
+ const locations = [
+ // x, y, z x, y, z
+ [
+ [0, 0, 0],
+ [1, 0, 0],
+ ],
+ [
+ [0, 0, 0],
+ [0, 0, 1],
+ ],
+ [
+ [1, 0, 1],
+ [1, 0, 0],
+ ],
+ [
+ [1, 0, 1],
+ [0, 0, 1],
+ ],
+
+ [
+ [0, 1, 0],
+ [1, 1, 0],
+ ],
+ [
+ [0, 1, 0],
+ [0, 1, 1],
+ ],
+ [
+ [1, 1, 1],
+ [1, 1, 0],
+ ],
+ [
+ [1, 1, 1],
+ [0, 1, 1],
+ ],
+
+ [
+ [0, 0, 0],
+ [0, 1, 0],
+ ],
+ [
+ [1, 0, 0],
+ [1, 1, 0],
+ ],
+ [
+ [0, 0, 1],
+ [0, 1, 1],
+ ],
+ [
+ [1, 0, 1],
+ [1, 1, 1],
+ ],
+ ]
+
+ locations.forEach((loc) => {
+ Tessellator.begin(3).colorize(red, green, blue, alpha);
+ Tessellator.pos(x + loc[0][0] - 1 / 2, y + loc[0][1], z + loc[0][2] - 1 / 2).tex(0, 0)
+ Tessellator.pos(x + loc[1][0] - 1 / 2, y + loc[1][1], z + loc[1][2] - 1 / 2).tex(0, 0)
+ Tessellator.draw()
+ })
+
+ GlStateManager.func_179089_o() // enableCull
+ GlStateManager.func_179084_k() // disableBlend
+ GlStateManager.func_179132_a(true) // depthMask
GlStateManager.func_179098_w() // enableTexture2D
+
+ if(phase)
+ GlStateManager.func_179126_j() // enableDepth
+
+ Tessellator.popMatrix()
} \ No newline at end of file