diff options
-rw-r--r-- | features/dungeonSolvers/index.js | 2 | ||||
-rw-r--r-- | features/waypoints/index.js | 39 | ||||
-rw-r--r-- | metadata.json | 4 | ||||
-rw-r--r-- | utils/renderUtils.js | 268 |
4 files changed, 157 insertions, 156 deletions
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js index 5088e75..f7d8e49 100644 --- a/features/dungeonSolvers/index.js +++ b/features/dungeonSolvers/index.js @@ -67,7 +67,7 @@ class DungeonSolvers extends Feature { .setLocationSetting(new LocationSetting("Run speed and exp rates location", "Allows you to edit the location of the information", "run_speed_rates_location", this, [10, 100, 1, 1]).requires(this.runSpeedRates).editTempText("&6Run speed&7> &f4:30\n&6Exp/hour&7> &f1,234,567\n&6Runs/hour&7> &f17")); this.scoreCalculation = new ToggleSetting("Show score calculation", "NOTE: doesent include mimic or spirit pet yet", true, "run_score_calc", this); - this.scoreElement = new HudTextElement().setToggleSetting(this.scoreCalculation).setLocationSetting(new LocationSetting("Score calculation location", "Allows you to edit the location of the score calc", "score_calc_location", this, [10, 130, 1, 1]).requires(this.scoreCalculation).editTempText("Editing temp text here")); + this.scoreElement = new HudTextElement().setToggleSetting(this.scoreCalculation).setLocationSetting(new LocationSetting("Score calculation location", "Allows you to edit the location of the score calc", "score_calc_location", this, [10, 130, 1, 1]).requires(this.scoreCalculation).editTempText("&dScore: 120\n&aS+ ??\n&aS ??")); this.hudElements.push(this.runSpeedRatesElement); this.hudElements.push(this.scoreElement); diff --git a/features/waypoints/index.js b/features/waypoints/index.js index 47806ec..d0d526d 100644 --- a/features/waypoints/index.js +++ b/features/waypoints/index.js @@ -21,8 +21,10 @@ class Waypoints extends Feature { new SettingBase("/savewaypoints", "Copys the waypoints to your clipboard", undefined, "save_waypoints", this) new SettingBase("/loadwaypoints", "Loads waypoints from your clipboard", undefined, "load_waypoints", this) - this.waypoints = [] this.userWaypoints = JSON.parse(FileLib.read("soopyAddonsData", "soopyv2userwaypoints.json") || "{}") + this.userWaypointsHash = {} + this.userWaypointsAll = [] + this.updateWaypointsHashes() this.userWaypointsArr = Object.values(this.userWaypoints) this.waypointsChanged = false @@ -57,6 +59,7 @@ class Waypoints extends Feature { this.userWaypointsArr = Object.values(this.userWaypoints) this.waypointsChanged = true + this.updateWaypointsHashes() ChatLib.chat(this.FeatureManager.messagePrefix + "Added waypoint " + name + "!") }) @@ -64,12 +67,14 @@ class Waypoints extends Feature { delete this.userWaypoints[name] this.userWaypointsArr = Object.values(this.userWaypoints) this.waypointsChanged = true + this.updateWaypointsHashes() ChatLib.chat(this.FeatureManager.messagePrefix + "Deleted waypoint " + name + "!") }) this.registerCommand("clearwaypoints", () => { this.userWaypoints = {} this.userWaypointsArr = [] this.waypointsChanged = true + this.updateWaypointsHashes() ChatLib.chat(this.FeatureManager.messagePrefix + "Cleared waypoints!") }) this.registerCommand("savewaypoints", () => { @@ -82,6 +87,7 @@ class Waypoints extends Feature { this.userWaypointsArr = Object.values(this.userWaypoints) this.waypointsChanged = true + this.updateWaypointsHashes() ChatLib.chat(this.FeatureManager.messagePrefix + "Loaded waypoints from clipboard!") } catch (e) { ChatLib.chat(this.FeatureManager.messagePrefix + "Error loading from clipboard!") @@ -89,31 +95,32 @@ class Waypoints extends Feature { }) } - addWaypoint(x, y, z, r, g, b, options) { - this.waypoints.push({ - x: x, - y: y, - z: z, - r: r, - g: g, - b: b, - options: options - }) + updateWaypointsHashes() { + this.userWaypointsAll = [] + this.userWaypointsHash = {} + for (let waypoint of this.userWaypointsArr) { + if (!waypoint.area) { + this.userWaypointsAll.push(waypoint) + } else { + if (!this.userWaypointsHash[waypoint.area]) this.userWaypointsHash[waypoint.area] = [] + this.userWaypointsHash[waypoint.area].push(waypoint) + } + } } renderWorldLast() { - for (let waypoint of this.waypoints) { + for (let waypoint of this.userWaypointsAll) { drawCoolWaypoint(waypoint.x, waypoint.y, waypoint.z, waypoint.r, waypoint.g, waypoint.b, waypoint.options) } - for (let waypoint of this.userWaypointsArr) { //TODO: Performance optimisation: Make hash from waypoint.area -> waypoints[] - if (!waypoint.area || this.FeatureManager.features["dataLoader"].class.area === waypoint.area) { - drawCoolWaypoint(waypoint.x, waypoint.y, waypoint.z, waypoint.r, waypoint.g, waypoint.b, { ...waypoint.options }) + if (this.userWaypointsHash[this.FeatureManager.features["dataLoader"].class.area]) { + for (let waypoint of this.userWaypointsHash[this.FeatureManager.features["dataLoader"].class.area]) { + drawCoolWaypoint(waypoint.x, waypoint.y, waypoint.z, waypoint.r, waypoint.g, waypoint.b, waypoint.options) } } } initVariables() { - this.waypoints = undefined + } onDisable() { diff --git a/metadata.json b/metadata.json index fbaebbe..7fba23d 100644 --- a/metadata.json +++ b/metadata.json @@ -5,8 +5,8 @@ "entry": "index.js", "description": "SoopyV2", "name": "SoopyV2", - "version": "2.1.56", - "versionId": 183, + "version": "2.1.57", + "versionId": 184, "requires": [ "soopyApis", "soopyAddonsData", diff --git a/utils/renderUtils.js b/utils/renderUtils.js index 4398b19..857c7ab 100644 --- a/utils/renderUtils.js +++ b/utils/renderUtils.js @@ -1,10 +1,10 @@ const { f, m } = require("../../mappings/mappings"); -const {default:renderBeaconBeam2} = require("../../BeaconBeam/index"); +const { default: renderBeaconBeam2 } = require("../../BeaconBeam/index"); const numberUtils = require("./numberUtils"); const { default: RenderLib2D } = require("./renderLib2d"); -if(!GlStateManager){ +if (!GlStateManager) { var GL11 = Java.type("org.lwjgl.opengl.GL11"); //using var so it goes to global scope var GlStateManager = Java.type("net.minecraft.client.renderer.GlStateManager"); } @@ -15,7 +15,7 @@ let ret = { * OR * h, s, v */ - HSVtoRGB:function (h, s, v) { + HSVtoRGB: function (h, s, v) { var r, g, b, i, f, p, q, t; if (arguments.length === 1) { s = h.s, v = h.v, h = h.h; @@ -39,8 +39,8 @@ let ret = { b: b * 255 }; }, - drawLine:function (x, y, z, x2, y2, z2, r, g, b, thickness=1) { - + drawLine: function (x, y, z, x2, y2, z2, r, g, b, thickness = 1) { + GL11.glBlendFunc(770, 771); GL11.glEnable(GL11.GL_BLEND); GL11.glLineWidth(thickness); @@ -48,44 +48,44 @@ let ret = { GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDepthMask(false); GlStateManager.func_179094_E(); - + Tessellator.begin(3).colorize(r, g, b); - + Tessellator.pos(x, y, z); Tessellator.pos(x2, y2, z2); - + Tessellator.draw(); - - + + GlStateManager.func_179121_F(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthMask(true); GL11.glDisable(GL11.GL_BLEND); }, - drawLineWithDepth:function (x, y, z, x2, y2, z2, r, g, b,t) { - + drawLineWithDepth: function (x, y, z, x2, y2, z2, r, g, b, t) { + GL11.glBlendFunc(770, 771); GL11.glEnable(GL11.GL_BLEND); GL11.glLineWidth(t); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDepthMask(false); GlStateManager.func_179094_E(); - + Tessellator.begin(3).colorize(r, g, b); - + Tessellator.pos(x, y, z); Tessellator.pos(x2, y2, z2); - + Tessellator.draw(); - - + + GlStateManager.func_179121_F(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDepthMask(true); GL11.glDisable(GL11.GL_BLEND); }, - setupLineSmall: function(width){ + setupLineSmall: function (width) { GL11.glBlendFunc(770, 771); GL11.glEnable(GL11.GL_BLEND); GL11.glLineWidth(width); @@ -93,86 +93,86 @@ let ret = { GL11.glDepthMask(false); GlStateManager.func_179094_E(); }, - endLineSmall: function(){ + endLineSmall: function () { GlStateManager.func_179121_F(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDepthMask(true); GL11.glDisable(GL11.GL_BLEND); }, - drawLineSmall:function (x, y, z, x2, y2, z2, r, g, b) { - + drawLineSmall: function (x, y, z, x2, y2, z2, r, g, b) { + Tessellator.begin(3).colorize(r, g, b); - + Tessellator.pos(x, y, z); Tessellator.pos(x2, y2, z2); - + Tessellator.draw(); }, - drawLinePoints: function(locations, r, g, b, thickness=1){ + drawLinePoints: function (locations, r, g, b, thickness = 1) { GL11.glBlendFunc(770, 771); GL11.glEnable(GL11.GL_BLEND); GL11.glLineWidth(thickness); GL11.glDisable(GL11.GL_TEXTURE_2D); GL11.glDepthMask(false); GlStateManager.func_179094_E(); - + Tessellator.begin(3).colorize(r, g, b); - + locations.forEach(loc => { Tessellator.pos(...loc); }); - + Tessellator.draw(); - - + + GlStateManager.func_179121_F(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDepthMask(true); GL11.glDisable(GL11.GL_BLEND); }, - drawBoxAtBlockNotVisThruWalls:function (x, y, z, colorR, colorG, colorB, w=1, h=1, a=1){ + drawBoxAtBlockNotVisThruWalls: function (x, y, z, colorR, colorG, colorB, w = 1, h = 1, a = 1) { GL11.glBlendFunc(770, 771); GL11.glEnable(GL11.GL_BLEND); GL11.glLineWidth(3); GL11.glDisable(GL11.GL_TEXTURE_2D); GlStateManager.func_179094_E(); - + x -= 0.005 y -= 0.005 z -= 0.005 w += 0.01 h += 0.01 - + Tessellator.begin(3).colorize(colorR, colorG, colorB, a); - - Tessellator.pos(x+w,y+h,z+w); - Tessellator.pos(x+w,y+h,z); - Tessellator.pos(x,y+h,z); - Tessellator.pos(x,y+h,z+w); - Tessellator.pos(x+w,y+h,z+w); - Tessellator.pos(x+w,y,z+w); - Tessellator.pos(x+w,y,z); - Tessellator.pos(x,y,z); - Tessellator.pos(x,y,z+w); - Tessellator.pos(x,y,z); - Tessellator.pos(x,y+h,z); - Tessellator.pos(x,y,z); - Tessellator.pos(x+w,y,z); - Tessellator.pos(x+w,y+h,z); - Tessellator.pos(x+w,y,z); - Tessellator.pos(x+w,y,z+w); - Tessellator.pos(x,y,z+w); - Tessellator.pos(x,y+h,z+w); - Tessellator.pos(x+w,y+h,z+w); - + + Tessellator.pos(x + w, y + h, z + w); + Tessellator.pos(x + w, y + h, z); + Tessellator.pos(x, y + h, z); + Tessellator.pos(x, y + h, z + w); + Tessellator.pos(x + w, y + h, z + w); + Tessellator.pos(x + w, y, z + w); + Tessellator.pos(x + w, y, z); + Tessellator.pos(x, y, z); + Tessellator.pos(x, y, z + w); + Tessellator.pos(x, y, z); + Tessellator.pos(x, y + h, z); + Tessellator.pos(x, y, z); + Tessellator.pos(x + w, y, z); + Tessellator.pos(x + w, y + h, z); + Tessellator.pos(x + w, y, z); + Tessellator.pos(x + w, y, z + w); + Tessellator.pos(x, y, z + w); + Tessellator.pos(x, y + h, z + w); + Tessellator.pos(x + w, y + h, z + w); + Tessellator.draw(); - + GlStateManager.func_179121_F(); GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glDisable(GL11.GL_BLEND); }, - drawBoxAtBlock:function (x, y, z, colorR, colorG, colorB, w=1, h=1, a=1){ - + drawBoxAtBlock: function (x, y, z, colorR, colorG, colorB, w = 1, h = 1, a = 1) { + GL11.glBlendFunc(770, 771); GL11.glEnable(GL11.GL_BLEND); GL11.glLineWidth(3); @@ -180,89 +180,89 @@ let ret = { GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDepthMask(false); GlStateManager[m.pushMatrix]() - - + + Tessellator.begin(3).colorize(colorR, colorG, colorB, a); - - Tessellator.pos(x+w,y+h,z+w); - Tessellator.pos(x+w,y+h,z); - Tessellator.pos(x,y+h,z); - Tessellator.pos(x,y+h,z+w); - Tessellator.pos(x+w,y+h,z+w); - Tessellator.pos(x+w,y,z+w); - Tessellator.pos(x+w,y,z); - Tessellator.pos(x,y,z); - Tessellator.pos(x,y,z+w); - Tessellator.pos(x,y,z); - Tessellator.pos(x,y+h,z); - Tessellator.pos(x,y,z); - Tessellator.pos(x+w,y,z); - Tessellator.pos(x+w,y+h,z); - Tessellator.pos(x+w,y,z); - Tessellator.pos(x+w,y,z+w); - Tessellator.pos(x,y,z+w); - Tessellator.pos(x,y+h,z+w); - Tessellator.pos(x+w,y+h,z+w); - + + Tessellator.pos(x + w, y + h, z + w); + Tessellator.pos(x + w, y + h, z); + Tessellator.pos(x, y + h, z); + Tessellator.pos(x, y + h, z + w); + Tessellator.pos(x + w, y + h, z + w); + Tessellator.pos(x + w, y, z + w); + Tessellator.pos(x + w, y, z); + Tessellator.pos(x, y, z); + Tessellator.pos(x, y, z + w); + Tessellator.pos(x, y, z); + Tessellator.pos(x, y + h, z); + Tessellator.pos(x, y, z); + Tessellator.pos(x + w, y, z); + Tessellator.pos(x + w, y + h, z); + Tessellator.pos(x + w, y, z); + Tessellator.pos(x + w, y, z + w); + Tessellator.pos(x, y, z + w); + Tessellator.pos(x, y + h, z + w); + Tessellator.pos(x + w, y + h, z + w); + Tessellator.draw(); - + GlStateManager[m.popMatrix]() GL11.glEnable(GL11.GL_TEXTURE_2D); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthMask(true); GL11.glDisable(GL11.GL_BLEND); }, - drawBoxAtEntity:function (entity, colorR, colorG, colorB, width, height, partialTicks, lineWidth=2, phase=false){ - let x = entity.getX() + ((entity.getX()-entity.getLastX())*partialTicks) - let y = entity.getY() + ((entity.getY()-entity.getLastY())*partialTicks) - let z = entity.getZ() + ((entity.getZ()-entity.getLastZ())*partialTicks) - - if(width === null){ - width = entity.getWidth()/2 + drawBoxAtEntity: function (entity, colorR, colorG, colorB, width, height, partialTicks, lineWidth = 2, phase = false) { + let x = entity.getX() + ((entity.getX() - entity.getLastX()) * partialTicks) + let y = entity.getY() + ((entity.getY() - entity.getLastY()) * partialTicks) + let z = entity.getZ() + ((entity.getZ() - entity.getLastZ()) * partialTicks) + + if (width === null) { + width = entity.getWidth() / 2 height = entity.getHeight() - }else{ - width = width/2 + } else { + width = width / 2 } - - + + GL11.glBlendFunc(770, 771); GL11.glEnable(GL11.GL_BLEND); GL11.glLineWidth(lineWidth); - if(phase) GL11.glDisable(GL11.GL_DEPTH_TEST); + if (phase) GL11.glDisable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_TEXTURE_2D); GlStateManager.func_179094_E(); - - + + Tessellator.begin(3).colorize(colorR, colorG, colorB); - - Tessellator.pos(x+width,y+height,z+width); - Tessellator.pos(x+width,y+height,z-width); - Tessellator.pos(x-width,y+height,z-width); - Tessellator.pos(x-width,y+height,z+width); - Tessellator.pos(x+width,y+height,z+width); - Tessellator.pos(x+width,y,z+width); - Tessellator.pos(x+width,y,z-width); - Tessellator.pos(x-width,y,z-width); - Tessellator.pos(x-width,y,z+width); - Tessellator.pos(x-width,y,z-width); - Tessellator.pos(x-width,y+height,z-width); - Tessellator.pos(x-width,y,z-width); - Tessellator.pos(x+width,y,z-width); - Tessellator.pos(x+width,y+height,z-width); - Tessellator.pos(x+width,y,z-width); - Tessellator.pos(x+width,y,z+width); - Tessellator.pos(x-width,y,z+width); - Tessellator.pos(x-width,y+height,z+width); - Tessellator.pos(x+width,y+height,z+width); - + + Tessellator.pos(x + width, y + height, z + width); + Tessellator.pos(x + width, y + height, z - width); + Tessellator.pos(x - width, y + height, z - width); + Tessellator.pos(x - width, y + height, z + width); + Tessellator.pos(x + width, y + height, z + width); + Tessellator.pos(x + width, y, z + width); + Tessellator.pos(x + width, y, z - width); + Tessellator.pos(x - width, y, z - width); + Tessellator.pos(x - width, y, z + width); + Tessellator.pos(x - width, y, z - width); + Tessellator.pos(x - width, y + height, z - width); + Tessellator.pos(x - width, y, z - width); + Tessellator.pos(x + width, y, z - width); + Tessellator.pos(x + width, y + height, z - width); + Tessellator.pos(x + width, y, z - width); + Tessellator.pos(x + width, y, z + width); + Tessellator.pos(x - width, y, z + width); + Tessellator.pos(x - width, y + height, z + width); + Tessellator.pos(x + width, y + height, z + width); + Tessellator.draw(); - + GlStateManager.func_179121_F(); GL11.glEnable(GL11.GL_TEXTURE_2D); - if(phase) GL11.glEnable(GL11.GL_DEPTH_TEST); + if (phase) GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDisable(GL11.GL_BLEND); }, - drawFilledBox: function(x, y, z, w, h, red, green, blue, alpha, phase) { //FROM RENDERUTILS + drawFilledBox: function (x, y, z, w, h, red, green, blue, alpha, phase) { //FROM RENDERUTILS GL11.glDisable(GL11.GL_CULL_FACE); if (phase) { GL11.glBlendFunc(770, 771); @@ -332,34 +332,28 @@ let ret = { GL11.glDisable(GL11.GL_BLEND); } }, - renderBeaconBeam(x, y, z, r, g, b, alpha, phase){ + renderBeaconBeam(x, y, z, r, g, b, alpha, phase) { renderBeaconBeam2(x, y, z, r, g, b, alpha, !phase) }, - drawCoolWaypoint(x, y, z, r, g, b, {name="", showDist=!!name ,phase=false}){ - let distToPlayerSq = (x-Player.getRenderX())**2 + (y-(Player.getRenderY()+Player.getPlayer()[m.getEyeHeight]()))**2 + (z-Player.getRenderZ())**2 + drawCoolWaypoint(x, y, z, r, g, b, { name = "", showDist = !!name, phase = false }) { + let distToPlayerSq = (x - Player.getRenderX()) ** 2 + (y - (Player.getRenderY() + Player.getPlayer()[m.getEyeHeight]())) ** 2 + (z - Player.getRenderZ()) ** 2 - let alpha = Math.min(1,Math.max(0,1-(distToPlayerSq-10000)/12500)) + let alpha = Math.min(1, Math.max(0, 1 - (distToPlayerSq - 10000) / 12500)) - ret[phase?"drawBoxAtBlock":"drawBoxAtBlockNotVisThruWalls"](x-0.005, y-0.005, z-0.005, r, g, b, 1.01, 1.01, alpha) - ret.drawFilledBox(x+0.5, y, z+0.5, 1.02, 1.01, r, g, b, 0.25*alpha, phase) - ret.renderBeaconBeam(x, y+1, z, r, g, b, Math.min(1,Math.max(0,(distToPlayerSq-25)/100))*alpha, false) + ret[phase ? "drawBoxAtBlock" : "drawBoxAtBlockNotVisThruWalls"](x - 0.005, y - 0.005, z - 0.005, r, g, b, 1.01, 1.01, alpha) + ret.drawFilledBox(x + 0.5, y, z + 0.5, 1.02, 1.01, r, g, b, 0.25 * alpha, phase) + renderBeaconBeam2(x, y + 1, z, r, g, b, Math.min(1, Math.max(0, (distToPlayerSq - 25) / 100)) * alpha, true) - if(name || showDist){ + if (name || showDist) { let distToPlayer = Math.sqrt(distToPlayerSq) - let distRender = Math.min(distToPlayer,50) - - let loc1 = [x+0.5, y+2+20*distToPlayer/300, z+0.5] - let loc2 = [x+0.5, y+2+20*distToPlayer/300-10*distToPlayer/300, z+0.5] - - let loc3 = [loc1[0]-Player.getRenderX(), loc1[1]-(Player.getRenderY()+Player.getPlayer()[m.getEyeHeight]()), loc1[2]-Player.getRenderZ()] - let loc4 = [loc2[0]-Player.getRenderX(), loc2[1]-(Player.getRenderY()+Player.getPlayer()[m.getEyeHeight]()), loc2[2]-Player.getRenderZ()] + let distRender = Math.min(distToPlayer, 50) - let loc5 = [Player.getRenderX()+loc3[0]/(distToPlayer/distRender), (Player.getRenderY()+Player.getPlayer()[m.getEyeHeight]())+loc3[1]/(distToPlayer/distRender), Player.getRenderZ()+loc3[2]/(distToPlayer/distRender)] - let loc6 = [Player.getRenderX()+loc4[0]/(distToPlayer/distRender), (Player.getRenderY()+Player.getPlayer()[m.getEyeHeight]())+loc4[1]/(distToPlayer/distRender), Player.getRenderZ()+loc4[2]/(distToPlayer/distRender)] + let loc5 = [Player.getRenderX() + (x + 0.5 - Player.getRenderX()) / (distToPlayer / distRender), (Player.getRenderY() + Player.getPlayer()[m.getEyeHeight]()) + (y + 2 + 20 * distToPlayer / 300 - (Player.getRenderY() + Player.getPlayer()[m.getEyeHeight]())) / (distToPlayer / distRender), Player.getRenderZ() + (z + 0.5 - Player.getRenderZ()) / (distToPlayer / distRender)] + let loc6 = [Player.getRenderX() + (x + 0.5 - Player.getRenderX()) / (distToPlayer / distRender), (Player.getRenderY() + Player.getPlayer()[m.getEyeHeight]()) + (y + 2 + 20 * distToPlayer / 300 - 10 * distToPlayer / 300 - (Player.getRenderY() + Player.getPlayer()[m.getEyeHeight]())) / (distToPlayer / distRender), Player.getRenderZ() + (z + 0.5 - Player.getRenderZ()) / (distToPlayer / distRender)] - if(name) Tessellator.drawString("§a" + name, loc5[0], loc5[1], loc5[2], 0, true, distRender/300, false) - if(showDist) Tessellator.drawString("§b(" + numberUtils.numberWithCommas(Math.round(distToPlayer)) + "m)", (name?loc6[0]:loc5[0]), (name?loc6[1]:loc5[1]), (name?loc6[2]:loc5[2]), 0, false, distRender/300, false) + if (name) Tessellator.drawString("§a" + name, loc5[0], loc5[1], loc5[2], 0, true, distRender / 300, false) + if (showDist) Tessellator.drawString("§b(" + numberUtils.numberWithCommas(Math.round(distToPlayer)) + "m)", (name ? loc6[0] : loc5[0]), (name ? loc6[1] : loc5[1]), (name ? loc6[2] : loc5[2]), 0, false, distRender / 300, false) } } } |