diff options
Diffstat (limited to 'features')
-rw-r--r-- | features/events/index.js | 15 | ||||
-rw-r--r-- | features/nether/index.js | 13 |
2 files changed, 19 insertions, 9 deletions
diff --git a/features/events/index.js b/features/events/index.js index d0edeb2..594e56a 100644 --- a/features/events/index.js +++ b/features/events/index.js @@ -146,7 +146,7 @@ class Events extends Feature { }) this.locs = [] - // this.predictions = [] + this.predictions = [] // this.predictionsOld = [] // this.registerEvent("renderWorld", () => { // for (let loc of this.locs) { @@ -223,7 +223,7 @@ class Events extends Feature { while (World.getBlockAt(this.guessPoint2[0], gY, this.guessPoint2[2]).getType().getID() !== 2 && gY > 70) { gY-- } - drawCoolWaypoint(this.guessPoint2[0], gY, this.guessPoint2[2], 255, 255, 0, { name: "§eGuess" + (warpLoc ? " §7(" + warpLoc + ")" : "") }) + drawCoolWaypoint(this.guessPoint2[0], gY + 3, this.guessPoint2[2], 255, 255, 0, { name: "§eGuess" + (warpLoc ? " §7(" + warpLoc + ")" : "") }) } // drawCoolWaypoint(this.guessPoint[0], this.guessPoint[1], this.guessPoint[2], 255, 255, 0, { name: "§7OLD Guess" + (warpLoc ? " §7(" + warpLoc + ")" : "") }) } @@ -467,7 +467,7 @@ class Events extends Feature { } if (run) { - if (this.locs.length === 0 || particle.getX() + particle.getY() + particle.getZ() !== this.locs[this.locs.length - 1][0] + this.locs[this.locs.length - 1][1] + this.locs[this.locs.length - 1][2]) { + if (this.locs.length < 100 && this.locs.length === 0 || particle.getX() + particle.getY() + particle.getZ() !== this.locs[this.locs.length - 1][0] + this.locs[this.locs.length - 1][1] + this.locs[this.locs.length - 1][2]) { let currLoc = [particle.getX(), particle.getY(), particle.getZ()] let distMultiplier = 1 @@ -529,7 +529,8 @@ class Events extends Feature { let ySpeed = (this.locs[this.locs.length - 1][1] - this.locs[this.locs.length - 2][1]) / Math.hypot(this.locs[this.locs.length - 1][0] - this.locs[this.locs.length - 2][0], this.locs[this.locs.length - 1][2] - this.locs[this.locs.length - 2][2]) - for (let i = start + 1; i < 100; i++) { + let i = start + 1 + while (distCovered < this.distance2) { let y = b / (i + a) + c let dist = distMultiplier * (0.06507 * i + 0.259) //This is where the inaccuracy's come from @@ -559,9 +560,9 @@ class Events extends Feature { distCovered = Math.hypot(lastPos[0] - this.lastSoundPoint[0], lastPos[2] - this.lastSoundPoint[2]) if (distCovered > this.distance2) break; } - if (distCovered > this.distance2) break; + i++ } - // this.predictions = [...pr1, ...pr2] + this.predictions = [...pr1, ...pr2] // let minD = Infinity let p1 = pr1[pr1.length - 1] @@ -754,7 +755,7 @@ class Events extends Feature { burrialClicked() { this.locs = [] - // this.predictions = [] + this.predictions = [] // this.predictionsOld = [] if (this.inquisWaypointSpawned) { socketConnection.sendInquisData({ loc: null }); diff --git a/features/nether/index.js b/features/nether/index.js index 9c346f6..ec2ef08 100644 --- a/features/nether/index.js +++ b/features/nether/index.js @@ -3,7 +3,7 @@ import { f, m } from "../../../mappings/mappings"; import Feature from "../../featureClass/class"; import socketConnection from "../../socketConnection"; -import { drawBoxAtBlock, drawBoxAtEntity, drawCoolWaypoint, drawLine, drawLineWithDepth, renderBeaconBeam } from "../../utils/renderUtils"; +import { drawBoxAtBlock, drawBoxAtBlockNotVisThruWalls, drawBoxAtEntity, drawCoolWaypoint, drawLine, drawLineWithDepth, renderBeaconBeam } from "../../utils/renderUtils"; import ToggleSetting from "../settings/settingThings/toggle"; const MCBlock = Java.type("net.minecraft.block.Block"); const ArmorStand = Java.type("net.minecraft.entity.item.EntityArmorStand") @@ -122,6 +122,15 @@ class Nether extends Feature { this.controlLoc = undefined this.controlSkeleton = undefined }) + this.registerEvent("worldLoad", () => { + this.inSwiftness = false + this.lastBlock = undefined + this.inDiscipline = false + + this.controlLocLast = undefined + this.controlLoc = undefined + this.controlSkeleton = undefined + }) this.registerChat("You completed your rescue quest! Visit the Town Board to claim the rewards,", () => { this.rescueMissionDifficulty = this.rescueMissionType = undefined @@ -299,7 +308,7 @@ class Nether extends Feature { } if (this.controlLoc && this.controlLocLast) { - drawBoxAtBlock(this.controlLoc[0] * ticks + this.controlLocLast[0] * (1 - ticks), this.controlLoc[1] * ticks + this.controlLocLast[1] * (1 - ticks), this.controlLoc[2] * ticks + this.controlLocLast[2] * (1 - ticks), 255, 0, 0, 1, 2) + drawBoxAtBlockNotVisThruWalls(this.controlLoc[0] * ticks + this.controlLocLast[0] * (1 - ticks), this.controlLoc[1] * ticks + this.controlLocLast[1] * (1 - ticks), this.controlLoc[2] * ticks + this.controlLocLast[2] * (1 - ticks), 255, 0, 0, 1, 2) } } |