Hexeption / MCP-Reborn

MCP-Reborn is an MCP (Mod Coder Pack) for Minecraft for making modded clients and researching its code. (1.13-1.20.1)
Other
1.01k stars 134 forks source link

Question: How to run server from build? #230

Open JoeTheOrangeCat opened 1 year ago

JoeTheOrangeCat commented 1 year ago

Is there a way to run a Minecraft server after you built the version or do you need to build as a server instead? I've tried running a server using other server.bats,

@echo off java -Xms2G -Xmx6G -jar test.jar -nogui pause

but It didn't work, so I looked to see if this question was already answered. I found this.

java -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -cp Minecraft.jar net.minecraft.server.Main --accessToken PlayerDev --version 1.16.1

So I change 1.16.1 to 1.19.2, and changed Minecraft.jar to test.jar which was the name of it. I got this error:

Error: Unable to initialize main class net.minecraft.server.Main Caused by: java.lang.NoClassDefFoundError: joptsimple/OptionSpec

I also tried remove some parameters and that didn't work either.

What should I do?

michaelklann commented 1 year ago

I can't make a repackaged server.jar work either. I tried to compare to a vanilla 1.19.4 that I downloaded but that's very different than what is output in build.

JoeTheOrangeCat commented 1 year ago

Yeah, I haven't figured it out. Seems like something that you should be able to do. Please let me know ow if you figure it out.