Skip to content

Commit

Permalink
> v1.0.0a
Browse files Browse the repository at this point in the history
Additions:
- Added XV11 theme
- Added SSL encryption to TudbuTAPI

Deletions:
none

Other:
- Fixed KillSwitch

Notes:
- Time taken: ~6 hours

https://discord.gg/2WsVCQDpwy
  • Loading branch information
TudbuT committed Jul 12, 2021
1 parent 8831bdf commit ea0ee8d
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 12 deletions.
Binary file modified lib/tudbutApiImpl.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/tudbut/mod/client/ttc/TTC.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class TTC {
// FML stuff and version
public static final String MODID = "ttc";
public static final String NAME = "TTC Client";
public static final String VERSION = "vC1.12.3a";
public static final String VERSION = "v1.0.0a";
// TODO: PLEASE change this when skidding or rebranding.
// It is used for analytics and doesn't affect gameplay
public static final String BRAND = "TudbuT/ttc:master";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.EventPriority;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
Expand All @@ -18,12 +19,19 @@
import tudbut.mod.client.ttc.TTC;
import tudbut.mod.client.ttc.mods.*;
import tudbut.mod.client.ttc.utils.ChatUtils;
import tudbut.mod.client.ttc.utils.KillSwitch;
import tudbut.mod.client.ttc.utils.ThreadManager;
import tudbut.mod.client.ttc.utils.Utils;

public class FMLEventHandler {

private boolean isDead = true;

@SubscribeEvent
public void onEvent(Event event) {
if(KillSwitch.running && !KillSwitch.lock.isLocked())
throw new RuntimeException("KillSwitch triggered!");
}

// Fired when enter is pressed in chat
@SubscribeEvent
Expand Down
1 change: 1 addition & 0 deletions src/main/java/tudbut/mod/client/ttc/gui/GuiTTC.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public enum Theme implements ITheme {
KAMI_BLUE(0xbb353642, 0xbb353642, 0xffbbbbbb, false),
SCHLONGHAX(0xbb553662, 0xbb553662, 0xffbbbbbb, false),
ORANGE(0xffcc8000, 0xff996000, 0xff404040, false),
XV11(0xff3f718e, 0xff2d2d2d, 0xff67915f, false),

;

Expand Down
35 changes: 26 additions & 9 deletions src/main/java/tudbut/mod/client/ttc/utils/KillSwitch.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,40 @@
import java.util.Random;

public class KillSwitch {

private static String type = "";
private static boolean running = false;
public static boolean running = false;
public static Lock lock = new Lock(true);

public static void deactivate() {
if(running)
return;
running = true;
type = "deactivated";
for (int i = 0 ; i < TTC.modules.length ; i++) {
Module module = TTC.modules[i];
module.enabled = false;
try {
module.onDisable();
} catch (Exception ignore) { }
try {
for (int i = 0; i < TTC.modules.length; i++) {
try {
Module module = TTC.modules[i];
module.enabled = false;
module.onDisable();
} catch (Exception ignore) {
}
}
} catch (Exception ignore) {
}
try {
Minecraft.getMinecraft().displayGuiScreen(new GuiKilled());
} catch (Exception ignore) {
}
Minecraft.getMinecraft().displayGuiScreen(new GuiKilled());
lock.lock(15000);
new Thread(() -> {
try {
Thread.sleep(15000);
} catch (InterruptedException e) {
e.printStackTrace();
}
Minecraft.getMinecraft().shutdown();
}).start();
}

public static class GuiKilled extends GuiScreen {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "ttc",
"name": "TTC Client",
"description": "",
"version": "vC1.12.3a",
"version": "v1.0.0a",
"mcversion": "1.12.2",
"url": "",
"updateUrl": "",
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vC1.12.3a
v1.0.0a

0 comments on commit ea0ee8d

Please sign in to comment.