Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit the Big GUI Update: V2 #87

Closed
wants to merge 50 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
74ef372
pain
Aug 22, 2021
d167d51
pain: v2
Aug 22, 2021
731121b
:sadge:
Aug 22, 2021
01fde9b
pain: v3
Aug 22, 2021
4941842
i hope i fixed it (TM)
Aug 22, 2021
722f5b8
aaaa
Aug 22, 2021
70e06a2
a
Aug 22, 2021
415988b
aaaaaaaaaaaaaaaaaaaaa
Aug 22, 2021
0e9b6d0
enough nonsensical commits: do the thing.
Aug 23, 2021
0cc5723
update guibind
Aug 23, 2021
e7b9736
communism
Aug 24, 2021
13b5924
Josephworks got mad fixed it
Aug 24, 2021
cf46496
also do this LOL
Aug 24, 2021
fcc3752
Add utils for color gradients when @OxideWaveLength puts in full supp…
Aug 24, 2021
4f9e7ce
munky
Aug 25, 2021
ec5a4a2
pain
Aug 25, 2021
2aebf19
Joseph why
Aug 25, 2021
9b6780c
PRAcceptable(TM)
Aug 25, 2021
e3d185a
Absolute pain and suffering
Aug 29, 2021
8c44107
Insane hackery
Aug 30, 2021
0eeb6cf
Pov: you copied the wrong directory from tests
Aug 30, 2021
b6c96e0
pain
Aug 30, 2021
2154911
Fix Codacy retardidity
Aug 30, 2021
f4a9a30
Unless I get bored and rewrite the GUI again, this is the last commit
Aug 30, 2021
0828765
Got bored. PR not merged. Do some insane java math stuff
Aug 30, 2021
e95229e
I am dumb
Aug 30, 2021
2cd3166
Relying on java math to feed my family for 3 weeks
Aug 31, 2021
0624309
Yes!! It is happening!
Dec 31, 2069
7ae220b
Accidentally broke the space-time continuum, fixed that
Sep 1, 2021
8852497
yeah v2: electric boogaloo
Sep 2, 2021
a4d934f
Fixed ClickGUI colors
Sep 7, 2021
f6f34d0
Multiple GUI changes
Sep 7, 2021
5ac7f91
Merge branch 'master' of https://github.com/AcaiBerii/Minecraft-Hack-…
Sep 7, 2021
8dcbbc0
Codacy
Sep 7, 2021
7471e15
Hoping someone merges this sometime soon...
Sep 7, 2021
9c61b49
bug patch + hotbar toggle
sigmaclientwastaken Sep 10, 2021
160d008
Added VClip
sigmaclientwastaken Sep 10, 2021
f727189
Edited default settings
sigmaclientwastaken Sep 10, 2021
3e4d63a
Merge pull request #1 from sigmaclientwastaken/master
Sep 14, 2021
cb96b33
Update Readme.md
Sep 14, 2021
45f3c94
Update Readme.md
Sep 14, 2021
6169ec4
Update Readme.md
Sep 14, 2021
c947815
Update Readme.md
Sep 14, 2021
d5e259b
Update Readme.md
Sep 14, 2021
7a81622
Update Readme.md
Sep 14, 2021
70a571f
Updated readme
sigmaclientwastaken Sep 15, 2021
234e2de
Merge pull request #2 from sigmaclientwastaken/patch-1
Sep 19, 2021
a68db5c
Update Readme.md
Sep 19, 2021
2c422e3
Make everything insane
Sep 21, 2021
dd0504e
Pain
Sep 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
hs_err_pid*
61 changes: 10 additions & 51 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# Minecraft Base Hacked Client 1.8.8 (with Optifine)
# Oxide's 1.8.8 Base Hacked Client (OptiFine included)

