-
Notifications
You must be signed in to change notification settings - Fork 0
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
7a72457
commit 8d8101f
Showing
6 changed files
with
56 additions
and
6 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
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
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,37 @@ | ||
import { AQUA } from "../../utils/constants"; | ||
import settings from "../../utils/settings"; | ||
import { registerWhen } from "../../utils/variables"; | ||
import { Hitbox, renderEntities } from "../../utils/waypoints"; | ||
|
||
|
||
/** | ||
* Register hitbox rendering | ||
*/ | ||
let nearby = []; | ||
let render = false; | ||
new Hitbox(() => settings.manaDrain, (pt) => { | ||
// Mana Blue Hitboxes | ||
renderEntities(nearby, 0.408, 0.76, 0.96, pt); | ||
}); | ||
|
||
registerWhen(register("renderOverlay", () => { | ||
if (!render) return; | ||
|
||
Client.showTitle(`${nearby.length + AQUA} nearby ${nearby.length === 1 ? "player" : "players"}!`, "", 0, 5, 1); | ||
}), () => settings.manaDrain); | ||
|
||
/** | ||
* Updates nearby players | ||
*/ | ||
const PLAYER_CLASS = Java.type("net.minecraft.client.entity.EntityOtherPlayerMP").class; | ||
registerWhen(register("step", () => { | ||
const heldName = Player.getHeldItem()?.getName(); | ||
render = heldName !== undefined && (heldName.includes("flux Power Orb") || heldName.endsWith("End Stone Sword")) | ||
if (!render) { | ||
nearby = []; | ||
return; | ||
} | ||
|
||
const player = Player.asPlayerMP(); | ||
nearby = World.getAllEntitiesOfType(PLAYER_CLASS).filter(other => other.getEntity().func_110143_aJ() !== 20 && player.distanceTo(other) < 5); | ||
}).setFps(2), () => settings.manaDrain); |
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
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
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