MCP-Reborn icon indicating copy to clipboard operation
MCP-Reborn copied to clipboard

Hot Swapping

Open Grayseon opened this issue 3 years ago • 8 comments

I'm loving this tool a lot! But, when I make a change I have to restart Minecraft every time. Is there a way I can enable hot swapping so I don't have to restart it? IDE: Intellij IDEA

Thank you!

Grayseon avatar Nov 04 '21 02:11 Grayseon

No, that would require editing the jar file as you are playing and that would be next to impossible.

jacobo-mc avatar Nov 04 '21 17:11 jacobo-mc

That is possible watch the video for how to do it

Hexeption avatar Nov 04 '21 20:11 Hexeption

https://www.youtube.com/watch?v=ocz1tPI_YSE

Hexeption avatar Nov 04 '21 20:11 Hexeption

Hi, thank you for the replies, but when I follow that video the game crashes. Here is the crash report:


---- Minecraft Crash Report ---- // Why is it breaking :(

Time: 11/4/21, 4:20 PM Description: Initializing game

java.lang.ExceptionInInitializerError at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1842) at net.minecraft.client.MainWindow.(MainWindow.java:89) at net.minecraft.client.renderer.VirtualScreen.create(VirtualScreen.java:21) at net.minecraft.client.Minecraft.(Minecraft.java:418) at net.minecraft.client.main.Main.main(Main.java:149) at mcp.client.Start.main(Start.java:17) Caused by: java.lang.IllegalStateException: GLFW windows may only be created on the main thread and that thread must be the first thread in the process. Please run the JVM with -XstartOnFirstThread. For offscreen rendering, make sure another window toolkit (e.g. AWT or JavaFX) is initialized before GLFW. at org.lwjgl.glfw.EventLoop$OffScreen.(EventLoop.java:39) ... 6 more

A detailed walkthrough of the error, its code path and all known details is as follows:

-- Head -- Thread: Render thread Stacktrace: at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1842) at net.minecraft.client.MainWindow.(MainWindow.java:89) at net.minecraft.client.renderer.VirtualScreen.create(VirtualScreen.java:21) at net.minecraft.client.Minecraft.(Minecraft.java:418)

-- Initialization -- Details: Stacktrace: at net.minecraft.client.main.Main.main(Main.java:149) at mcp.client.Start.main(Start.java:17)

-- System Details -- Details: Minecraft Version: 1.16.5 Minecraft Version ID: 1.16.5 Operating System: Mac OS X (x86_64) version 11.5 Java Version: 16.0.1, AdoptOpenJDK Java VM Version: OpenJDK 64-Bit Server VM (mixed mode, sharing), AdoptOpenJDK Memory: 152307344 bytes (145 MB) / 649068544 bytes (619 MB) up to 2147483648 bytes (2048 MB) CPUs: 4 JVM Flags: 0 total; Launched Version: mcp Backend library: LWJGL version 3.2.1 build 12 Backend API: NO CONTEXT GL Caps: Using VBOs: Yes Is Modded: Very likely; Jar signature invalidated Type: Client (map_client.txt) CPU:

I also try -XstartOnFirstThread argument, but it is still erroring.

Grayseon avatar Nov 04 '21 21:11 Grayseon

I am so dumb... I was putting -XstartOnFirstThread in the program arguments, and not the VM arguments. What is the shortcut to hot swapping? I looked it up but couldn't find anything that works. Thank you!

(I am a beginner, as you can probably tell, sorry I am so bad at this!)

Grayseon avatar Nov 04 '21 22:11 Grayseon

ctrl+f9

gersomonline avatar Dec 08 '21 19:12 gersomonline

I am so dumb... I was putting -XstartOnFirstThread in the program arguments, and not the VM arguments. What is the shortcut to hot swapping? I looked it up but couldn't find anything that works. Thank you!

(I am a beginner, as you can probably tell, sorry I am so bad at this!)

Is this resolved? Could you close the issue?

josephworks avatar Aug 19 '22 03:08 josephworks

@Hexeption The video you linked is now private, and i cant figure out how to make hot swap working

MrTheShy avatar Sep 02 '22 22:09 MrTheShy

Thanks!

josephworks avatar Jul 16 '23 05:07 josephworks