## Welcome!
We have a FAQ (Q&A) section! If you are interested you can click [here](https://github.com/OxideWaveLength/Minecraft-Hack-BaseClient/wiki/FAQ-(Q&A))

We also have a Discord server! Click [here](https://discord.gg/pDweRGz) to join

If you don't have Discord, but have Twitter and need help or want to stay updated, you can follow me [here](https://twitter.com/OxideWaveLength)
This is a hacked client made for Minecraft 1.8.8.

------------

Expand All @@ -18,11 +14,11 @@ If you don't have Discord, but have Twitter and need help or want to stay update
- Java JRE (1.8)
- An IDE (The setup is for Eclipse, but MCP can also be setup on [IntelliJ Idea](https://www.youtube.com/watch?v=CtMhtp6QQoY))

#### Video!
#### Video by OxideWaveLength
Now a [video](https://www.youtube.com/watch?v=LSKu_zhPKc8) is available, showing how to set up the client. - The video is not up to date and a step is missing. Until that is updated you can watch that video and then come back and do the last step (adding javaws to your build path)

#### Let's get started
_Note: the instructions in italic apply ONLY to Eclipse, if you have a different IDE, [search how to set the project up on Google](https://lmgtfy.com/?q=How+to+setup+Minecraft+Coders+Pack+in+%5BMY+IDE%5D)_
#### Let's get started!
_Note: the instructions in italic apply ONLY to Eclipse, if you have a different IDE, [Search how to set the project up on Google](https://lmgtfy.com/?q=How+to+setup+Minecraft+Coders+Pack+in+%5BMY+IDE%5D)_

- Download [Minecraft Coders Pack 918 (1.8.8)](http://www.modcoderpack.com/files/mcp918.zip) _(or MCP)_
- Unzip the MCP into a folder and enter it
Expand All @@ -36,46 +32,9 @@ _Note: the instructions in italic apply ONLY to Eclipse, if you have a different
- Optionally delete the Server project (it is safe to do so)
- _Optionally enable the @formatting tags (Window -> Preferences -> Java -> Code Style -> Formatter -> Edit -> Expand "Off/On tags" -> Tick the "Enable Off/On tags" -> Change the Profile Name (or you will not be able to save) -> OK -> Apply and Close)_
- Change the JRE version from JRE1\_6 to JRE1\_8 _(Right click on "Client" -> Build Path -> Libraries -> Scroll to the bottom -> Double click "JRE System" -> Choose a JRE1\_8 -> Finish -> Apply and Close)_
- Add the javaws.jar to your project buildpath (the file is located here: "JAVA_PATH\jre1.8.0_VERSION\lib\javaws.jar", where "JAVA_PATH" is where your java is installed ("C:\Program Files\Java\", or "C:\Program Files (x86)\Java\" for 64-bit computers, is the default path on Windows) and "VERSION" is the java version you have installed.

------------

### Features

- CommandManager (with four commands, "irc", "set", "help", "bind" (added in the commit #41 / 0be34e4), "friend" and "names" (both added in the commit #78 / aa78114)
- ModuleManager (with module settings, four example module (Fly, TestModule, Friends and NameProtect) and the "AdvancedTabGUI" module)
- [EventManager](https://github.com/OxideWaveLength/Minecraft-Hack-BaseClient/wiki/EventManager)
- FileManager
- ConfigManager
- [TabGUI](https://github.com/OxideWaveLength/Minecraft-Hack-BaseClient/wiki/Tab-GUI)
- [Module ArrayList](https://github.com/OxideWaveLength/Minecraft-Hack-BaseClient/wiki/Modules-ArrayList-(or-%22ToggledModules%22))
- [Hotbar Overlay](https://github.com/OxideWaveLength/Minecraft-Hack-BaseClient/wiki/Hotbar-Overlay)
- Alt Manager (By Russian412)
- Slick's FontManager (Edited by Russian412 and me) - Updated in the commit #77 / a0bfdf7
- IRC Client
- FriendsManager - manages friends and enemies. Added in the commit #95 / d5e1270 by [@evrec](https://github.com/evrec)
- ClickGui - This is not completely finished yet, but it's working and will be completed in the future. Added in the commit #112 / 0cded5b

------------

### Coming Soon / TODO

- ~~Better hotbar overlay~~ (Added in commit #44 / 7634127)
- ~~Better module arraylist~~ (Added in commit #29 / 070586b!)
- ~~Better font manager~~ (Added in commit #77 / a0bfdf7)
- ~~Help command~~ (Done)
- ~~Better FileManager / ConfigManager~~ (Not needed as of now)
- Enhance some code
- Multi Versioning! Exactly, joining 1.12 servers in 1.8.8...

------------

### Most Important TODOs

- Create a wiki for every part of the client
- ~~Finish all of the event handlers~~ (Done! Added in the commit #38 / a2c72e1)
- ~~Finish the TabGui, so that the module settings can be changed from there (they can be seen already, but not changed)~~ (Done, added in the commit #55 / 26c5f09)

------------
- Add the javaws.jar to your project buildpath (the file is located here: "JAVA_PATH\jre1.8.0_VERSION\lib\javaws.jar", if you can't find it, the program should still run without it).

##### Any help is highly appreciated, I cannot put all of my time into this project, but expect updates to be coming pretty soon
#### Let's build it!
Here are videos showing how to export your client in Eclipse:
- [Minecraft Launcher (full tutorial)](https://www.youtube.com/watch?v=nlZKdifpoUA)
- [MultiMC (requires JSON file)](https://www.youtube.com/watch?v=TjJz9Iisg-Y)
68 changes: 50 additions & 18 deletions minecraft/me/wavelength/baseclient/BaseClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@

import org.lwjgl.opengl.Display;

import com.google.common.collect.Lists;

import me.wavelength.baseclient.account.AccountManager;
import me.wavelength.baseclient.command.CommandManager;
import me.wavelength.baseclient.event.EventManager;
import me.wavelength.baseclient.font.Font;
import me.wavelength.baseclient.friends.FriendsManager;
import me.wavelength.baseclient.gui.altmanager.GuiAltManager;
import me.wavelength.baseclient.gui.clickgui.ClickGui;
import me.wavelength.baseclient.hooks.HookManager;
import me.wavelength.baseclient.irc.IRCClient;
import me.wavelength.baseclient.module.ModuleManager;
import me.wavelength.baseclient.overlay.HotbarOverlay;
import me.wavelength.baseclient.overlay.TabGui1;
import me.wavelength.baseclient.overlay.ToggledModules1;
import me.wavelength.baseclient.thealtening.AltService;
Expand All @@ -34,13 +32,14 @@ public class BaseClient {
* Fonts: Slick's font manager edited by Russian412 and color system by me
* Alt Manager: Russian412's Alt Manager with some small bug-fixes by me
* The Altening Implementation: Russian412
* ZeroDay b21 colored ClickGUI, epic arraylist and client module group: AcaiBerii
*
* Everything else is made by me
* @formatter:on
**/

private final String clientName = "BaseClient";
private final String clientVersion = "0.1";
private String clientName = "BaseClient";
private String clientVersion = "0.1";
private final String author = "WaveLength";

public static BaseClient instance;
Expand All @@ -64,30 +63,38 @@ public class BaseClient {

private String packageBase = "me.wavelength.baseclient";

private boolean defaultHotbar = false;

private Config genericConfig;

private ClickGui clickGui;

private Locale englishLocale;

private ClassLoader loader = ClassLoader.getSystemClassLoader();

public BaseClient() {
instance = this;
}

public void initialize() {
instance = this;

printStartup();
setupShutdownHook();

Display.setTitle(String.format("%1$s - %2$s | Loading...", clientName, clientVersion));

this.englishLocale = new Locale();

this.ircClient = new IRCClient("chat.freenode.net", 6667, Minecraft.getMinecraft().getSession().getUsername(), "#WaveLengthBaseClient");
this.ircClient = new IRCClient("chat.freenode.net", 6667, Minecraft.getMinecraft().getSession().getUsername(),
"#WaveLengthBaseClient");

new GuiAltManager(); // We create the instance.

String clientFolder = new File(".").getAbsolutePath();

clientFolder = (clientFolder.contains("jars") ? new File(".").getAbsolutePath().substring(0, clientFolder.length() - 2) : new File(".").getAbsolutePath()) + Strings.getSplitter() + clientName;
clientFolder = (clientFolder.contains("jars")
? new File(".").getAbsolutePath().substring(0, clientFolder.length() - 2)
: new File(".").getAbsolutePath()) + Strings.getSplitter() + clientName;

String accountManagerFolder = clientFolder + Strings.getSplitter() + "alts";

Expand All @@ -101,19 +108,20 @@ public void initialize() {

this.friendsManager = new FriendsManager();

this.moduleManager = new ModuleManager();
this.commandManager = new CommandManager(".");

this.moduleManager = new ModuleManager();

commandManager.registerCommands(); // Moved here to make sure the CommandManager instance is created, else the
// "commandManager" variable in the Command class would be null (since we are
// "commandManager" variable in the Command class would be null (since we
// are
// getting the CommandManager instance from this class)

this.altService = new AltService();

switchToMojang();

this.genericConfig = new Config(new File(clientFolder + Strings.getSplitter() + "config.cfg"));
genericConfig.addDefault("tabguicolor", "5556190");

/** Setting a custom icon */

Expand All @@ -128,13 +136,12 @@ public void initialize() {
public void afterMinecraft() {
Display.setTitle(String.format("%1$s - %2$s", clientName, clientVersion));

this.font = new Font(packageBase + ".font.fonts", "BwModelicaSS01-RegularCondensed", 50, 25, 30, 33);
this.font = new Font(packageBase + ".font.fonts", "jellolight", 25, 30, 33, 50, 55);

registerHuds();
}

private void registerHuds() {
new HotbarOverlay();
new ToggledModules1();
new TabGui1();
}
Expand Down Expand Up @@ -196,10 +203,6 @@ public String getPackageBase() {
return packageBase;
}

public boolean isDefaultHotbar() {
return defaultHotbar;
}

public Config getGenericConfig() {
return genericConfig;
}
Expand All @@ -212,6 +215,18 @@ public Locale getEnglishLocale() {
return englishLocale;
}

public void setClientName(String clientName) {
this.clientName = clientName;
}

public void setClientVersion(String clientVersion) {
this.clientVersion = clientVersion;
}

public ClassLoader getLoader() {
return this.loader;
}

public void switchToMojang() {
try {
this.altService.switchService(AltService.EnumAltService.MOJANG);
Expand All @@ -232,4 +247,21 @@ public void switchToTheAltening() {
}
}

public void setupShutdownHook() {
boolean shutdownHookInit = HookManager.installShutdownHook(new Thread(() -> {
System.out.println(String.format("%s %s shutting down.", this.clientName, this.clientVersion));
}));

System.out.println(
String.format("Shutdown hook %s initialized.", shutdownHookInit ? "successfully" : "unsuccessfully"));
}

public void printStartup() {
System.out.println(String.format("%s %s starting up.", this.clientName, this.clientVersion));
}

public static BaseClient getInstance() {
return BaseClient.instance;
}

}
23 changes: 9 additions & 14 deletions minecraft/me/wavelength/baseclient/command/CommandManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,7 @@
import org.lwjgl.input.Keyboard;

import me.wavelength.baseclient.BaseClient;
import me.wavelength.baseclient.command.commands.BindCommand;
import me.wavelength.baseclient.command.commands.ColorCommand;
import me.wavelength.baseclient.command.commands.FontCommand;
import me.wavelength.baseclient.command.commands.FriendsCommand;
import me.wavelength.baseclient.command.commands.HelpCommand;
import me.wavelength.baseclient.command.commands.IRCCommand;
import me.wavelength.baseclient.command.commands.NamesCommand;
import me.wavelength.baseclient.command.commands.SetCommand;
import me.wavelength.baseclient.command.commands.ToggleCommand;
import me.wavelength.baseclient.command.commands.XRayCommand;
import me.wavelength.baseclient.command.commands.*;
import me.wavelength.baseclient.event.EventListener;
import me.wavelength.baseclient.event.events.KeyPressedEvent;
import me.wavelength.baseclient.event.events.MessageSentEvent;
Expand Down Expand Up @@ -58,12 +49,13 @@ public void registerCommands() {
registerCommand(new IRCCommand());
registerCommand(new SetCommand());
registerCommand(new BindCommand());
registerCommand(new ColorCommand());
registerCommand(new FriendsCommand(BaseClient.instance.getFriendsManager()));
registerCommand(new NamesCommand());
registerCommand(new XRayCommand());
registerCommand(new VClipCommand());
registerCommand(new FontCommand());
registerCommand(new ToggleCommand());
registerCommand(new ClientCommand());
}

public List<Command> getCommands() {
Expand All @@ -81,7 +73,8 @@ public String getHelpMessage(String command) {
public Command getCommand(String name) {
for (int i = 0; i < commands.size(); i++) {
Command command = commands.get(i);
if (command.getName().equalsIgnoreCase(name) || Arrays.stream(command.getAliases()).anyMatch(name::equalsIgnoreCase))
if (command.getName().equalsIgnoreCase(name)
|| Arrays.stream(command.getAliases()).anyMatch(name::equalsIgnoreCase))
return command;
}

Expand Down Expand Up @@ -120,10 +113,12 @@ public void onMessageSent(MessageSentEvent event) {
if (ircClient != null && ircClient.isActive()) {
try {
ircClient.sendMessage(ircClient.getChannel(), commandLine.substring(1));
Player.sendMessage(String.format("%1$s&6YOU &7(&e&o%2$s&7)&7: &e%3$s", ircClient.getPrefix(), ircClient.getUsername(), commandLine.substring(1)));
Player.sendMessage(String.format("%1$s&6YOU &7(&e&o%2$s&7)&7: &e%3$s", ircClient.getPrefix(),
ircClient.getUsername(), commandLine.substring(1)));
} catch (IOException e) {
e.printStackTrace();
Player.sendMessage(String.format("%1$sCan't send the chat message. (%2$s)", ircClient.getPrefix(), e.getMessage()));
Player.sendMessage(String.format("%1$sCan't send the chat message. (%2$s)",
ircClient.getPrefix(), e.getMessage()));
}
event.setCancelled(true);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package me.wavelength.baseclient.command.commands;

import me.wavelength.baseclient.BaseClient;
import me.wavelength.baseclient.command.Command;

public class ClientCommand extends Command {
public ClientCommand() {
super("client", "client <version|name> <value>", "Changes the client version/name");
}

@Override
public String executeCommand(String line, String[] args) {
if (args.length < 2)
return getSyntax("&c");

switch (args[0].toLowerCase()) {
case ("name"):
BaseClient.instance.setClientName(args[1]);
return String.format("&aThe client's name has been succesfully changed to &e%1$s&a.", args[1]);
case ("version"):
BaseClient.instance.setClientVersion(args[1]);
return String.format("&aThe client's version has been succesfully changed to &e%1$s&a.", args[1]);
default:
return getSyntax("&c");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package me.wavelength.baseclient.command.commands;

import me.wavelength.baseclient.BaseClient;
import me.wavelength.baseclient.command.Command;

public class ClientNameCommand extends Command {
public ClientNameCommand() {
super("clientname", "clientname <name>", "Changes the client name");
}

@Override
public String executeCommand(String line, String[] args) {
if (args.length < 1)
return getSyntax("&c");

BaseClient.instance.setClientName(args[0]);

return String.format("&aThe client's name has been succesfully changed to &e%1$s&a.", args[0]);
}
}
Loading