Skip to content

Commit 240b8e5

Browse files
author
YeahOMA
committed
initial commit
1 parent 20366cd commit 240b8e5

File tree

106 files changed

+17734
-0
lines changed

Some content is hidden

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

106 files changed

+17734
-0
lines changed

Explicit.java

Lines changed: 337 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,337 @@
1+
package me.explicit;
2+
3+
import java.io.File;
4+
import java.nio.charset.StandardCharsets;
5+
import java.security.MessageDigest;
6+
import java.util.Arrays;
7+
import java.util.Base64;
8+
import java.util.Iterator;
9+
import javax.crypto.Cipher;
10+
import javax.crypto.spec.SecretKeySpec;
11+
import me.explicit.color.ColorManager;
12+
import me.explicit.command.commands.BindCommand;
13+
import me.explicit.command.commands.ConfigCommand;
14+
import me.explicit.command.commands.FriendCommand;
15+
import me.explicit.command.commands.HelpCommand;
16+
import me.explicit.command.commands.SettingsCommand;
17+
import me.explicit.command.commands.ToggleCommand;
18+
import me.explicit.config.ConfigManager;
19+
import me.explicit.consolegui.ConsoleGUI;
20+
import me.explicit.friends.FriendManager;
21+
import me.explicit.module.Module;
22+
import me.explicit.module.ModuleManager;
23+
import me.explicit.net.NetHandler;
24+
import me.explicit.settings.SettingsManager;
25+
import me.explicit.ui.clickgui.ClickGUI;
26+
import me.explicit.ui.hud.HUDRenderer;
27+
import me.explicit.utils.Game;
28+
import me.explicit.utils.VersionCheck;
29+
import net.minecraft.client.Minecraft;
30+
import net.minecraft.client.network.NetHandlerPlayClient;
31+
import net.minecraft.network.INetHandler;
32+
import net.minecraftforge.client.ClientCommandHandler;
33+
import net.minecraftforge.client.event.RenderGameOverlayEvent;
34+
import net.minecraftforge.client.event.RenderWorldLastEvent;
35+
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
36+
import net.minecraftforge.common.MinecraftForge;
37+
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
38+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
39+
import net.minecraftforge.fml.common.gameevent.InputEvent.KeyInputEvent;
40+
import net.minecraftforge.fml.common.gameevent.TickEvent.ClientTickEvent;
41+
import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent;
42+
import org.lwjgl.input.Keyboard;
43+
44+
public class Explicit {
45+
46+
public static final String MODID;
47+
public static final String NAME;
48+
public static final String VERSION;
49+
public static Explicit instance;
50+
public ModuleManager mm;
51+
public SettingsManager sm;
52+
public ClickGUI clickGui;
53+
public ColorManager cm;
54+
public ConsoleGUI cg;
55+
public HUDRenderer uiRenderer;
56+
public ConfigManager configManager;
57+
public FriendManager friendManager;
58+
public static boolean destructed;
59+
public static boolean consolegui;
60+
private static final String[] lIIIIIIl;
61+
private static String[] lIIIIIll;
62+
63+
public void onInit() {
64+
VersionCheck versioncheck = new VersionCheck();
65+
66+
versioncheck.setName(Explicit.lIIIIIIl[0]);
67+
versioncheck.start();
68+
MinecraftForge.EVENT_BUS.register(this);
69+
this.configManager = new ConfigManager();
70+
this.sm = new SettingsManager();
71+
this.mm = new ModuleManager();
72+
this.clickGui = new ClickGUI();
73+
this.cm = new ColorManager();
74+
this.uiRenderer = new HUDRenderer();
75+
ConfigManager.init();
76+
this.friendManager = new FriendManager();
77+
if (!Explicit.destructed) {
78+
this.registerCommands();
79+
}
80+
81+
this.cg = new ConsoleGUI();
82+
this.cg.setName(Explicit.lIIIIIIl[1]);
83+
this.cg.start();
84+
}
85+
86+
public void registerCommands() {
87+
ClientCommandHandler.instance.registerCommand(new FriendCommand());
88+
ClientCommandHandler.instance.registerCommand(new ToggleCommand());
89+
ClientCommandHandler.instance.registerCommand(new BindCommand());
90+
ClientCommandHandler.instance.registerCommand(new ConfigCommand());
91+
ClientCommandHandler.instance.registerCommand(new SettingsCommand());
92+
ClientCommandHandler.instance.registerCommand(new HelpCommand());
93+
}
94+
95+
public void onSelfDestruct() {
96+
Minecraft.getMinecraft().currentScreen = null;
97+
Iterator iterator = this.mm.modules.iterator();
98+
99+
while (iterator.hasNext()) {
100+
Module module = (Module) iterator.next();
101+
102+
MinecraftForge.EVENT_BUS.unregister(module);
103+
module.setToggledNoSave(false);
104+
module.setName(Explicit.lIIIIIIl[2]);
105+
module = null;
106+
this.mm.modules.remove(module);
107+
}
108+
109+
MinecraftForge.EVENT_BUS.unregister(this);
110+
Explicit.consolegui = false;
111+
Explicit.destructed = true;
112+
this.configManager = null;
113+
this.uiRenderer = null;
114+
this.clickGui = null;
115+
this.mm = null;
116+
this.sm = null;
117+
File file = Minecraft.getMinecraft().mcDataDir;
118+
File file1 = new File(file, Explicit.lIIIIIIl[3]);
119+
File file2 = new File(file, Explicit.lIIIIIIl[4]);
120+
String[] astring = file1.list();
121+
122+
for (int i = 0; i < astring.length; ++i) {
123+
String s = astring[i];
124+
File file3 = new File(file1.getPath(), s);
125+
126+
file3.delete();
127+
}
128+
129+
file1.delete();
130+
if (file2.exists()) {
131+
String[] astring1 = file2.list();
132+
133+
for (int j = 0; j < astring1.length; ++j) {
134+
String s1 = astring1[j];
135+
File file4 = new File(file2.getPath(), s1);
136+
137+
file4.delete();
138+
}
139+
140+
file2.delete();
141+
}
142+
143+
}
144+
145+
@SubscribeEvent
146+
public void ClientTick(ClientTickEvent clienttickevent) {
147+
if (Game.World() != null) {
148+
INetHandler inethandler = Game.Player().sendQueue.getNetworkManager().getNetHandler();
149+
150+
if (!(inethandler instanceof NetHandler)) {
151+
Game.Player().sendQueue.getNetworkManager().setNetHandler(new NetHandler((NetHandlerPlayClient) inethandler));
152+
}
153+
}
154+
155+
if (!Explicit.destructed) {
156+
Iterator iterator = this.mm.getModules().iterator();
157+
158+
while (iterator.hasNext()) {
159+
Module module = (Module) iterator.next();
160+
161+
if (Game.World() != null && Game.Player() != null) {
162+
module.onUpdateNoToggle();
163+
if (module.isToggled()) {
164+
module.onUpdate();
165+
}
166+
}
167+
}
168+
169+
}
170+
}
171+
172+
@SubscribeEvent
173+
public void onLivingUpdate(LivingUpdateEvent livingupdateevent) {
174+
if (livingupdateevent.entityLiving != null && livingupdateevent.entityLiving == Game.Player()) {
175+
Iterator iterator = this.mm.getModules().iterator();
176+
177+
while (iterator.hasNext()) {
178+
Module module = (Module) iterator.next();
179+
180+
if (module.isToggled() && Game.World() != null && Game.Player() != null) {
181+
module.onMove();
182+
}
183+
}
184+
}
185+
186+
}
187+
188+
@SubscribeEvent
189+
public void PlayerTick(PlayerTickEvent playertickevent) {
190+
if (!Explicit.destructed) {
191+
Iterator iterator = this.mm.getModules().iterator();
192+
193+
while (iterator.hasNext()) {
194+
Module module = (Module) iterator.next();
195+
196+
if (module.isToggled() && Game.World() != null && Game.Player() != null) {
197+
module.onTick();
198+
}
199+
}
200+
201+
}
202+
}
203+
204+
@SubscribeEvent
205+
public void key(KeyInputEvent keyinputevent) {
206+
if (!Explicit.destructed && Game.World() != null && Game.Player() != null) {
207+
try {
208+
if (Keyboard.isCreated() && Keyboard.getEventKeyState()) {
209+
int i = Keyboard.getEventKey();
210+
211+
if (i <= 0) {
212+
return;
213+
}
214+
215+
Iterator iterator = this.mm.modules.iterator();
216+
217+
while (iterator.hasNext()) {
218+
Module module = (Module) iterator.next();
219+
220+
if (module.getKey() == i && i > 0) {
221+
module.toggle();
222+
}
223+
}
224+
}
225+
} catch (Exception exception) {
226+
exception.printStackTrace();
227+
}
228+
229+
}
230+
}
231+
232+
@SubscribeEvent
233+
public void render(RenderGameOverlayEvent rendergameoverlayevent) {
234+
if (rendergameoverlayevent.type.equals(ElementType.TEXT) && !Explicit.destructed) {
235+
this.uiRenderer.draw();
236+
Iterator iterator = this.mm.getModules().iterator();
237+
238+
while (iterator.hasNext()) {
239+
Module module = (Module) iterator.next();
240+
241+
if (module.isToggled() && Game.World() != null && Game.Player() != null) {
242+
module.onRender2D();
243+
}
244+
}
245+
246+
}
247+
}
248+
249+
@SubscribeEvent
250+
public void render3d(RenderWorldLastEvent renderworldlastevent) {
251+
if (!Explicit.destructed) {
252+
Iterator iterator = this.mm.getModules().iterator();
253+
254+
while (iterator.hasNext()) {
255+
Module module = (Module) iterator.next();
256+
257+
if (module.isToggled() && Game.World() != null && Game.Player() != null) {
258+
module.onRender3D();
259+
}
260+
}
261+
262+
}
263+
}
264+
265+
static {
266+
lllIIIIIl();
267+
lllIIIIII();
268+
NAME = Explicit.lIIIIIIl[5];
269+
MODID = Explicit.lIIIIIIl[6];
270+
VERSION = Explicit.lIIIIIIl[7];
271+
Explicit.destructed = false;
272+
Explicit.consolegui = false;
273+
}
274+
275+
private static void lllIIIIII() {
276+
lIIIIIIl = new String[8];
277+
Explicit.lIIIIIIl[0] = llIlllIlI(Explicit.lIIIIIll[0], Explicit.lIIIIIll[1]);
278+
Explicit.lIIIIIIl[1] = llIlllIll(Explicit.lIIIIIll[2], Explicit.lIIIIIll[3]);
279+
Explicit.lIIIIIIl[2] = llIlllIll(Explicit.lIIIIIll[4], Explicit.lIIIIIll[5]);
280+
Explicit.lIIIIIIl[3] = llIllllII(Explicit.lIIIIIll[6], Explicit.lIIIIIll[7]);
281+
Explicit.lIIIIIIl[4] = llIlllIll(Explicit.lIIIIIll[8], Explicit.lIIIIIll[9]);
282+
Explicit.lIIIIIIl[5] = llIllllII(Explicit.lIIIIIll[10], Explicit.lIIIIIll[11]);
283+
Explicit.lIIIIIIl[6] = llIlllIlI(Explicit.lIIIIIll[12], Explicit.lIIIIIll[13]);
284+
Explicit.lIIIIIIl[7] = llIlllIll(Explicit.lIIIIIll[14], Explicit.lIIIIIll[15]);
285+
Explicit.lIIIIIll = null;
286+
}
287+
288+
private static void lllIIIIIl() {
289+
String s = (new Exception()).getStackTrace()[0].getFileName();
290+
291+
Explicit.lIIIIIll = s.substring(s.indexOf("ä") + 1, s.lastIndexOf("ü")).split("ö");
292+
}
293+
294+
private static String llIlllIlI(String s, String s1) {
295+
try {
296+
SecretKeySpec secretkeyspec = new SecretKeySpec(MessageDigest.getInstance("MD5").digest(s1.getBytes(StandardCharsets.UTF_8)), "Blowfish");
297+
Cipher cipher = Cipher.getInstance("Blowfish");
298+
299+
cipher.init(2, secretkeyspec);
300+
return new String(cipher.doFinal(Base64.getDecoder().decode(s.getBytes(StandardCharsets.UTF_8))), StandardCharsets.UTF_8);
301+
} catch (Exception exception) {
302+
exception.printStackTrace();
303+
return null;
304+
}
305+
}
306+
307+
private static String llIlllIll(String s, String s1) {
308+
s = new String(Base64.getDecoder().decode(s.getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8);
309+
StringBuilder stringbuilder = new StringBuilder();
310+
char[] achar = s1.toCharArray();
311+
int i = 0;
312+
char[] achar1 = s.toCharArray();
313+
int j = achar1.length;
314+
315+
for (int k = 0; k < j; ++k) {
316+
char c0 = achar1[k];
317+
318+
stringbuilder.append((char) (c0 ^ achar[i % achar.length]));
319+
++i;
320+
}
321+
322+
return String.valueOf(stringbuilder);
323+
}
324+
325+
private static String llIllllII(String s, String s1) {
326+
try {
327+
SecretKeySpec secretkeyspec = new SecretKeySpec(Arrays.copyOf(MessageDigest.getInstance("MD5").digest(s1.getBytes(StandardCharsets.UTF_8)), 8), "DES");
328+
Cipher cipher = Cipher.getInstance("DES");
329+
330+
cipher.init(2, secretkeyspec);
331+
return new String(cipher.doFinal(Base64.getDecoder().decode(s.getBytes(StandardCharsets.UTF_8))), StandardCharsets.UTF_8);
332+
} catch (Exception exception) {
333+
exception.printStackTrace();
334+
return null;
335+
}
336+
}
337+
}

color/Chroma.java

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package me.explicit.color;
2+
3+
import java.awt.Color;
4+
import me.explicit.utils.TimerUtils;
5+
import net.minecraftforge.client.event.RenderGameOverlayEvent;
6+
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
7+
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
8+
9+
public class Chroma {
10+
11+
private TimerUtils timer = new TimerUtils();
12+
private int lastHue;
13+
14+
@SubscribeEvent
15+
public void render(RenderGameOverlayEvent rendergameoverlayevent) {
16+
if (rendergameoverlayevent.type.equals(ElementType.TEXT) && this.timer.hasReached(33.3333333333D)) {
17+
this.changeColor();
18+
this.timer.reset();
19+
}
20+
21+
}
22+
23+
public Color getColor(int i) {
24+
int j;
25+
26+
for (j = this.lastHue + i * 2; j > 1000; j -= 1000) {
27+
;
28+
}
29+
30+
return Color.getHSBColor((float) j / 1000.0F, 1.0F, 1.0F);
31+
}
32+
33+
private void changeColor() {
34+
this.lastHue += 5;
35+
if (this.lastHue > 1000) {
36+
this.lastHue = 0;
37+
}
38+
39+
}
40+
}

color/ColorManager.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package me.explicit.color;
2+
3+
import net.minecraftforge.common.MinecraftForge;
4+
5+
public class ColorManager {
6+
7+
public Chroma cc = new Chroma();
8+
9+
public ColorManager() {
10+
MinecraftForge.EVENT_BUS.register(this.cc);
11+
}
12+
}

0 commit comments

Comments
 (0)