Skip to content

Commit 61a6764

Browse files
committed
Made the clickgui closed by default
1 parent 5788de1 commit 61a6764

File tree

4 files changed

+52
-40
lines changed

4 files changed

+52
-40
lines changed

BleachHack-Fabric-1.16/src/main/java/bleach/hack/command/commands/CmdClickGui.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,7 @@ public void onCommand(String alias, String[] args) throws Exception {
3333
}
3434

3535
if (args[0].equalsIgnoreCase("reset")) {
36-
if (args.length == 1 || args[1].equalsIgnoreCase("open")) {
37-
int x = 10;
38-
39-
for (Window m : ClickGui.clickGui.getWindows()) {
40-
if (m instanceof ClickGuiWindow) {
41-
((ClickGuiWindow) m).hiding = false;
42-
m.x1 = x;
43-
m.y1 = 35;
44-
x += (int) ModuleManager.getModule("ClickGui").getSetting(0).asSlider().getValue() + 5;
45-
}
46-
}
47-
} else if (args[1].equalsIgnoreCase("closed")) {
36+
if (args.length == 1 || args[1].equalsIgnoreCase("closed")) {
4837
int y = 50;
4938

5039
for (Window m : ClickGui.clickGui.getWindows()) {
@@ -55,6 +44,17 @@ public void onCommand(String alias, String[] args) throws Exception {
5544
y += 16;
5645
}
5746
}
47+
} else if (args[1].equalsIgnoreCase("open")) {
48+
int x = 10;
49+
50+
for (Window m : ClickGui.clickGui.getWindows()) {
51+
if (m instanceof ClickGuiWindow) {
52+
((ClickGuiWindow) m).hiding = false;
53+
m.x1 = x;
54+
m.y1 = 35;
55+
x += (int) ModuleManager.getModule("ClickGui").getSetting(0).asSlider().getValue() + 5;
56+
}
57+
}
5858
} else {
5959
throw new CmdSyntaxException("Invalid reset mode!");
6060
}

BleachHack-Fabric-1.16/src/main/java/bleach/hack/gui/clickgui/ModuleClickGuiScreen.java

+14-8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import bleach.hack.BleachHack;
1616
import bleach.hack.command.Command;
17+
import bleach.hack.gui.clickgui.window.ClickGuiWindow;
1718
import bleach.hack.gui.clickgui.window.ModuleWindow;
1819
import bleach.hack.gui.window.Window;
1920
import bleach.hack.module.ModuleCategory;
@@ -48,27 +49,32 @@ public void init() {
4849
public void initWindows() {
4950
int len = (int) ModuleManager.getModule("ClickGui").getSetting(0).asSlider().getValue();
5051

51-
int startX = 10;
5252
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.PLAYER),
53-
startX, 35, len, "Player", new ItemStack(Items.ARMOR_STAND)));
53+
30, 50, len, "Player", new ItemStack(Items.ARMOR_STAND)));
5454

5555
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.RENDER),
56-
startX + len + 5, 35, len, "Render", new ItemStack(Items.YELLOW_STAINED_GLASS)));
56+
30, 66, len, "Render", new ItemStack(Items.YELLOW_STAINED_GLASS)));
5757

5858
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.COMBAT),
59-
startX + len * 2 + 10, 35, len, "Combat", new ItemStack(Items.TOTEM_OF_UNDYING)));
59+
30, 82, len, "Combat", new ItemStack(Items.TOTEM_OF_UNDYING)));
6060

6161
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.MOVEMENT),
62-
startX + len * 3 + 15, 35, len, "Movement", new ItemStack(Items.POTION)));
62+
30, 98, len, "Movement", new ItemStack(Items.POTION)));
6363

6464
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.EXPLOITS),
65-
startX + len * 4 + 20, 35, len, "Exploits", new ItemStack(Items.REPEATING_COMMAND_BLOCK)));
65+
30, 114, len, "Exploits", new ItemStack(Items.REPEATING_COMMAND_BLOCK)));
6666

6767
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.MISC),
68-
startX + len * 5 + 25, 35, len, "Misc", new ItemStack(Items.NAUTILUS_SHELL)));
68+
30, 130, len, "Misc", new ItemStack(Items.NAUTILUS_SHELL)));
6969

7070
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.WORLD),
71-
startX + len * 6 + 30, 35, len, "World", new ItemStack(Items.GRASS_BLOCK)));
71+
30, 146, len, "World", new ItemStack(Items.GRASS_BLOCK)));
72+
73+
for (Window w: getWindows()) {
74+
if (w instanceof ClickGuiWindow) {
75+
((ClickGuiWindow) w).hiding = true;
76+
}
77+
}
7278
}
7379

