Add Copyright, Add better HUD
This commit is contained in:
parent
bbedab9fec
commit
105794d197
108 changed files with 636 additions and 323 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
# Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
#
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx4G
|
org.gradle.jvmargs=-Xmx4G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
package com.baseband.client;
|
||||||
|
|
||||||
|
|
||||||
|
@ -6,22 +11,20 @@ import com.baseband.client.event.EventBus;
|
||||||
import com.baseband.client.event.FMLEventProcessor;
|
import com.baseband.client.event.FMLEventProcessor;
|
||||||
import com.baseband.client.module.Module;
|
import com.baseband.client.module.Module;
|
||||||
import com.baseband.client.module.modules.*;
|
import com.baseband.client.module.modules.*;
|
||||||
|
import de.tudbut.parsing.TCN;
|
||||||
|
import de.tudbut.tools.Lock;
|
||||||
import de.tudbut.tools.Registry;
|
import de.tudbut.tools.Registry;
|
||||||
import de.tudbut.tools.Tools;
|
import de.tudbut.tools.Tools;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.launchwrapper.Launch;
|
import net.minecraft.launchwrapper.Launch;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
|
||||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
import de.tudbut.parsing.TCN;
|
import org.lwjgl.opengl.Display;
|
||||||
import de.tudbut.tools.Lock;
|
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.lang.reflect.InvocationTargetException;
|
import java.lang.reflect.InvocationTargetException;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
@ -34,11 +37,11 @@ import java.util.function.Consumer;
|
||||||
|
|
||||||
public class BaseBand {
|
public class BaseBand {
|
||||||
public static int majorVersion = 1;
|
public static int majorVersion = 1;
|
||||||
public static int buildNumber = 485;
|
public static int buildNumber = 487;
|
||||||
public static String hash = "d8be0a150e9890d3";
|
public static String hash = "36c1edbaa0c2f6b3";
|
||||||
|
|
||||||
public static String name = "BaseBand";
|
public static String name = "BaseBand";
|
||||||
public long timeOfCompile = 1700145647026L;
|
public long timeOfCompile = 1700171942984L;
|
||||||
public CommandManager commandRegistry;
|
public CommandManager commandRegistry;
|
||||||
public EventBus eventBus;
|
public EventBus eventBus;
|
||||||
public ArrayList<Module> modules = new ArrayList<>();
|
public ArrayList<Module> modules = new ArrayList<>();
|
||||||
|
@ -140,6 +143,7 @@ public class BaseBand {
|
||||||
try {
|
try {
|
||||||
for (Module m : modules) {
|
for (Module m : modules) {
|
||||||
if(m.isEnabled()) {
|
if(m.isEnabled()) {
|
||||||
|
m.setEnabled(m.isEnabled());
|
||||||
MinecraftForge.EVENT_BUS.register(m);
|
MinecraftForge.EVENT_BUS.register(m);
|
||||||
eventBus.register(m);
|
eventBus.register(m);
|
||||||
}
|
}
|
||||||
|
@ -157,6 +161,7 @@ public class BaseBand {
|
||||||
}
|
}
|
||||||
}, "Config save thread").start();
|
}, "Config save thread").start();
|
||||||
|
|
||||||
|
Display.setTitle(getWatermark());
|
||||||
log.info("BaseBand Instantiated.");
|
log.info("BaseBand Instantiated.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
package com.baseband.client;
|
||||||
|
|
||||||
import com.baseband.client.module.Module;
|
import com.baseband.client.module.Module;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
package com.baseband.client;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
package com.baseband.client;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
package com.baseband.client;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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;
|
package com.baseband.client;
|
||||||
|
|
||||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.command;
|
package com.baseband.client.command;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.command;
|
package com.baseband.client.command;
|
||||||
|
|
||||||
import com.baseband.client.command.commands.*;
|
import com.baseband.client.command.commands.*;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.command.commands;
|
package com.baseband.client.command.commands;
|
||||||
|
|
||||||
import com.baseband.client.Utils;
|
import com.baseband.client.Utils;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.command.commands;
|
package com.baseband.client.command.commands;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.command.commands;
|
package com.baseband.client.command.commands;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.command.commands;
|
package com.baseband.client.command.commands;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.event;
|
package com.baseband.client.event;
|
||||||
|
|
||||||
public class CancellableEvent extends Event {
|
public class CancellableEvent extends Event {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.event;
|
package com.baseband.client.event;
|
||||||
|
|
||||||
public class Event {}
|
public class Event {}
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.event;
|
package com.baseband.client.event;
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.event;
|
package com.baseband.client.event;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.event;
|
package com.baseband.client.event;
|
||||||
|
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.event.events;
|
package com.baseband.client.event.events;
|
||||||
|
|
||||||
import com.baseband.client.event.CancellableEvent;
|
import com.baseband.client.event.CancellableEvent;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.event.events;
|
package com.baseband.client.event.events;
|
||||||
|
|
||||||
import com.baseband.client.event.CancellableEvent;
|
import com.baseband.client.event.CancellableEvent;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.event.events;
|
package com.baseband.client.event.events;
|
||||||
|
|
||||||
import com.baseband.client.event.Event;
|
import com.baseband.client.event.Event;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.guirewrite;
|
package com.baseband.client.guirewrite;
|
||||||
|
|
||||||
public abstract class Button {
|
public abstract class Button {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.guirewrite;
|
package com.baseband.client.guirewrite;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.guirewrite;
|
package com.baseband.client.guirewrite;
|
||||||
|
|
||||||
import com.baseband.client.module.Module;
|
import com.baseband.client.module.Module;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.guirewrite;
|
package com.baseband.client.guirewrite;
|
||||||
|
|
||||||
import com.baseband.client.setting.FloatMeta;
|
import com.baseband.client.setting.FloatMeta;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.mixins;
|
package com.baseband.client.mixins;
|
||||||
|
|
||||||
import net.minecraft.network.play.client.CPacketChatMessage;
|
import net.minecraft.network.play.client.CPacketChatMessage;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.mixins;
|
package com.baseband.client.mixins;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.mixins;
|
package com.baseband.client.mixins;
|
||||||
|
|
||||||
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
import net.minecraft.network.play.server.SPacketPlayerPosLook;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.mixins;
|
package com.baseband.client.mixins;
|
||||||
|
|
||||||
import com.baseband.client.event.events.MoveEvent;
|
import com.baseband.client.event.events.MoveEvent;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.mixins;
|
package com.baseband.client.mixins;
|
||||||
|
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventBus;
|
import net.minecraftforge.fml.common.eventhandler.EventBus;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.mixins;
|
package com.baseband.client.mixins;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.mixins;
|
package com.baseband.client.mixins;
|
||||||
|
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.mixins;
|
package com.baseband.client.mixins;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module;
|
package com.baseband.client.module;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
@ -63,6 +68,10 @@ public abstract class Module {
|
||||||
|
|
||||||
public void disable(){}
|
public void disable(){}
|
||||||
|
|
||||||
|
public String getHudMeta() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
public abstract String toString();
|
public abstract String toString();
|
||||||
|
|
||||||
public void toggle() {
|
public void toggle() {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.Restrict;
|
import com.baseband.client.Restrict;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.Restrict;
|
import com.baseband.client.Restrict;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.event.Subscribe;
|
import com.baseband.client.event.Subscribe;
|
||||||
|
@ -16,7 +21,7 @@ public class ElytraFly extends Module {
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void safeTick(SafeTickEvent e) {
|
public void safeTick(SafeTickEvent e) {
|
||||||
if(mc.player.rotationPitch < 10 || !mc.player.isElytraFlying()){
|
if(mc.player.rotationPitch < 10 || !mc.player.isElytraFlying() || !mc.player.isInWater() || !mc.player.isInLava()){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.event.Subscribe;
|
import com.baseband.client.event.Subscribe;
|
||||||
|
|
|
@ -1,34 +1,126 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.BaseBand;
|
import com.baseband.client.BaseBand;
|
||||||
import com.baseband.client.module.Module;
|
import com.baseband.client.module.Module;
|
||||||
|
import com.baseband.client.setting.Setting;
|
||||||
|
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.FontRenderer;
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
import java.text.CharacterIterator;
|
||||||
|
import java.text.StringCharacterIterator;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class HUD extends Module {
|
public class HUD extends Module {
|
||||||
|
|
||||||
|
@Setting("Watermark")
|
||||||
|
boolean watermark = true;
|
||||||
|
|
||||||
|
@Setting("FPS")
|
||||||
|
boolean fps = true;
|
||||||
|
|
||||||
|
@Setting("Modules")
|
||||||
|
boolean modules = true;
|
||||||
|
|
||||||
|
@Setting("Memory")
|
||||||
|
boolean memory = true;
|
||||||
|
|
||||||
|
@Setting("IP")
|
||||||
|
boolean ip = true;
|
||||||
|
|
||||||
|
@Setting("ServerBrand")
|
||||||
|
boolean brand = true;
|
||||||
|
|
||||||
|
@Setting("Sort")
|
||||||
|
boolean sorthud = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "HUD";
|
return "HUD";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean defaultEnabled() { return true; }
|
protected boolean defaultEnabled() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void text(RenderGameOverlayEvent.Text e) {
|
public void text(RenderGameOverlayEvent.Text e) {
|
||||||
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
|
||||||
fr.drawStringWithShadow(BaseBand.INSTANCE.getWatermark(), 2, 2, Color.WHITE.getRGB());
|
fr.drawStringWithShadow(BaseBand.INSTANCE.getWatermark(), 2, 2, Color.WHITE.getRGB());
|
||||||
int y = 2 + fr.FONT_HEIGHT;
|
ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft());
|
||||||
for (Module m : BaseBand.INSTANCE.modules) {
|
|
||||||
if(m.isEnabled()) {
|
|
||||||
fr.drawStringWithShadow(m.toString(), 2, y, Color.WHITE.getRGB());
|
int y = 2; //left side vertical offset
|
||||||
y = y + fr.FONT_HEIGHT;
|
int hy = 2; //right side vertical offset
|
||||||
|
|
||||||
|
if(watermark) {
|
||||||
|
fr.drawStringWithShadow(BaseBand.INSTANCE.getWatermark(), 2, 2, Color.WHITE.getRGB());
|
||||||
|
y += fr.FONT_HEIGHT;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Module[] v = BaseBand.INSTANCE.modules.stream()
|
||||||
|
.sorted(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth((value.getHudMeta().isEmpty()) ? value.toString() : value.getHudMeta() + ChatFormatting.GRAY + " " + value.getHudMeta()))) // I mean, it works?
|
||||||
|
.toArray(Module[]::new);
|
||||||
|
if(modules) {
|
||||||
|
for (Module mod : v) {
|
||||||
|
if (mod.isEnabled()) {
|
||||||
|
fr.drawStringWithShadow((mod.getHudMeta().isEmpty()) ? mod.toString() : mod.getHudMeta() + ChatFormatting.GRAY + " " + mod.getHudMeta(), 2, y, Color.WHITE.getRGB());
|
||||||
|
y += fr.FONT_HEIGHT;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ArrayList<String> hud = new ArrayList<>();
|
||||||
|
|
||||||
|
if(fps) {
|
||||||
|
hud.add("FPS: " + Minecraft.getDebugFPS());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(memory) {
|
||||||
|
hud.add("Memory: "+humanReadableByteCountSI(Runtime.getRuntime().freeMemory())+"/"+humanReadableByteCountSI(Runtime.getRuntime().maxMemory()));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(ip) {
|
||||||
|
hud.add("IP: "+(mc.isSingleplayer() ? "127.0.0.1" : Objects.requireNonNull(mc.getConnection().getNetworkManager().getRemoteAddress())));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(brand) {
|
||||||
|
String brand = (mc.isIntegratedServerRunning() ? "SinglePlayer" : (mc.player.getServerBrand() == null ? "null" : mc.player.getServerBrand()));
|
||||||
|
hud.add("ServerBrand: "+brand);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sorthud) {
|
||||||
|
hud.sort(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth(value)));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String s: hud) {
|
||||||
|
fr.drawStringWithShadow(s, sr.getScaledWidth() - fr.getStringWidth(s) - 2, hy, Color.WHITE.getRGB());
|
||||||
|
hy += fr.FONT_HEIGHT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String humanReadableByteCountSI(long bytes) {
|
||||||
|
if (-1000 < bytes && bytes < 1000) {
|
||||||
|
return bytes + " B";
|
||||||
|
}
|
||||||
|
CharacterIterator ci = new StringCharacterIterator("kMGTPE");
|
||||||
|
while (bytes <= -999_950 || bytes >= 999_950) {
|
||||||
|
bytes /= 1000;
|
||||||
|
ci.next();
|
||||||
|
}
|
||||||
|
return String.format("%.1f %cB", bytes / 1000.0, ci.current());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.module.Module;
|
import com.baseband.client.module.Module;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.event.Subscribe;
|
import com.baseband.client.event.Subscribe;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.Restrict;
|
import com.baseband.client.Restrict;
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.Restrict;
|
import com.baseband.client.Restrict;
|
||||||
import com.baseband.client.Utils;
|
|
||||||
import com.baseband.client.event.Subscribe;
|
import com.baseband.client.event.Subscribe;
|
||||||
import com.baseband.client.event.events.PacketEvent;
|
import com.baseband.client.event.events.PacketEvent;
|
||||||
import com.baseband.client.module.Module;
|
import com.baseband.client.module.Module;
|
||||||
|
@ -12,13 +16,16 @@ public class PacketTest extends Module {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "PacketTest";
|
return "PacketTest";
|
||||||
}
|
}
|
||||||
@Subscribe
|
|
||||||
public void handleEventA(PacketEvent.Read event) {
|
String packet = "";
|
||||||
Utils.sendChatMessage(event.getPacket().getClass().getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
public void handleEventB(PacketEvent.Write event) {
|
public void handleEvent(PacketEvent event) {
|
||||||
Utils.sendChatMessage(event.getPacket().getClass().getName());
|
packet = event.getPacket().getClass().getSimpleName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getHudMeta() {
|
||||||
|
return packet;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.MotionUtil;
|
import com.baseband.client.MotionUtil;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.module.modules;
|
package com.baseband.client.module.modules;
|
||||||
|
|
||||||
import com.baseband.client.Utils;
|
import com.baseband.client.Utils;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.setting;
|
package com.baseband.client.setting;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.setting;
|
package com.baseband.client.setting;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* 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.setting;
|
package com.baseband.client.setting;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.installer;
|
package org.baseband.installer;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.installer;
|
package org.baseband.installer;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.installer;
|
package org.baseband.installer;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.installer.util.minecraft;
|
package org.baseband.installer.util.minecraft;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
# Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
#
|
||||||
|
|
||||||
org.gradle.jvmargs=-Xmx4G
|
org.gradle.jvmargs=-Xmx4G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.io;
|
package de.tudbut.io;
|
||||||
|
|
||||||
import de.tudbut.tools.ReflectUtil;
|
import de.tudbut.tools.ReflectUtil;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.io;
|
package de.tudbut.io;
|
||||||
|
|
||||||
import de.tudbut.obj.CarrierException;
|
import de.tudbut.obj.CarrierException;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.obj;
|
package de.tudbut.obj;
|
||||||
|
|
||||||
public class CarrierException extends RuntimeException {
|
public class CarrierException extends RuntimeException {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.obj;
|
package de.tudbut.obj;
|
||||||
|
|
||||||
import de.tudbut.tools.ReflectUtil;
|
import de.tudbut.tools.ReflectUtil;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.obj;
|
package de.tudbut.obj;
|
||||||
|
|
||||||
import de.tudbut.tools.Retriever;
|
import de.tudbut.tools.Retriever;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.parsing;
|
package de.tudbut.parsing;
|
||||||
|
|
||||||
import de.tudbut.tools.Stack;
|
import de.tudbut.tools.Stack;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.parsing;
|
package de.tudbut.parsing;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.parsing;
|
package de.tudbut.parsing;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security;
|
package de.tudbut.security;
|
||||||
|
|
||||||
import de.tudbut.tools.ReflectUtil;
|
import de.tudbut.tools.ReflectUtil;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security;
|
package de.tudbut.security;
|
||||||
|
|
||||||
import de.tudbut.obj.DoubleTypedObject;
|
import de.tudbut.obj.DoubleTypedObject;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security;
|
package de.tudbut.security;
|
||||||
|
|
||||||
public class ExtendedStrictness implements Strictness {
|
public class ExtendedStrictness implements Strictness {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security;
|
package de.tudbut.security;
|
||||||
|
|
||||||
import de.tudbut.tools.ReflectUtil;
|
import de.tudbut.tools.ReflectUtil;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security;
|
package de.tudbut.security;
|
||||||
|
|
||||||
public interface Strictness extends Cloneable {
|
public interface Strictness extends Cloneable {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security;
|
package de.tudbut.security;
|
||||||
|
|
||||||
import de.tudbut.parsing.TCN;
|
import de.tudbut.parsing.TCN;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security.permissionmanager;
|
package de.tudbut.security.permissionmanager;
|
||||||
|
|
||||||
import de.tudbut.security.PermissionManager;
|
import de.tudbut.security.PermissionManager;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security.permissionmanager;
|
package de.tudbut.security.permissionmanager;
|
||||||
|
|
||||||
import de.tudbut.security.PermissionManager;
|
import de.tudbut.security.PermissionManager;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security.permissionmanager;
|
package de.tudbut.security.permissionmanager;
|
||||||
|
|
||||||
import de.tudbut.security.PermissionManager;
|
import de.tudbut.security.PermissionManager;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security.permissionmanager;
|
package de.tudbut.security.permissionmanager;
|
||||||
|
|
||||||
import de.tudbut.security.PermissionManager;
|
import de.tudbut.security.PermissionManager;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security.permissionmanager;
|
package de.tudbut.security.permissionmanager;
|
||||||
|
|
||||||
import de.tudbut.security.PermissionManager;
|
import de.tudbut.security.PermissionManager;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.security.permissionmanager;
|
package de.tudbut.security.permissionmanager;
|
||||||
|
|
||||||
import de.tudbut.security.PermissionManager;
|
import de.tudbut.security.PermissionManager;
|
||||||
|
|
|
@ -1,162 +1,16 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
import javax.script.ScriptEngine;
|
import java.security.SecureRandom;
|
||||||
import javax.script.ScriptEngineManager;
|
|
||||||
import javax.script.ScriptException;
|
|
||||||
|
|
||||||
public class ExtendedMath {
|
public class ExtendedMath {
|
||||||
public static long[] solveSimple(String eq, char toSolveChar, int maxResults) throws InterruptedException {
|
|
||||||
eq = eq.replaceAll("=", "==").replaceAll("======", "==").replaceAll("====", "==");
|
|
||||||
|
|
||||||
|
static SecureRandom RANDOM = new SecureRandom();
|
||||||
|
|
||||||
final boolean[] stop = {false};
|
|
||||||
final long[] result = new long[maxResults];
|
|
||||||
final char[] current = {0};
|
|
||||||
|
|
||||||
String finalEq = eq;
|
|
||||||
new Thread(() -> {
|
|
||||||
ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js");
|
|
||||||
for (long i = -1; i > Long.MIN_VALUE; i--) {
|
|
||||||
if (stop[0])
|
|
||||||
break;
|
|
||||||
try {
|
|
||||||
if (engine.eval("(" + finalEq.replaceAll(String.valueOf(toSolveChar), "(" + i + ")") + ")").equals(true)) {
|
|
||||||
if (current[0] == result.length)
|
|
||||||
stop[0] = true;
|
|
||||||
else {
|
|
||||||
result[current[0]] = i;
|
|
||||||
current[0]++;
|
|
||||||
if (current[0] == result.length)
|
|
||||||
stop[0] = true;
|
|
||||||
}
|
|
||||||
if (stop[0])
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (ScriptException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
String finalEq1 = eq;
|
|
||||||
new Thread(() -> {
|
|
||||||
ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js");
|
|
||||||
for (long i = 0; i < Long.MAX_VALUE; i++) {
|
|
||||||
if (stop[0])
|
|
||||||
break;
|
|
||||||
try {
|
|
||||||
if (engine.eval("(" + finalEq1.replaceAll(String.valueOf(toSolveChar), "(" + i + ")") + ")").equals(true)) {
|
|
||||||
if (current[0] == result.length)
|
|
||||||
stop[0] = true;
|
|
||||||
else {
|
|
||||||
result[current[0]] = i;
|
|
||||||
current[0]++;
|
|
||||||
if (current[0] == result.length)
|
|
||||||
stop[0] = true;
|
|
||||||
}
|
|
||||||
if (stop[0])
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (ScriptException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
|
|
||||||
while (!stop[0]) {
|
|
||||||
Thread.sleep(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long solveSimple(String eq, char toSolveChar) throws InterruptedException {
|
|
||||||
return solveSimple(eq, toSolveChar, 1)[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double[] solveDouble(String eq, char toSolveChar, int precision, int maxResults) throws InterruptedException {
|
|
||||||
eq = eq.replaceAll("=", "==").replaceAll("======", "==").replaceAll("====", "==");
|
|
||||||
|
|
||||||
|
|
||||||
final boolean[] stop = {false};
|
|
||||||
final double[] result = new double[maxResults];
|
|
||||||
final char[] current = {0};
|
|
||||||
|
|
||||||
String finalEq = eq;
|
|
||||||
new Thread(() -> {
|
|
||||||
ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js");
|
|
||||||
for (long i = -1; i > Long.MIN_VALUE; i--) {
|
|
||||||
if (stop[0])
|
|
||||||
break;
|
|
||||||
try {
|
|
||||||
if (engine.eval(finalEq.replaceAll(String.valueOf(toSolveChar), "(" + (double) i / (double) precision + ")")).equals(true)) {
|
|
||||||
if (current[0] == result.length)
|
|
||||||
stop[0] = true;
|
|
||||||
else {
|
|
||||||
result[current[0]] = (double) i / (double) precision;
|
|
||||||
current[0]++;
|
|
||||||
if (current[0] == result.length)
|
|
||||||
stop[0] = true;
|
|
||||||
}
|
|
||||||
if (stop[0])
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (ScriptException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
String finalEq1 = eq;
|
|
||||||
new Thread(() -> {
|
|
||||||
ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js");
|
|
||||||
for (long i = 0; i < Long.MAX_VALUE; i++) {
|
|
||||||
if (stop[0])
|
|
||||||
break;
|
|
||||||
try {
|
|
||||||
if (engine.eval(finalEq1.replaceAll(String.valueOf(toSolveChar), "(" + (double) i / (double) precision + ")")).equals(true)) {
|
|
||||||
if (current[0] == result.length)
|
|
||||||
stop[0] = true;
|
|
||||||
else {
|
|
||||||
result[current[0]] = (double) i / (double) precision;
|
|
||||||
current[0]++;
|
|
||||||
if (current[0] == result.length)
|
|
||||||
stop[0] = true;
|
|
||||||
}
|
|
||||||
if (stop[0])
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (ScriptException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
|
|
||||||
while (!stop[0]) {
|
|
||||||
Thread.sleep(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public static double solveDouble(String eq, char toSolveChar, int precision) throws InterruptedException {
|
|
||||||
return solveDouble(eq, toSolveChar, precision, 1)[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double solveDouble(String eq, char toSolveChar) throws InterruptedException {
|
|
||||||
return solveDouble(eq, toSolveChar, 100, 1)[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double[] solveDouble(String eq, char toSolveChar, long maxResults) throws InterruptedException {
|
|
||||||
return solveDouble(eq, toSolveChar, 100, (int) maxResults);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int random(int lower, int upper) {
|
public static int random(int lower, int upper) {
|
||||||
return (int) randomLong(lower, upper);
|
return (int) randomLong(lower, upper);
|
||||||
|
@ -164,92 +18,6 @@ public class ExtendedMath {
|
||||||
|
|
||||||
public static long randomLong(long lower, long upper) {
|
public static long randomLong(long lower, long upper) {
|
||||||
upper ++;
|
upper ++;
|
||||||
return (long) (Math.floor(Math.random() * (upper - lower)) + lower);
|
return (long) (Math.floor(RANDOM.nextFloat() * (upper - lower)) + lower);
|
||||||
}
|
|
||||||
|
|
||||||
public static float randomFloat(float lower, float upper, int precision) {
|
|
||||||
return (float) randomLong((int) (lower * (precision)), (int) (upper * (precision))) / (precision);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double min(double... doubles) {
|
|
||||||
double currentMin = doubles[0];
|
|
||||||
|
|
||||||
for (int i = 1; i < doubles.length; i++) {
|
|
||||||
currentMin = Math.min(currentMin, doubles[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return currentMin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int min(int... ints) {
|
|
||||||
int currentMin = ints[0];
|
|
||||||
|
|
||||||
for (int i = 1; i < ints.length; i++) {
|
|
||||||
currentMin = Math.min(currentMin, ints[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return currentMin;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double max(double... doubles) {
|
|
||||||
double currentMax = doubles[0];
|
|
||||||
|
|
||||||
for (int i = 1; i < doubles.length; i++) {
|
|
||||||
currentMax = Math.max(currentMax, doubles[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return currentMax;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int max(int... ints) {
|
|
||||||
int currentMax = ints[0];
|
|
||||||
|
|
||||||
for (int i = 1; i < ints.length; i++) {
|
|
||||||
currentMax = Math.max(currentMax, ints[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return currentMax;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double highestMinusLowest(double d1, double d2) {
|
|
||||||
if (d1 > d2) {
|
|
||||||
return d1 - d2;
|
|
||||||
}
|
|
||||||
if (d2 > d1) {
|
|
||||||
return d2 - d1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int highestMinusLowest(int i1, int i2) {
|
|
||||||
if (i1 > i2) {
|
|
||||||
return i1 - i2;
|
|
||||||
}
|
|
||||||
if (i2 > i1) {
|
|
||||||
return i2 - i1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static <T> T[] flipArray(T[] array) {
|
|
||||||
T[] oldArray = array.clone();
|
|
||||||
|
|
||||||
for (int i = 0; i < array.length; i++) {
|
|
||||||
array[-i + array.length - 1] = oldArray[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static double removeSign(double d) {
|
|
||||||
return d < 0 ? -d : d;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static long fastRound(double d) {
|
|
||||||
return d - (long) d < 0.5 ? (long) d : (long) d + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static int fastIntRound(double d) {
|
|
||||||
return d - (int) d < 0.5 ? (int) d : (int) d + 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
import com.sun.org.apache.xpath.internal.operations.Mod;
|
import com.sun.org.apache.xpath.internal.operations.Mod;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
import de.tudbut.io.StreamReader;
|
import de.tudbut.io.StreamReader;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
public interface Retriever<T> {
|
public interface Retriever<T> {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
public class Stack<T> extends Queue<T> {
|
public class Stack<T> extends Queue<T> {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
public class StringTools {
|
public class StringTools {
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package de.tudbut.tools;
|
package de.tudbut.tools;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.dumpy;
|
package org.baseband.dumpy;
|
||||||
|
|
||||||
/*import de.tudbut.tools.ReflectUtil;
|
/*import de.tudbut.tools.ReflectUtil;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -18,10 +17,7 @@ import de.tudbut.tools.StringTools;
|
||||||
import de.tudbut.tools.Tools;
|
import de.tudbut.tools.Tools;
|
||||||
import org.baseband.launcher.Tweaker;
|
import org.baseband.launcher.Tweaker;
|
||||||
import org.baseband.launcher.classloader.CustomClassloader;
|
import org.baseband.launcher.classloader.CustomClassloader;
|
||||||
import org.baseband.launcher.util.BBPermissionManager;
|
import org.baseband.launcher.util.*;
|
||||||
import org.baseband.launcher.util.BaseBandSecurityManager;
|
|
||||||
import org.baseband.launcher.util.DynamicPermissionManager;
|
|
||||||
import org.baseband.launcher.util.Key;
|
|
||||||
import sun.misc.Unsafe;
|
import sun.misc.Unsafe;
|
||||||
|
|
||||||
import javax.crypto.Cipher;
|
import javax.crypto.Cipher;
|
||||||
|
@ -58,7 +54,6 @@ public class Loader {
|
||||||
permissionManager = init2();
|
permissionManager = init2();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static Strictness init1() {
|
private static Strictness init1() {
|
||||||
AccessKiller.ensureKills();
|
AccessKiller.ensureKills();
|
||||||
AccessKiller.killFieldAccess(Loader.class); //nah this should work right???
|
AccessKiller.killFieldAccess(Loader.class); //nah this should work right???
|
||||||
|
@ -387,6 +382,18 @@ public class Loader {
|
||||||
.filter(input -> BAD_INPUT_FLAGS.stream().anyMatch(input::contains))
|
.filter(input -> BAD_INPUT_FLAGS.stream().anyMatch(input::contains))
|
||||||
.findFirst();
|
.findFirst();
|
||||||
|
|
||||||
|
|
||||||
|
Optional<String> hasDisableFlag = ManagementFactory.getRuntimeMXBean().getInputArguments().stream()
|
||||||
|
.filter(input -> input.equals("-XX:+DisableAttachMechanism"))
|
||||||
|
.findFirst();
|
||||||
|
|
||||||
|
if(!hasDisableFlag.isPresent()) {
|
||||||
|
Tweaker.log.fatal("JVM does not have disable attach mechanism argument");
|
||||||
|
Tweaker.log.fatal("Please add -XX:+DisableAttachMechanism to your JVM args");
|
||||||
|
Loader.exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (inputFlag.isPresent()) {
|
if (inputFlag.isPresent()) {
|
||||||
return "Bad JVM flag "+Base64.getEncoder().encodeToString(ManagementFactory.getRuntimeMXBean().getInputArguments().toString().getBytes());
|
return "Bad JVM flag "+Base64.getEncoder().encodeToString(ManagementFactory.getRuntimeMXBean().getInputArguments().toString().getBytes());
|
||||||
}
|
}
|
||||||
|
@ -442,7 +449,7 @@ public class Loader {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static Unsafe getUnsafe() {
|
public static Unsafe getUnsafe() {
|
||||||
try {
|
try {
|
||||||
Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe");
|
Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe");
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.launcher.tweaker;
|
package org.baseband.launcher.tweaker;
|
||||||
|
|
||||||
import net.minecraftforge.fml.common.asm.transformers.AccessTransformer;
|
import net.minecraftforge.fml.common.asm.transformers.AccessTransformer;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.launcher.util;
|
package org.baseband.launcher.util;
|
||||||
|
|
||||||
import de.tudbut.security.DataKeeper;
|
import de.tudbut.security.DataKeeper;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.launcher.util;
|
package org.baseband.launcher.util;
|
||||||
|
|
||||||
import de.tudbut.security.PermissionManager;
|
import de.tudbut.security.PermissionManager;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
*
|
|
||||||
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved.
|
||||||
|
* Unauthorized copying of this file via any medium is Strictly Prohibited.
|
||||||
|
*/
|
||||||
|
|
||||||
package org.baseband.launcher.util;
|
package org.baseband.launcher.util;
|
||||||
|
|
||||||
import de.tudbut.security.Strictness;
|
import de.tudbut.security.Strictness;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue