aboutsummaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
Diffstat (limited to 'features')
-rw-r--r--features/betterGuis/dungeonReadyGui.js52
-rw-r--r--features/betterGuis/index.js5
-rw-r--r--features/lockedFeatures/index.js4
3 files changed, 59 insertions, 2 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"){
diff --git a/features/lockedFeatures/index.js b/features/lockedFeatures/index.js
index ffe6faa..ca69a27 100644
--- a/features/lockedFeatures/index.js
+++ b/features/lockedFeatures/index.js
@@ -90,10 +90,10 @@ class LockedFeatures extends Feature {
let timeTillIncrease = Infinity
let timeTillDecrease = Infinity
- if(nextProgress[1]-playerProgress[1] < 0){
+ if(nextProgress && nextProgress[1]-playerProgress[1] < 0){
timeTillIncrease = ((nextProgress[0]-playerProgress[0])/(playerProgress[1]-nextProgress[1])*60*60*1000)
}
- if(prevProgress[1]-playerProgress[1] < 0){
+ if(prevProgress && prevProgress[1]-playerProgress[1] < 0){
timeTillDecrease = ((playerProgress[0]-prevProgress[0])/(prevProgress[1]-playerProgress[1])*60*60*1000)
}