Something i guess
This commit is contained in:
parent
481c5cd2f9
commit
42685815c2
7 changed files with 9 additions and 55 deletions
|
@ -16,8 +16,8 @@ import java.util.ArrayList;
|
|||
|
||||
public class BaseBand {
|
||||
public static int majorVersion = 1;
|
||||
public static int buildNumber = 2;
|
||||
public static String hash = "02c5b7cb8283c217";
|
||||
public static int buildNumber = 3;
|
||||
public static String hash = "775f55b8c02f8a4e";
|
||||
|
||||
public static String name = "BaseBand";
|
||||
public long timeOfCompile = 1694681365260L;
|
||||
|
|
|
@ -114,7 +114,7 @@ public class GuiBB extends GuiScreen {
|
|||
// Minecraft is stupid and sometimes forgets to call initScreen, so this is needed
|
||||
while (buttons == null) {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -123,9 +123,9 @@ public class GuiBB extends GuiScreen {
|
|||
resetButtons();
|
||||
}
|
||||
// Call onTick on every button
|
||||
for (int i = 0; i < buttons.length; i++) {
|
||||
if (buttons[i] != null)
|
||||
buttons[i].onTick(this);
|
||||
for (Button button : buttons) {
|
||||
if (button != null)
|
||||
button.onTick(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,21 +136,11 @@ public class GuiBB extends GuiScreen {
|
|||
int x = j / 15;
|
||||
int y = j - x * 15;
|
||||
|
||||
// Don't add the button if it isn't requested
|
||||
//if (!BaseBand.INSTANCE.modules.get(i).displayOnClickGUI())
|
||||
// continue;
|
||||
|
||||
// Create the button
|
||||
int r = i;
|
||||
Button b = new Button(
|
||||
10 + (155 * x), 10 + (y * 25), BaseBand.INSTANCE.modules.get(i).toString() + ": " + BaseBand.INSTANCE.modules.get(i).isEnabled(),
|
||||
(text) -> {
|
||||
//if (TTC.modules[r].enabled = !TTC.modules[r].enabled)
|
||||
// TTC.modules[r].onEnable();
|
||||
//else
|
||||
// TTC.modules[r].onDisable();
|
||||
|
||||
}, BaseBand.INSTANCE.modules.get(i)
|
||||
(text) -> {}, BaseBand.INSTANCE.modules.get(i)
|
||||
);
|
||||
buttons[i] = b;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ public class HUD extends Module {
|
|||
public String toString() {
|
||||
return "HUD";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean defaultEnabled() { return true; }
|
||||
|
||||
|
|
|
@ -15,7 +15,6 @@ import java.util.Objects;
|
|||
|
||||
public class CustomClassloader extends ClassLoader {
|
||||
public CustomClassloader INSTANCE;
|
||||
|
||||
private static byte[] cryptClasses;
|
||||
static URL url;
|
||||
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
package org.baseband.launcher.util;
|
||||
|
||||
import javax.crypto.*;
|
||||
import java.security.*;
|
||||
|
||||
public class EncryptionUtil {
|
||||
private Object secretKey;
|
||||
|
||||
public EncryptionUtil() {
|
||||
init();
|
||||
}
|
||||
|
||||
public void init(){
|
||||
try {
|
||||
// Generate a secret key using AES algorithm
|
||||
KeyGenerator keyGen = KeyGenerator.getInstance("AES");
|
||||
SecureRandom random = new SecureRandom();
|
||||
keyGen.init(random);
|
||||
this.secretKey = keyGen.generateKey();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public byte[] encrypt(byte[] data) throws Exception {
|
||||
Cipher cipher = Cipher.getInstance("AES");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, (SecretKey) secretKey);
|
||||
return cipher.doFinal(data);
|
||||
}
|
||||
|
||||
public byte[] decrypt(byte[] data) throws Exception {
|
||||
Cipher cipher = Cipher.getInstance("AES");
|
||||
cipher.init(Cipher.DECRYPT_MODE, (SecretKey) secretKey);
|
||||
return cipher.doFinal(data);
|
||||
}
|
||||
}
|
|
@ -11,7 +11,6 @@ public class Key {
|
|||
protected final String string;
|
||||
|
||||
private boolean debug = false;
|
||||
EncryptionUtil encryptionUtil = new EncryptionUtil();
|
||||
|
||||
|
||||
public Key() {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# BaseBand
|
||||
|
||||
it's.... NEW! *MS-DOS 5 promotional music begins*
|
||||
Jesus christ almighty Jess you have to rewrite it already
|
||||
|
||||
##### Normal launcher
|
||||
- Just run the installer...
|
||||
|
|
Loading…
Add table
Reference in a new issue