aboutsummaryrefslogtreecommitdiff
path: root/features/betterGuis/index.js
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-06 18:15:47 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2021-11-06 18:15:47 +0800
commitb33a75b2eba88c60280fcd441a5dd974cf763ab4 (patch)
tree53bd51697f69596fdcc388cdc71cc91b745f8f67 /features/betterGuis/index.js
parentbae481562a9186cafebdde2be9ac53b93cb98885 (diff)
downloadSoopyV2-b33a75b2eba88c60280fcd441a5dd974cf763ab4.tar.gz
SoopyV2-b33a75b2eba88c60280fcd441a5dd974cf763ab4.tar.bz2
SoopyV2-b33a75b2eba88c60280fcd441a5dd974cf763ab4.zip
Added update notif, cosmetics, and unfinished museum overlay
Diffstat (limited to 'features/betterGuis/index.js')
-rw-r--r--features/betterGuis/index.js16
1 files changed, 14 insertions, 2 deletions
diff --git a/features/betterGuis/index.js b/features/betterGuis/index.js
index 8600499..9648a9a 100644
--- a/features/betterGuis/index.js
+++ b/features/betterGuis/index.js
@@ -1,8 +1,8 @@
/// <reference types="../../../CTAutocomplete" />
/// <reference lib="es2015" />
import Feature from "../../featureClass/class";
-import { drawBoxAtBlockNotVisThruWalls } from "../../utils/renderUtils";
import ToggleSetting from "../settings/settingThings/toggle";
+import MuseumGui from "./museumGui";
class BetterGuis extends Feature {
constructor() {
@@ -12,8 +12,12 @@ class BetterGuis extends Feature {
onEnable(){
this.initVariables()
+ this.museumGui = new MuseumGui()
+
this.replaceSbMenuClicks = new ToggleSetting("Improve Clicks on SBMENU", "This will change clicks to middle clicks, AND use commands where possible (eg /pets)", true, "sbmenu_clicks", this)
this.reliableSbMenuClicks = {getValue: ()=>false}//removed because hypixel fixed may add back later //new ToggleSetting("Make SBMENU clicks reliable", "This will delay clicks on sbmenu to time them so they dont get canceled", true, "sbmenu_time", this)
+
+ this.museumGuiEnabled = {getValue: ()=>false} //Removed because not finished yet new ToggleSetting("Custom Museum GUI", "Custom gui for the Museum", true, "custom_museum_enabled", this)
this.lastWindowId = 0
this.shouldHold = 10
@@ -89,6 +93,12 @@ class BetterGuis extends Feature {
]
this.registerEvent("guiMouseClick", this.guiClicked)
+ this.registerEvent("guiOpened", (event)=>{
+ if(this.museumGuiEnabled.getValue()) this.museumGui.guiOpened.call(this.museumGui, event)
+ })
+ this.registerEvent("tick", ()=>{
+ if(this.museumGuiEnabled.getValue()) this.museumGui.tick.call(this.museumGui)
+ })
this.registerStep(true, 10, this.step)
}
@@ -99,7 +109,7 @@ class BetterGuis extends Feature {
if(!hoveredSlot) return
let hoveredSlotId = hoveredSlot.field_75222_d
- // console.log(hoveredSlotId)
+ console.log(hoveredSlotId)
if(this.guiSlotClicked(ChatLib.removeFormatting(Player.getOpenedInventory().getName()), hoveredSlotId)){
cancel(event)
}
@@ -185,6 +195,8 @@ class BetterGuis extends Feature {
this.middleClickGuis = undefined
this.middleClickStartsWith = undefined
this.middleClickEndsWith = undefined
+
+ this.museumGui = undefined
}
onDisable(){