From dce34876750ccc075f0312e3d0a9cea6f2f92fb5 Mon Sep 17 00:00:00 2001 From: Jess Date: Thu, 5 Oct 2023 07:29:13 +0100 Subject: [PATCH] end me --- .gitignore | 2 +- .../java/com/baseband/client/ASyncRunner.java | 38 +++++++++++++++++++ .../main/java/com/baseband/client/Utils.java | 2 + 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Client/src/main/java/com/baseband/client/ASyncRunner.java diff --git a/.gitignore b/.gitignore index 2186283..3f14a0f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ /build/ /obf/ /Obf/ - +/new-obf/ .classpath .project .settings/ diff --git a/Client/src/main/java/com/baseband/client/ASyncRunner.java b/Client/src/main/java/com/baseband/client/ASyncRunner.java new file mode 100644 index 0000000..1b5b898 --- /dev/null +++ b/Client/src/main/java/com/baseband/client/ASyncRunner.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + +package com.baseband.client; + +//JessSystemV +//7:28 AM, 2023-10-05 +//God fucking help me + +/* + ASyncRunner aSyncRunner = new ASyncRunner(() -> { + //Do big complicated thing that we can't have on tick methods *or* render methods + //Fill CopyOnWriteArrayList with Valid Holes grabbed from world for example + //but this would be instantiated in the class not method + }); + + @Subscribe + public void tick(SafeTickEvent e) { + aSyncRunner.run(); //run this on every tick + } + */ +public class ASyncRunner { + private final Thread thread; + + public ASyncRunner(Runnable runnable) { + this.thread = new Thread(runnable); + } + + + public void run() { + if(!thread.isAlive()) { + thread.start(); + } + } +} diff --git a/Client/src/main/java/com/baseband/client/Utils.java b/Client/src/main/java/com/baseband/client/Utils.java index c478c9e..511616e 100644 --- a/Client/src/main/java/com/baseband/client/Utils.java +++ b/Client/src/main/java/com/baseband/client/Utils.java @@ -31,6 +31,8 @@ public class Utils { } + + public static void check() { //Check if user is banned String[] strings = new String[]{