Skip to content

Commit

Permalink
Updated to 1.20.4
Browse files Browse the repository at this point in the history
Updated to 1.20.4 w/ Fabric Loader 0.15.7 and 0.96.3.
Fixed Global Chat issues.
  • Loading branch information
coltonk9043 committed Feb 19, 2024
1 parent 33d714f commit 3b5b155
Show file tree
Hide file tree
Showing 225 changed files with 16,237 additions and 178 deletions.
17 changes: 8 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.2
yarn_mappings=1.20.2+build.4
loader_version=0.14.24

# check these on https://fabricmc.net/develop
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
loader_version=0.15.7


# Mod Properties
mod_version = 1.0.0
maven_group = net.aoba
archives_base_name = Aoba
mod_version = 1.0.0
maven_group = net.aoba
archives_base_name = Aoba

# Dependencies
fabric_version=0.90.7+1.20.2
fabric_version=0.96.3+1.20.4
44 changes: 44 additions & 0 deletions remappedSrc/net/aoba/Aoba.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* A class to initialize and hold the Singleton of Aoba Client.
*/
package net.aoba;

import net.fabricmc.api.ModInitializer;

public final class Aoba implements ModInitializer {

public static AobaClient instance;

@Override
public void onInitialize()
{
instance = new AobaClient();
instance.Initialize();
}

/**
* Returns the singleton instance of Aoba client.
* @return Aoba Client
*/
public static AobaClient getInstance() {
return instance;
}
}
142 changes: 142 additions & 0 deletions remappedSrc/net/aoba/AobaClient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* A class to represent Aoba Client and all of its functions.
*/
package net.aoba;

import net.aoba.altmanager.AltManager;
import net.aoba.cmd.CommandManager;
import net.aoba.cmd.GlobalChat;
import net.aoba.event.EventManager;
import net.aoba.gui.GuiManager;
import net.aoba.misc.RenderUtils;
import net.aoba.mixin.interfaces.IMinecraftClient;
import net.aoba.module.ModuleManager;
import net.aoba.settings.SettingManager;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;

public class AobaClient {
public static final String NAME = "Aoba";
public static final String VERSION = "1.20.2";
public static final String AOBA_VERSION = "1.4.0-preview-2";

public static MinecraftClient MC;
public static IMinecraftClient IMC;

// Systems
public ModuleManager moduleManager;
public CommandManager commandManager;
public AltManager altManager;
public GuiManager hudManager;
// public Settings settings;
public SettingManager settingManager;
public RenderUtils renderUtils;
public GlobalChat globalChat;
public EventManager eventManager;

private boolean ghostMode;

/**
* Initializes Aoba Client and creates sub-systems.
*/
public void Initialize() {
// Gets instance of Minecraft
MC = MinecraftClient.getInstance();
IMC = (IMinecraftClient)MC;

IMC.getItemUseCooldown();
System.out.println("[Aoba] Starting Client");

eventManager = new EventManager();

renderUtils = new RenderUtils();
System.out.println("[Aoba] Reading Settings");
settingManager = new SettingManager();
System.out.println("[Aoba] Initializing Modules");
moduleManager = new ModuleManager();
System.out.println("[Aoba] Initializing Commands");
commandManager = new CommandManager();
System.out.println("[Aoba] Initializing GUI");
hudManager = new GuiManager();
hudManager.Initialize();
System.out.println("[Aoba] Loading Alts");
altManager = new AltManager();
System.out.println("[Aoba] Aoba-chan initialized and ready to play!");

SettingManager.loadSettings("config_category", settingManager.config_category);
SettingManager.loadSettings("modules_category", settingManager.modules_category);
SettingManager.loadSettings("hidden_category", settingManager.hidden_category);

globalChat = new GlobalChat();
globalChat.StartListener();
}

/**
* Updates Aoba on a per-tick basis.
*/
public void update() {
moduleManager.update();
hudManager.update();
}

/**
* Renders the HUD every frame
* @param context The current Matrix Stack
* @param partialTicks Delta between ticks
*/
public void drawHUD(DrawContext context, float partialTicks) {
// If the program is not in Ghost Mode, draw UI.
if (!ghostMode) {
hudManager.draw(context, partialTicks);
}
}

/**
* Toggles Ghost Mode. (No UI)
*/
public void toggleGhostMode() {
ghostMode = !ghostMode;
}

/**
* Returns whether Aoba is currently in Ghost Mode. (No UI)
* @return Ghost Mode
*/
public boolean isGhosted() {
return this.ghostMode;
}

/**
* Called when the client is shutting down.
*/
public void endClient() {
try {
SettingManager.saveSettings("config_category", settingManager.config_category);
SettingManager.saveSettings("modules_category", settingManager.modules_category);
SettingManager.saveSettings("hidden_category", settingManager.hidden_category);
altManager.saveAlts();
moduleManager.modules.forEach(s -> s.onDisable());
}catch(Exception e) {
e.printStackTrace();
}
System.out.println("[Aoba] Shutting down...");
}
}
131 changes: 131 additions & 0 deletions remappedSrc/net/aoba/altmanager/Alt.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* A class to represent an Alt Account and all of it's information.
*/
package net.aoba.altmanager;

public class Alt {
private String email;
private String username;
private String password;
private boolean microsoft = false;
private boolean isCracked = false;

/**
* Constructor for an Alt given it's email, password, and whether it is a Microsoft account.
* @param email Email used to log in to the account.
* @param password Password used to log in to the account.
* @param microsoft Whether or not the account is a Microsoft or Mojang Account.
*/
public Alt(String email, String password, boolean microsoft) {
this.email = email;
this.password = password;
this.microsoft = microsoft;
// If no password is entered, assume the account is a cracked account.
if(this.password.isEmpty()) {
this.isCracked = true;
}
}

/**
* Constructor for an Alt given it's email, password, username, and whether it is a Microsoft account.
* @param email Email used to log in to the account.
* @param password Password used to log in to the account.
* @param username Username that the account currently has.
* @param microsoft Whether or not the account is a Microsoft or Mojang Account.
*/
public Alt(String email, String password, String username, boolean microsoft) {
this.email = email;
this.password = password;
this.username = username;
this.microsoft = microsoft;
// If no password is entered, assume the account is a cracked account.
if(this.password.isEmpty()) {
this.isCracked = true;
}
}

/**
* Sets the username of the Alt account.
* @param username The username of the Alt account.
*/
public void setUsername(String username) {
this.username = username;
}

/**
* Sets the email of the Alt account.
* @param email The email of the Alt account.
*/
public void setEmail(String email) {
this.email = email;
}

/**
* Sets the password of the Alt account.
* @param password The password of the Alt account.
*/
public void setPassword(String password) {
this.password = password;
}

/**
* Gets the username of the Alt account.
* @return The username of the Alt account.
*/
public String getUsername() {
if(this.username == null) {
return "";
}
return this.username;
}

/**
* Gets the email of the Alt account.
* @return The email of the Alt account.
*/
public String getEmail() {
return this.email;
}

/**
* Gets the password of the Alt account.
* @return The password of the Alt account.
*/
public String getPassword() {
return this.password;
}

/**
* Gets whether the Alt account is cracked.
* @return Whether the Alt account is cracked.
*/
public boolean isCracked() {
return this.isCracked;
}

/**
* Gets whether the Alt account is a Microsoft account.
* @return Whether the Alt account is a Microsoft account.
*/
public boolean isMicrosoft() {
return this.microsoft;
}
}
Loading

0 comments on commit 3b5b155

Please sign in to comment.