Bump to 1.19.4 and add "Hang" crash
This commit is contained in:
parent
2a20216d32
commit
d9bdd56c6b
|
@ -19,6 +19,7 @@ The values are explained in more detail below
|
|||
- Unsafe_Windows_WinAPI: Do some JNI-magic to instantly produce a blue-screen on windows
|
||||
- Unsafe_Universal_OOM: Causes an OOM exception
|
||||
- Broken_Universal_ExitCode: Exit the integrated Server. The game still displays, but you can no longer interact with the world or quit.
|
||||
- Safe_Universal_Hang: Hang both the client and integrated server thread.
|
||||
- Safe_Universal_Exception: Performs an invalid operation. Behaves like every other crash and just closes the game, leaving a crash log.
|
||||
- SemiUnsafe_Universal_Exception: Throws a security exceptions. This does not work properly for 1.16.2
|
||||
- SemiUnsafe_Universal_Shutdown: Attempts to run a shutdown command. Since these are specific to some systems this might not always work.
|
||||
|
|
|
@ -19,7 +19,7 @@ dependencies {
|
|||
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-devutil:${prop("libjf_version")}")
|
||||
modLocalRuntime("io.gitlab.jfronny.libjf:libjf-config-ui-tiny-v1:${prop("libjf_version")}")
|
||||
modLocalRuntime("net.fabricmc.fabric-api:fabric-api:${prop("fabric_version")}")
|
||||
modLocalRuntime("com.terraformersmc:modmenu:5.0.2")
|
||||
modLocalRuntime("com.terraformersmc:modmenu:6.1.0-rc.1")
|
||||
}
|
||||
|
||||
loom {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# https://fabricmc.net/develop/
|
||||
minecraft_version=1.19.3
|
||||
yarn_mappings=build.5
|
||||
loader_version=0.14.12
|
||||
minecraft_version=1.19.4
|
||||
yarn_mappings=build.1
|
||||
loader_version=0.14.17
|
||||
|
||||
maven_group=io.gitlab.jfronny
|
||||
archives_base_name=breakme
|
||||
|
@ -13,5 +13,5 @@ curseforge_id=400842
|
|||
curseforge_required_dependencies=libjf
|
||||
curseforge_optional_dependencies=modmenu
|
||||
|
||||
fabric_version=0.70.0+1.19.3
|
||||
libjf_version=3.4.1
|
||||
fabric_version=0.75.3+1.19.4
|
||||
libjf_version=3.6.0
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
package io.gitlab.jfronny.breakme.client;
|
||||
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.util.thread.ThreadExecutor;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
public class ClientImpl implements Client {
|
||||
@Override
|
||||
public ThreadExecutor<Runnable> getRunner() {
|
||||
return Objects.requireNonNull(MinecraftClient.getInstance());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package io.gitlab.jfronny.breakme.client;
|
||||
|
||||
import io.gitlab.jfronny.commons.throwable.Try;
|
||||
import net.minecraft.util.thread.ThreadExecutor;
|
||||
|
||||
public interface Client {
|
||||
Client INSTANCE = (Client) Try.orThrow(() -> Class.forName(Client.class.getName() + "Impl").getConstructor().newInstance());
|
||||
|
||||
ThreadExecutor<Runnable> getRunner();
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package io.gitlab.jfronny.breakme.crash.safe;
|
||||
|
||||
import io.gitlab.jfronny.breakme.client.Client;
|
||||
import io.gitlab.jfronny.breakme.crash.CrashProvider;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
public class HangProvider implements CrashProvider {
|
||||
@Override
|
||||
public void crash() throws Exception {
|
||||
if (FabricLoader.getInstance().getEnvironmentType() == EnvType.CLIENT) {
|
||||
Client.INSTANCE.getRunner().send(this::hang);
|
||||
}
|
||||
hang();
|
||||
}
|
||||
|
||||
private void hang() {
|
||||
while (true) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,6 +10,7 @@
|
|||
"breakme.jfconfig.enum.Method.tooltip": "The method used to perform the crash",
|
||||
"breakme.jfconfig.enum.Method.Exception": "Safe_Universal_Exception",
|
||||
"breakme.jfconfig.enum.Method.ExitCode": "Broken_Universal_ExitCode",
|
||||
"breakme.jfconfig.enum.Method.Hang": "Safe_Universal_Hang",
|
||||
"breakme.jfconfig.enum.Method.SecurityException": "SemiUnsafe_Universal_Exception",
|
||||
"breakme.jfconfig.enum.Method.Segfault": "SemiUnsafe_Universal_Segfault",
|
||||
"breakme.jfconfig.enum.Method.StackOverflow": "SemiUnsafe_Universal_StackOverflow",
|
||||
|
|
Loading…
Reference in New Issue