7480
public void onClose() {

BleachHack-Fabric-1.17/src/main/java/bleach/hack/command/commands/CmdClickGui.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,7 @@ public void onCommand(String alias, String[] args) throws Exception {
3333
}
3434

3535
if (args[0].equalsIgnoreCase("reset")) {
36-
if (args.length == 1 || args[1].equalsIgnoreCase("open")) {
37-
int x = 10;
38-
39-
for (Window m : ClickGui.clickGui.getWindows()) {
40-
if (m instanceof ClickGuiWindow) {
41-
((ClickGuiWindow) m).hiding = false;
42-
m.x1 = x;
43-
m.y1 = 35;
44-
x += (int) ModuleManager.getModule("ClickGui").getSetting(0).asSlider().getValue() + 5;
45-
}
46-
}
47-
} else if (args[1].equalsIgnoreCase("closed")) {
36+
if (args.length == 1 || args[1].equalsIgnoreCase("closed")) {
4837
int y = 50;
4938

5039
for (Window m : ClickGui.clickGui.getWindows()) {
@@ -55,6 +44,17 @@ public void onCommand(String alias, String[] args) throws Exception {
5544
y += 16;
5645
}
5746
}
47+
} else if (args[1].equalsIgnoreCase("open")) {
48+
int x = 10;
49+
50+
for (Window m : ClickGui.clickGui.getWindows()) {
51+
if (m instanceof ClickGuiWindow) {
52+
((ClickGuiWindow) m).hiding = false;
53+
m.x1 = x;
54+
m.y1 = 35;
55+
x += (int) ModuleManager.getModule("ClickGui").getSetting(0).asSlider().getValue() + 5;
56+
}
57+
}
5858
} else {
5959
throw new CmdSyntaxException("Invalid reset mode!");
6060
}

BleachHack-Fabric-1.17/src/main/java/bleach/hack/gui/clickgui/ModuleClickGuiScreen.java

+14-8
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import bleach.hack.BleachHack;
1616
import bleach.hack.command.Command;
17+
import bleach.hack.gui.clickgui.window.ClickGuiWindow;
1718
import bleach.hack.gui.clickgui.window.ModuleWindow;
1819
import bleach.hack.gui.window.Window;
1920
import bleach.hack.module.ModuleCategory;
@@ -48,27 +49,32 @@ public void init() {
4849
public void initWindows() {
4950
int len = (int) ModuleManager.getModule("ClickGui").getSetting(0).asSlider().getValue();
5051

51-
int startX = 10;
5252
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.PLAYER),
53-
startX, 35, len, "Player", new ItemStack(Items.ARMOR_STAND)));
53+
30, 50, len, "Player", new ItemStack(Items.ARMOR_STAND)));
5454

5555
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.RENDER),
56-
startX + len + 5, 35, len, "Render", new ItemStack(Items.YELLOW_STAINED_GLASS)));
56+
30, 66, len, "Render", new ItemStack(Items.YELLOW_STAINED_GLASS)));
5757

5858
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.COMBAT),
59-
startX + len * 2 + 10, 35, len, "Combat", new ItemStack(Items.TOTEM_OF_UNDYING)));
59+
30, 82, len, "Combat", new ItemStack(Items.TOTEM_OF_UNDYING)));
6060

6161
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.MOVEMENT),
62-
startX + len * 3 + 15, 35, len, "Movement", new ItemStack(Items.POTION)));
62+
30, 98, len, "Movement", new ItemStack(Items.POTION)));
6363

6464
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.EXPLOITS),
65-
startX + len * 4 + 20, 35, len, "Exploits", new ItemStack(Items.REPEATING_COMMAND_BLOCK)));
65+
30, 114, len, "Exploits", new ItemStack(Items.REPEATING_COMMAND_BLOCK)));
6666

6767
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.MISC),
68-
startX + len * 5 + 25, 35, len, "Misc", new ItemStack(Items.NAUTILUS_SHELL)));
68+
30, 130, len, "Misc", new ItemStack(Items.NAUTILUS_SHELL)));
6969

7070
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(ModuleCategory.WORLD),
71-
startX + len * 6 + 30, 35, len, "World", new ItemStack(Items.GRASS_BLOCK)));
71+
30, 146, len, "World", new ItemStack(Items.GRASS_BLOCK)));
72+
73+
for (Window w: getWindows()) {
74+
if (w instanceof ClickGuiWindow) {
75+
((ClickGuiWindow) w).hiding = true;
76+
}
77+
}
7278
}
7379

7480
public void onClose() {

0 commit comments

Comments
 (0)