aboutsummaryrefslogtreecommitdiff
path: root/features/betterGuis
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-14 18:41:09 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-04-14 18:41:09 +0800
commitf718bd5743701a7fb5f96e74a4df75145cc28789 (patch)
tree6105747f8242bf519f0014a401c3976031821d48 /features/betterGuis
parent957eed606234a4bc5e1b847580000a583ab9ee5b (diff)
downloadSoopyV2-f718bd5743701a7fb5f96e74a4df75145cc28789.tar.gz
SoopyV2-f718bd5743701a7fb5f96e74a4df75145cc28789.tar.bz2
SoopyV2-f718bd5743701a7fb5f96e74a4df75145cc28789.zip
beginning of dungeon ready gui + patch bug with guild event lb if u are in first or last place
Diffstat (limited to 'features/betterGuis')
-rw-r--r--features/betterGuis/dungeonReadyGui.js52
-rw-r--r--features/betterGuis/index.js5
2 files changed, 57 insertions, 0 deletions
diff --git a/features/betterGuis/dungeonReadyGui.js b/features/betterGuis/dungeonReadyGui.js
new file mode 100644
index 0000000..2428f5b
--- /dev/null
+++ b/features/betterGuis/dungeonReadyGui.js
@@ -0,0 +1,52 @@
+import { SoopyGui } from "../../../guimanager"
+
+
+const ContainerChest = Java.type("net.minecraft.inventory.ContainerChest")
+
+class DungeonReadyGui {
+ constructor(){
+ this.checkMenu = false
+
+ this.soopyGui = new SoopyGui()
+
+ this.soopyGui.optimisedLocations = true
+ }
+
+ tickMenu(){
+
+ }
+
+ guiOpened(event){
+ let name = ""
+ if(event.gui && event.gui.field_147002_h instanceof ContainerChest){
+ name = event.gui.field_147002_h.func_85151_d().func_145748_c_().func_150260_c()
+ }
+ if(this.soopyGui.ctGui.isOpen()){
+ if(event.gui && event.gui.field_147002_h){
+ Player.getPlayer().field_71070_bA = event.gui.field_147002_h
+
+ if(!Player.getOpenedInventory().getName().startsWith("Catacombs - Floor ")){
+ return
+ }
+
+ event.gui = this.soopyGui.ctGui
+ this.soopyGui.ctGui.open()
+ }
+ return
+ }
+ if(name === "Start Dungeon"){
+ if(event.gui && event.gui.field_147002_h) Player.getPlayer().field_71070_bA = event.gui.field_147002_h
+
+ this.soopyGui.open()
+ event.gui = this.soopyGui.ctGui
+ }
+ }
+
+ tick(){
+ if(this.soopyGui.ctGui.isOpen()){
+ this.tickMenu()
+ }
+ }
+}
+
+export default DungeonReadyGui; \ No newline at end of file
diff --git a/features/betterGuis/index.js b/features/betterGuis/index.js
index c931e50..23a7efa 100644
--- a/features/betterGuis/index.js
+++ b/features/betterGuis/index.js
@@ -5,6 +5,7 @@ import logger from "../../logger";
import { f } from "../../../mappings/mappings";
import ToggleSetting from "../settings/settingThings/toggle";
import MuseumGui from "./museumGui.js";
+// import DungeonReadyGui from "./dungeonReadyGui";
class BetterGuis extends Feature {
constructor() {
@@ -15,11 +16,13 @@ class BetterGuis extends Feature {
this.initVariables()
this.museumGui = new MuseumGui()
+ // this.dungeonReady = new DungeonReadyGui()
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, code kept incase hypixel adds back bug 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 = new ToggleSetting("Custom Museum GUI", "Custom gui for the Museum", true, "custom_museum_enabled", this)
+ // this.dungeonReadyGuiEnabled = new ToggleSetting("Custom Dungeon Ready GUI", "Custom gui for the dungeon ready up menu", true, "custom_dungeon_ready_enabled", this)
this.lastWindowId = 0
this.shouldHold = 10
@@ -98,6 +101,7 @@ class BetterGuis extends Feature {
this.registerEvent("guiMouseClick", this.guiClicked)
this.registerEvent("guiOpened", (event)=>{
if(this.museumGuiEnabled.getValue()) this.museumGui.guiOpened.call(this.museumGui, event)
+ // if(this.dungeonReadyGuiEnabled.getValue()) this.dungeonReady.guiOpened.call(this.dungeonReady, event)
})
this.registerStep(true, 10, this.step)
this.registerEvent("worldUnload", ()=>{this.museumGui.saveMuseumCache.call(this.museumGui)})
@@ -122,6 +126,7 @@ class BetterGuis extends Feature {
step(){
if(this.museumGuiEnabled.getValue()) this.museumGui.tick.call(this.museumGui)
+ // if(this.dungeonReadyGuiEnabled.getValue()) this.dungeonReady.tick.call(this.dungeonReady)
if(this.replaceSbMenuClicks.getValue()){
if(Player.getOpenedInventory() && Player.getOpenedInventory().getName()==="SkyBlock Menu"){