Skip to content

Commit

Permalink
Added copyright header to all files. Implemented new Font system.
Browse files Browse the repository at this point in the history
  • Loading branch information
coltonk9043 committed Mar 3, 2024
1 parent 3f04c7a commit 22e7dc2
Show file tree
Hide file tree
Showing 210 changed files with 2,626 additions and 235 deletions.
7 changes: 4 additions & 3 deletions src/main/java/net/aoba/Aoba.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand All @@ -23,8 +23,7 @@

import net.fabricmc.api.ModInitializer;

public final class Aoba implements ModInitializer {

public class Aoba implements ModInitializer {
public static AobaClient instance;

@Override
Expand All @@ -41,4 +40,6 @@ public void onInitialize()
public static AobaClient getInstance() {
return instance;
}


}
19 changes: 18 additions & 1 deletion src/main/java/net/aoba/AobaClient.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand All @@ -21,17 +21,27 @@
*/
package net.aoba;

import java.util.ArrayList;
import java.util.List;

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.gui.font.FontManager;
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.font.Font;
import net.minecraft.client.font.FontLoader;
import net.minecraft.client.font.FontStorage;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.font.TrueTypeFontLoader;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.util.Identifier;

public class AobaClient {
public static final String NAME = "Aoba";
Expand All @@ -46,6 +56,7 @@ public class AobaClient {
public CommandManager commandManager;
public AltManager altManager;
public GuiManager hudManager;
public FontManager fontManager;
// public Settings settings;
public SettingManager settingManager;
public RenderUtils renderUtils;
Expand Down Expand Up @@ -74,6 +85,8 @@ public void Initialize() {
moduleManager = new ModuleManager();
System.out.println("[Aoba] Initializing Commands");
commandManager = new CommandManager();
System.out.println("[Aoba] Initializing Font Manager");
fontManager = new FontManager();
System.out.println("[Aoba] Initializing GUI");
hudManager = new GuiManager();
hudManager.Initialize();
Expand All @@ -89,6 +102,10 @@ public void Initialize() {
globalChat.StartListener();
}

public void loadAssets() {
fontManager.Initialize();
}

/**
* Updates Aoba on a per-tick basis.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/altmanager/Alt.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/altmanager/AltManager.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/altmanager/XboxLiveToken.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2024 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/>.
*/

package net.aoba.altmanager.exceptions;

public class InvalidTokenException extends Exception {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/Command.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/net/aoba/cmd/CommandException.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2024 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/>.
*/

package net.aoba.cmd;

public abstract class CommandException extends Exception{
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/aoba/cmd/CommandManager.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down Expand Up @@ -42,6 +42,7 @@ public class CommandManager {
public final CmdFastBreak fastbreak = new CmdFastBreak();
public final CmdFly fly = new CmdFly();
public final CmdFreecam freecam = new CmdFreecam();
public final CmdFont font = new CmdFont();
public final CmdFullbright fullbright = new CmdFullbright();
public final CmdHelp help = new CmdHelp();
public final CmdHud hud = new CmdHud();
Expand Down
20 changes: 18 additions & 2 deletions src/main/java/net/aoba/cmd/GlobalChat.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2024 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/>.
*/

package net.aoba.cmd;

import java.io.BufferedReader;
Expand All @@ -13,8 +31,6 @@
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.hud.ChatHudLine;
import net.minecraft.client.gui.hud.MessageIndicator;
import net.minecraft.client.util.ChatMessages;
import net.minecraft.text.OrderedText;
import net.minecraft.text.Text;

public class GlobalChat {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/InvalidSyntaxException.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdAimbot.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdAutoEat.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdChestESP.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/net/aoba/cmd/commands/CmdClickgui.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2024 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/>.
*/

package net.aoba.cmd.commands;

import net.aoba.Aoba;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdEntityESP.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdFastBreak.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdFly.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
57 changes: 57 additions & 0 deletions src/main/java/net/aoba/cmd/commands/CmdFont.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
package net.aoba.cmd.commands;

import net.aoba.Aoba;
import net.aoba.AobaClient;
import net.aoba.cmd.Command;
import net.aoba.cmd.CommandManager;
import net.aoba.cmd.InvalidSyntaxException;
import net.minecraft.client.font.TextRenderer;

public class CmdFont extends Command {

public CmdFont() {
super("font", "Sets the HUD font.", "[set] [value]");
}

@Override
public void runCommand(String[] parameters) throws InvalidSyntaxException {
if (parameters.length != 2)
throw new InvalidSyntaxException(this);

AobaClient aoba = Aoba.getInstance();

switch (parameters[0]) {
case "set":
try {
String font = parameters[1];
TextRenderer t = aoba.fontManager.fontRenderers.get(font);
if(t != null) {
aoba.fontManager.SetRenderer(t);
}
} catch (Exception e) {
CommandManager.sendChatMessage("Invalid value.");
}
break;
default:
throw new InvalidSyntaxException(this);
}
}

@Override
public String[] getAutocorrect(String previousParameter) {
switch (previousParameter) {
case "set":
AobaClient aoba = Aoba.getInstance();

String[] suggestions = new String[aoba.fontManager.fontRenderers.size()];

int i = 0;
for (String fontName : aoba.fontManager.fontRenderers.keySet())
suggestions[i++] = fontName;

return suggestions;
default:
return new String[] { "set" };
}
}
}
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdFreecam.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdFullbright.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/aoba/cmd/commands/CmdHelp.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Aoba Hacked Client
* Copyright (C) 2019-2023 coltonk9043
* Copyright (C) 2019-2024 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
Expand Down
Loading

0 comments on commit 22e7dc2

Please sign in to comment.