diff options
author | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-29 21:45:10 +0800 |
---|---|---|
committer | Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> | 2022-08-29 21:45:10 +0800 |
commit | 9ed5d700596d44300f75aa18a912cb37e08c42de (patch) | |
tree | 7d41e61b2df870b8e8265f456eb7d600c3347bc6 /features/betterGuis/dungeonReadyGui.js | |
parent | c4a628c51db919199629aa7639e8f3df33de4b7f (diff) | |
download | SoopyV2-9ed5d700596d44300f75aa18a912cb37e08c42de.tar.gz SoopyV2-9ed5d700596d44300f75aa18a912cb37e08c42de.tar.bz2 SoopyV2-9ed5d700596d44300f75aa18a912cb37e08c42de.zip |
add return thing due to functionality change
Diffstat (limited to 'features/betterGuis/dungeonReadyGui.js')
-rw-r--r-- | features/betterGuis/dungeonReadyGui.js | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/features/betterGuis/dungeonReadyGui.js b/features/betterGuis/dungeonReadyGui.js index 34ce80e..ad9a5dd 100644 --- a/features/betterGuis/dungeonReadyGui.js +++ b/features/betterGuis/dungeonReadyGui.js @@ -63,12 +63,12 @@ class DungeonReadyGui { this.classBoxes = []; this.currentPlayerClass = -1; - this.classes = { - "Healer": new Item("minecraft:potion"), - "Mage": new Item("minecraft:blaze_rod"), - "Berserker": new Item("minecraft:iron_sword"), - "Archer": new Item("minecraft:bow"), - "Tank": new Item("minecraft:leather_chestplate") + this.classes = { + "Healer": new Item("minecraft:potion"), + "Mage": new Item("minecraft:blaze_rod"), + "Berserker": new Item("minecraft:iron_sword"), + "Archer": new Item("minecraft:bow"), + "Tank": new Item("minecraft:leather_chestplate") }; Object.keys(this.classes).forEach((clas, i) => { let classBox = new BoxWithTextAndDescription() @@ -85,7 +85,7 @@ class DungeonReadyGui { .setHandler(() => { let scale = 16 / Math.min(classBox.location.getWidthExact(), classBox.location.getHeightExact() / 2) * 3; this.classes[clas].draw(classBox.location.getXExact() + classBox.location.getWidthExact() / 2 - 16 * scale / 2, classBox.location.getYExact() + classBox.location.getHeightExact() - 16 * scale - 4, scale); - })).addEvent(new SoopyMouseClickEvent().setHandler(() => + })).addEvent(new SoopyMouseClickEvent().setHandler(() => this.clickedClass(classIndex) )); @@ -97,7 +97,7 @@ class DungeonReadyGui { .setLocation(0.33, 0.33, 0.33, 0.33) .setColor(255, 150, 150) .addEvent(new SoopyMouseClickEvent() - .setHandler(() => this.ready())); + .setHandler(() => this.ready())); this.mainPage.addChild(this.playerReadyButton); } @@ -189,11 +189,11 @@ class DungeonReadyGui { } else { let boxId = this.nameToId[ChatLib.removeFormatting(Player.getContainer().getStackInSlot(3 + i).getName().split(" ").pop())]; - if (boxId) { + if (boxId) { this.readyBoxes[boxId].setColor(255, 150, 150); if (ChatLib.removeFormatting(Player.getContainer().getStackInSlot(12 + i).getName()) === "Ready") this.readyBoxes[boxId].setColor(150, 255, 150); - + this.readyBoxes[boxId].setLore(Player.getContainer().getStackInSlot(3 + i).getLore()); this.readyBoxes[boxId].setDesc("ยง0" + ChatLib.removeFormatting(Player.getContainer().getStackInSlot(3 + i).getLore()[2])); } @@ -248,9 +248,9 @@ class DungeonReadyGui { guiOpened(event) { let name = ""; - if (event.gui && event.gui.field_147002_h instanceof ContainerChest) + 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) return; Player.getPlayer().field_71070_bA = event.gui.field_147002_h @@ -259,6 +259,7 @@ class DungeonReadyGui { event.gui = this.soopyGui.ctGui this.soopyGui.ctGui.open(); + return } if (name === "Start Dungeon?" || name.startsWith("Catacombs - Floor ")) { @@ -276,7 +277,7 @@ class DungeonReadyGui { if (keyId === 18) //'e' key Client.currentGui.close(); - + } } |