diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-04-10 04:43:19 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-04-10 04:43:19 +0800 |
commit | 68129573d5412314b1fecf5b3e576e68bc150ce2 (patch) | |
tree | 2136ff1b7185566c7271364e23c9b6c3e3bea5f7 /features | |
parent | 3fd0b9b89ed3d906cc4465945e82f555f6f2c73c (diff) | |
download | SoopyV2-68129573d5412314b1fecf5b3e576e68bc150ce2.tar.gz SoopyV2-68129573d5412314b1fecf5b3e576e68bc150ce2.tar.bz2 SoopyV2-68129573d5412314b1fecf5b3e576e68bc150ce2.zip |
fix spacing
Diffstat (limited to 'features')
-rw-r--r-- | features/dungeonSolvers/index.js | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/features/dungeonSolvers/index.js b/features/dungeonSolvers/index.js index 6842262..8e95961 100644 --- a/features/dungeonSolvers/index.js +++ b/features/dungeonSolvers/index.js @@ -172,45 +172,45 @@ class DungeonSolvers extends Feature { renderWorld(ticks) { if (this.lividFindBox.getValue()) { - if (this.lividData.correctLividEntity) { - renderUtils.drawBoxAtEntity(this.lividData.correctLividEntity, 255, 0, 0, 0.75, -2, ticks); - } + if (this.lividData.correctLividEntity) { + renderUtils.drawBoxAtEntity(this.lividData.correctLividEntity, 255, 0, 0, 0.75, -2, ticks); + } } if (this.bloodCampAssist.getValue()) { - this.skulls.forEach((skull) => { - let skullE = skull.getEntity(); - // renderUtils.drawBoxAtEntity(skull, 255, 0, 0, 0.5, 0.5, ticks) - - if (this.eMovingThing[skull.getUUID().toString()] && this.eMovingThing[skull.getUUID().toString()].timeTook) { - let startPoint = [skullE[f.posX.Entity], skullE[f.posY.Entity], skullE[f.posZ.Entity]]; - - let xSpeed2 = (startPoint[0] - this.eMovingThing[skull.getUUID().toString()].startX) / this.eMovingThing[skull.getUUID().toString()].timeTook; - let ySpeed2 = (startPoint[1] - this.eMovingThing[skull.getUUID().toString()].startY) / this.eMovingThing[skull.getUUID().toString()].timeTook; - let zSpeed2 = (startPoint[2] - this.eMovingThing[skull.getUUID().toString()].startZ) / this.eMovingThing[skull.getUUID().toString()].timeTook; - - let time = (this.spawnIdThing >= 4 ? 2900 : 4850) - this.eMovingThing[skull.getUUID().toString()].timeTook; - let endPoint1 = this.eMovingThing[skull.getUUID().toString()].endPoint; - let endPoint2 = this.eMovingThing[skull.getUUID().toString()].endPointLast; - let endPointUpdated = Math.min(Date.now() - this.eMovingThing[skull.getUUID().toString()].endPointUpdated, 100); - if(!endPoint2) return - let endPoint = [endPoint2[0] + ((endPoint1[0] - endPoint2[0]) * endPointUpdated) / 100, endPoint2[1] + ((endPoint1[1] - endPoint2[1]) * endPointUpdated) / 100, endPoint2[2] + ((endPoint1[2] - endPoint2[2]) * endPointUpdated) / 100]; - let pingPoint = [startPoint[0] + xSpeed2 * this.ping, startPoint[1] + ySpeed2 * this.ping, startPoint[2] + zSpeed2 * this.ping]; - - renderUtils.drawLineWithDepth(startPoint[0], startPoint[1] + 2, startPoint[2], endPoint[0], endPoint[1] + 2, endPoint[2], 255, 0, 0, 2); - - if (this.ping < time) { - renderUtils.drawBoxAtBlockNotVisThruWalls(pingPoint[0] - 0.5, pingPoint[1] + 1.5, pingPoint[2] - 0.5, 0, 255, 0); - renderUtils.drawBoxAtBlockNotVisThruWalls(endPoint[0] - 0.5, endPoint[1] + 1.5, endPoint[2] - 0.5, 255, 0, 0); - } else { - renderUtils.drawBoxAtBlockNotVisThruWalls(endPoint[0] - 0.5, endPoint[1] + 1.5, endPoint[2] - 0.5, 0, 0, 255); - } + this.skulls.forEach((skull) => { + let skullE = skull.getEntity(); + // renderUtils.drawBoxAtEntity(skull, 255, 0, 0, 0.5, 0.5, ticks) + + if (this.eMovingThing[skull.getUUID().toString()] && this.eMovingThing[skull.getUUID().toString()].timeTook) { + let startPoint = [skullE[f.posX.Entity], skullE[f.posY.Entity], skullE[f.posZ.Entity]]; + + let xSpeed2 = (startPoint[0] - this.eMovingThing[skull.getUUID().toString()].startX) / this.eMovingThing[skull.getUUID().toString()].timeTook; + let ySpeed2 = (startPoint[1] - this.eMovingThing[skull.getUUID().toString()].startY) / this.eMovingThing[skull.getUUID().toString()].timeTook; + let zSpeed2 = (startPoint[2] - this.eMovingThing[skull.getUUID().toString()].startZ) / this.eMovingThing[skull.getUUID().toString()].timeTook; + + let time = (this.spawnIdThing >= 4 ? 2900 : 4850) - this.eMovingThing[skull.getUUID().toString()].timeTook; + let endPoint1 = this.eMovingThing[skull.getUUID().toString()].endPoint; + let endPoint2 = this.eMovingThing[skull.getUUID().toString()].endPointLast; + let endPointUpdated = Math.min(Date.now() - this.eMovingThing[skull.getUUID().toString()].endPointUpdated, 100); + if(!endPoint2) return + let endPoint = [endPoint2[0] + ((endPoint1[0] - endPoint2[0]) * endPointUpdated) / 100, endPoint2[1] + ((endPoint1[1] - endPoint2[1]) * endPointUpdated) / 100, endPoint2[2] + ((endPoint1[2] - endPoint2[2]) * endPointUpdated) / 100]; + let pingPoint = [startPoint[0] + xSpeed2 * this.ping, startPoint[1] + ySpeed2 * this.ping, startPoint[2] + zSpeed2 * this.ping]; + + renderUtils.drawLineWithDepth(startPoint[0], startPoint[1] + 2, startPoint[2], endPoint[0], endPoint[1] + 2, endPoint[2], 255, 0, 0, 2); + + if (this.ping < time) { + renderUtils.drawBoxAtBlockNotVisThruWalls(pingPoint[0] - 0.5, pingPoint[1] + 1.5, pingPoint[2] - 0.5, 0, 255, 0); + renderUtils.drawBoxAtBlockNotVisThruWalls(endPoint[0] - 0.5, endPoint[1] + 1.5, endPoint[2] - 0.5, 255, 0, 0); + } else { + renderUtils.drawBoxAtBlockNotVisThruWalls(endPoint[0] - 0.5, endPoint[1] + 1.5, endPoint[2] - 0.5, 0, 0, 255); + } - // if(this.eMovingThing[skull.getUUID().toString()] && this.eMovingThing[skull.getUUID().toString()].timeTook){ - // Tessellator.drawString((time/1000).toFixed(3)+"s", endPoint[0], endPoint[1]+2, endPoint[2]) - // } - } - }); + // if(this.eMovingThing[skull.getUUID().toString()] && this.eMovingThing[skull.getUUID().toString()].timeTook){ + // Tessellator.drawString((time/1000).toFixed(3)+"s", endPoint[0], endPoint[1]+2, endPoint[2]) + // } + } + }); } if(this.blazeX !== -1 && this.blazes.length > 0 && this.blazeSolver.getValue()){ @@ -227,13 +227,13 @@ class DungeonSolvers extends Feature { } renderEntity(entity, position, ticks, event) { - if (this.lividFindNametags.getValue()) { - if (this.lividData.correctLividEntity) { - if (entity.getName().includes("Livid") && entity.getName().includes("❤") && entity.getUUID() !== this.lividData.correctLividEntity.getUUID()) { - cancel(event); - } - } - } + if (this.lividFindNametags.getValue()) { + if (this.lividData.correctLividEntity) { + if (entity.getName().includes("Livid") && entity.getName().includes("❤") && entity.getUUID() !== this.lividData.correctLividEntity.getUUID()) { + cancel(event); + } + } + } } renderHud() { @@ -244,7 +244,7 @@ class DungeonSolvers extends Feature { } for (let element of this.hudElements) { - element.render(); + element.render(); } } |