aboutsummaryrefslogtreecommitdiff
path: root/features/slayers/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-26 20:51:03 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-06-26 20:51:03 +0800
commit830990fc97d1e7bd88adbabfee4f6f42657abe56 (patch)
tree0514598d9a20ebc0c42afb1ea363e5f9b9f2fe77 /features/slayers/index.js
parent4d22fe2ac6e32fff0044062a1cb5f94fc250a36b (diff)
downloadSoopyV2-830990fc97d1e7bd88adbabfee4f6f42657abe56.tar.gz
SoopyV2-830990fc97d1e7bd88adbabfee4f6f42657abe56.tar.bz2
SoopyV2-830990fc97d1e7bd88adbabfee4f6f42657abe56.zip
+ disable enderman teleportation
Diffstat (limited to 'features/slayers/index.js')
-rw-r--r--features/slayers/index.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/features/slayers/index.js b/features/slayers/index.js
index 348f7c4..63c90b0 100644
--- a/features/slayers/index.js
+++ b/features/slayers/index.js
@@ -18,6 +18,10 @@ class Slayers extends Feature {
super();
}
+ inSkyblock() {
+ return this.FeatureManager.features["dataLoader"] && this.FeatureManager.features["dataLoader"].class.isInSkyblock
+ }
+
onEnable() {
this.initVariables();
@@ -82,6 +86,7 @@ class Slayers extends Feature {
this.hudElements.push(this.dulkirThingElement);
this.otherSlayerWaypoints = new ToggleSetting("Show other users slayer boss locations", "May be usefull for loot share", true, "slayer_location_other", this)
+ this.disableEmanTp = new ToggleSetting("Disable enderman Teleportation", "Exact same as feature in SBA", false, "emantp_disable", this)
this.lastSlayerFinishes = [];
this.lastSlayerExps = [];
@@ -202,6 +207,12 @@ class Slayers extends Feature {
this.registerEvent("worldLoad", this.worldLoad);
this.registerStep(true, 2, this.step);
this.registerStep(true, 4, this.step_4fps);
+
+ this.registerForge(Java.type("net.minecraftforge.event.entity.living.EnderTeleportEvent"), this.emanTp).registeredWhen(() => this.inSkyblock() && this.disableEmanTp.getValue())
+ }
+
+ emanTp(event) {
+ cancel(event)
}
slayerLocationData(loc, user) {