Skip to content
This repository was archived by the owner on Jun 8, 2025. It is now read-only.

Commit 4a44afe

Browse files
committed
Last commit before full release!
Insane change list: Removed being able to be pushed out of blocks while free cam is enabled Fully implemented "Relations" system (friends / enemies) Added auto login Added account login screen Redesigned click gui Added tracers Redesigned HUD Added more no render modes/settings Recoded how managers work Fixed sprint not stopping so where along the line so many more changes, fuck life! 🐶
1 parent 896b2cd commit 4a44afe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1325
-693
lines changed

src/main/java/io/github/qe7/Osiris.java

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package io.github.qe7;
22

33
import io.github.qe7.events.api.EventBus;
4-
import io.github.qe7.managers.impl.CommandManager;
5-
import io.github.qe7.managers.impl.FriendManager;
6-
import io.github.qe7.managers.impl.ModuleManager;
7-
import io.github.qe7.managers.impl.WaypointManager;
4+
import io.github.qe7.managers.impl.*;
85
import io.github.qe7.utils.configs.FileUtility;
96
import net.minecraft.client.Minecraft;
107

@@ -23,8 +20,9 @@ public final class Osiris {
2320
private final EventBus eventBus;
2421

2522
// Managers
23+
private final AccountManager accountManager;
2624
private final WaypointManager waypointManager;
27-
private final FriendManager friendManager;
25+
private final RelationManager relationManager;
2826
private final ModuleManager moduleManager;
2927
private final CommandManager commandManager;
3028

@@ -34,14 +32,15 @@ private Osiris() {
3432

3533
// set name and version
3634
this.name = "Osiris";
37-
this.version = "1.0";
35+
this.version = "1.0.0";
3836

3937
// create event bus
4038
this.eventBus = new EventBus();
4139

4240
// create instance of managers
41+
this.accountManager = new AccountManager();
4342
this.waypointManager = new WaypointManager();
44-
this.friendManager = new FriendManager();
43+
this.relationManager = new RelationManager();
4544
this.moduleManager = new ModuleManager();
4645
this.commandManager = new CommandManager();
4746
}
@@ -56,16 +55,18 @@ public void initialise() {
5655
FileUtility.createDirectory();
5756

5857
// initialise managers
58+
this.getAccountManager().initialise();
5959
this.getWaypointManager().initialise();
60-
this.getFriendManager().initialise();
60+
this.getRelationManager().initialise();
6161
this.getModuleManager().initialise();
6262
this.getCommandManager().initialise();
6363

6464
// register shutdown hook, save configs on shutdown
6565
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
6666
System.out.println("Osiris shutting down!");
6767

68-
this.getFriendManager().saveFriends();
68+
this.getAccountManager().saveAccounts();
69+
this.getRelationManager().saveRelations();
6970
this.getWaypointManager().saveWaypoints();
7071
this.getModuleManager().saveModules();
7172

@@ -92,12 +93,16 @@ public EventBus getEventBus() {
9293
return eventBus;
9394
}
9495

96+
public AccountManager getAccountManager() {
97+
return accountManager;
98+
}
99+
95100
public WaypointManager getWaypointManager() {
96101
return waypointManager;
97102
}
98103

99-
public FriendManager getFriendManager() {
100-
return friendManager;
104+
public RelationManager getRelationManager() {
105+
return relationManager;
101106
}
102107

103108
public ModuleManager getModuleManager() {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package io.github.qe7.events.impl.render;
2+
3+
import io.github.qe7.events.api.types.CancellableEvent;
4+
5+
public class RenderGuiAchievementEvent extends CancellableEvent { }
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package io.github.qe7.events.impl.render;
2+
3+
import io.github.qe7.events.api.types.CancellableEvent;
4+
5+
public class RenderHurtCamEvent extends CancellableEvent { }
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package io.github.qe7.features.accounts;
2+
3+
import com.google.gson.JsonObject;
4+
import io.github.qe7.utils.configs.Serialized;
5+
6+
import java.util.HashMap;
7+
8+
public class Account implements Serialized {
9+
10+
private final String username;
11+
12+
private String password;
13+
14+
public Account(String username) {
15+
this.username = username;
16+
}
17+
18+
public Account(String username, String password) {
19+
this.username = username;
20+
this.password = password;
21+
}
22+
23+
public String getUsername() {
24+
return this.username;
25+
}
26+
27+
public String getPassword() {
28+
return this.password;
29+
}
30+
31+
public void setPassword(String password) {
32+
this.password = password;
33+
}
34+
35+
@Override
36+
public JsonObject serialize() {
37+
JsonObject object = new JsonObject();
38+
39+
object.addProperty("password", this.password);
40+
41+
return object;
42+
}
43+
44+
@Override
45+
public void deserialize(JsonObject object) {
46+
this.password = object.get("password").getAsString();
47+
}
48+
}

src/main/java/io/github/qe7/features/commands/impl/BindCommand.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ public BindCommand() {
1818
@Override
1919
public void execute(String[] args) {
2020
if (args.length < 3) {
21-
ChatUtility.sendPrefixedMessage("!", "Invalid arguments");
21+
ChatUtility.addPrefixedMessage("Bind", "Invalid arguments");
22+
ChatUtility.addPrefixedMessage("Bind", "Usage: " + this.getUsage());
2223
return;
2324
}
2425

@@ -29,7 +30,7 @@ public void execute(String[] args) {
2930
if (module.getName().replace(" ", "").equalsIgnoreCase(moduleName)) {
3031
if (key.equalsIgnoreCase("none")) {
3132
module.setKeyCode(-1);
32-
ChatUtility.sendPrefixedMessage("!", "Unbound " + module.getName());
33+
ChatUtility.addPrefixedMessage("Bind", "Unbound " + module.getName());
3334
return;
3435
}
3536

@@ -38,16 +39,16 @@ public void execute(String[] args) {
3839
try {
3940
keyCode = Keyboard.getKeyIndex(key.toUpperCase());
4041
} catch (NumberFormatException e) {
41-
ChatUtility.sendPrefixedMessage("!", "Invalid key");
42+
ChatUtility.addPrefixedMessage("Bind", "Invalid key");
4243
return;
4344
}
4445

4546
module.setKeyCode(keyCode);
46-
ChatUtility.sendPrefixedMessage("!", "Bound " + module.getName() + " to " + key);
47+
ChatUtility.addPrefixedMessage("Bind", "Bound " + module.getName() + " to " + key);
4748
return;
4849
}
4950
}
5051

51-
ChatUtility.sendPrefixedMessage("!", "Module not found");
52+
ChatUtility.addPrefixedMessage("Bind", "Module not found");
5253
}
5354
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
package io.github.qe7.features.commands.impl;
2+
3+
import io.github.qe7.Osiris;
4+
import io.github.qe7.features.commands.api.Command;
5+
import io.github.qe7.features.relations.Relation;
6+
import io.github.qe7.features.relations.enums.RelationType;
7+
import io.github.qe7.utils.local.ChatUtility;
8+
9+
import java.util.List;
10+
import java.util.stream.Collectors;
11+
12+
public class EnemyCommand extends Command {
13+
14+
public EnemyCommand() {
15+
super("Enemy", "Whitelists a player");
16+
17+
this.setAliases(new String[]{"e", "enemies", "target"});
18+
this.setUsage("enemy <add/del/list> <player>");
19+
}
20+
21+
@Override
22+
public void execute(String[] args) {
23+
if (args.length < 2 || args.length > 3) {
24+
ChatUtility.addPrefixedMessage("Enemy", "Invalid arguments");
25+
ChatUtility.addPrefixedMessage("Enemy", this.getUsage());
26+
return;
27+
}
28+
29+
final String action = args[1];
30+
31+
switch (action.toLowerCase()) {
32+
case "add": {
33+
if (Osiris.getInstance().getRelationManager().isFriend(args[2])) {
34+
ChatUtility.addPrefixedMessage("Enemy", "Already friends with " + args[2]);
35+
return;
36+
}
37+
if (Osiris.getInstance().getRelationManager().isEnemy(args[2])) {
38+
ChatUtility.addPrefixedMessage("Enemy", "Already enemies with " + args[2]);
39+
return;
40+
}
41+
Osiris.getInstance().getRelationManager().addRelation(args[2], RelationType.ENEMY);
42+
ChatUtility.addPrefixedMessage("Enemy", "Added " + args[2] + " to enemies");
43+
break;
44+
}
45+
case "del": {
46+
if (!Osiris.getInstance().getRelationManager().isEnemy(args[2])) {
47+
ChatUtility.addPrefixedMessage("Enemy", "Not enemies with " + args[2]);
48+
return;
49+
}
50+
Osiris.getInstance().getRelationManager().removeRelation(args[2]);
51+
ChatUtility.addPrefixedMessage("Enemy", "Removed " + args[2] + "from enemies");
52+
break;
53+
}
54+
case "list": {
55+
List<Relation> enemies = Osiris.getInstance().getRelationManager().getMap().keySet().stream().filter(relation -> relation.getType() == RelationType.ENEMY).collect(Collectors.toList());
56+
57+
if (enemies.isEmpty()) {
58+
ChatUtility.addPrefixedMessage("Enemy", "No enemies");
59+
return;
60+
}
61+
62+
String display = enemies.stream().map(Relation::getName).reduce((a, b) -> a + ", " + b).orElse("");
63+
64+
ChatUtility.addPrefixedMessage("Enemy", "Enemies: " + display);
65+
break;
66+
}
67+
default:
68+
ChatUtility.addPrefixedMessage("Enemy", "Invalid action");
69+
}
70+
}
71+
}

src/main/java/io/github/qe7/features/commands/impl/FriendCommand.java

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,70 @@
22

33
import io.github.qe7.Osiris;
44
import io.github.qe7.features.commands.api.Command;
5-
import io.github.qe7.features.friends.Friend;
6-
import io.github.qe7.features.friends.enums.FriendType;
5+
import io.github.qe7.features.relations.Relation;
6+
import io.github.qe7.features.relations.enums.RelationType;
77
import io.github.qe7.utils.local.ChatUtility;
88

9+
import java.util.List;
10+
import java.util.stream.Collectors;
11+
912
public class FriendCommand extends Command {
1013

1114
public FriendCommand() {
1215
super("Friend", "Whitelists a player");
1316

14-
this.setAliases(new String[]{"f"});
17+
this.setAliases(new String[]{"f", "friends", "whitelist"});
1518
this.setUsage("friend <add/del/list> <player>");
1619
}
1720

1821
@Override
1922
public void execute(String[] args) {
2023
if (args.length < 2 || args.length > 3) {
21-
ChatUtility.sendPrefixedMessage("!", "Invalid arguments");
22-
ChatUtility.sendPrefixedMessage("!", this.getUsage());
24+
ChatUtility.addPrefixedMessage("Friend", "Invalid arguments");
25+
ChatUtility.addPrefixedMessage("Friend", this.getUsage());
2326
return;
2427
}
2528

2629
final String action = args[1];
2730

2831
switch (action.toLowerCase()) {
2932
case "add": {
30-
if (Osiris.getInstance().getFriendManager().isFriend(args[2])) {
31-
ChatUtility.sendPrefixedMessage("!", "Already friends with " + args[2]);
33+
if (Osiris.getInstance().getRelationManager().isFriend(args[2])) {
34+
ChatUtility.addPrefixedMessage("Friend", "Already friends with " + args[2]);
35+
return;
36+
}
37+
if (Osiris.getInstance().getRelationManager().isEnemy(args[2])) {
38+
ChatUtility.addPrefixedMessage("Friend", "Already enemies with " + args[2]);
3239
return;
3340
}
34-
Osiris.getInstance().getFriendManager().addFriend(args[2], FriendType.FRIEND);
35-
ChatUtility.sendPrefixedMessage("!", "Added " + args[2] + " to friends");
41+
Osiris.getInstance().getRelationManager().addRelation(args[2], RelationType.FRIEND);
42+
ChatUtility.addPrefixedMessage("Friend", "Added " + args[2] + " to friends");
3643
break;
3744
}
3845
case "del": {
39-
if (!Osiris.getInstance().getFriendManager().isFriend(args[2])) {
40-
ChatUtility.sendPrefixedMessage("!", "Not friends with " + args[2]);
46+
if (!Osiris.getInstance().getRelationManager().isFriend(args[2])) {
47+
ChatUtility.addPrefixedMessage("Friend", "Not friends with " + args[2]);
4148
return;
4249
}
43-
Osiris.getInstance().getFriendManager().removeFriend(args[2]);
44-
ChatUtility.sendPrefixedMessage("!", "Removed " + args[2] + "from friends");
50+
Osiris.getInstance().getRelationManager().removeRelation(args[2]);
51+
ChatUtility.addPrefixedMessage("Friend", "Removed " + args[2] + "from friends");
4552
break;
4653
}
4754
case "list": {
48-
if (Osiris.getInstance().getFriendManager().getMap().isEmpty()) {
49-
ChatUtility.sendPrefixedMessage("!", "No friends");
55+
List<Relation> friends = Osiris.getInstance().getRelationManager().getMap().keySet().stream().filter(relation -> relation.getType() == RelationType.FRIEND).collect(Collectors.toList());
56+
57+
if (friends.isEmpty()) {
58+
ChatUtility.addPrefixedMessage("Friend", "No friends");
5059
return;
5160
}
52-
String friends = Osiris.getInstance().getFriendManager().getMap().keySet().stream().map(Friend::getName).reduce((a, b) -> a + ", " + b).orElse("");
53-
ChatUtility.sendPrefixedMessage("!", "Friends: " + friends);
61+
62+
String display = friends.stream().map(Relation::getName).reduce((a, b) -> a + ", " + b).orElse("");
63+
64+
ChatUtility.addPrefixedMessage("Friend", "Friends: " + display);
5465
break;
5566
}
56-
default: ChatUtility.sendPrefixedMessage("!", "Invalid action");
67+
default:
68+
ChatUtility.addPrefixedMessage("Friend", "Invalid action");
5769
}
5870
}
5971
}

src/main/java/io/github/qe7/features/commands/impl/ToggleCommand.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,33 @@ public class ToggleCommand extends Command {
1010
public ToggleCommand() {
1111
super("Toggle", "Toggles a given module");
1212

13-
this.setAliases(new String[] {"t"});
13+
this.setAliases(new String[]{"t"});
1414
this.setUsage("toggle <module>");
1515
}
1616

1717
@Override
1818
public void execute(String[] args) {
1919
if (args.length < 2) {
20-
ChatUtility.sendPrefixedMessage("!", "Usage: " + this.getUsage());
20+
ChatUtility.addPrefixedMessage("Toggle", "Invalid arguments");
21+
ChatUtility.addPrefixedMessage("Toggle", "Usage: " + this.getUsage());
2122
return;
2223
}
2324

2425
String moduleName = args[1];
2526

2627
if (moduleName.isEmpty()) {
27-
ChatUtility.sendPrefixedMessage("!", "Usage: " + this.getUsage());
28+
ChatUtility.addPrefixedMessage("Toggle", "Usage: " + this.getUsage());
2829
return;
2930
}
3031

3132
for (Module module : Osiris.getInstance().getModuleManager().getMap().values()) {
3233
if (module.getName().replace(" ", "").equalsIgnoreCase(moduleName)) {
3334
module.setEnabled(!module.isEnabled());
34-
ChatUtility.sendPrefixedMessage("!", "Toggled " + module.getName());
35+
ChatUtility.addPrefixedMessage("Toggle", "Toggled " + module.getName());
3536
return;
3637
}
3738
}
3839

39-
ChatUtility.sendPrefixedMessage("!", "Module not found");
40+
ChatUtility.addPrefixedMessage("Toggle", "Module not found");
4041
}
4142
}

src/main/java/io/github/qe7/features/friends/enums/FriendType.java

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)