Singleplayer, integrated server doesn't start
This commit is contained in:
parent
c651bb8041
commit
9dc616f28b
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="corretto-18" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-18" project-jdk-type="JavaSDK" />
|
||||
</project>
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
java -cp "lwjgl-rundir/MakeOfflineDownload.jar:desktopRuntime/CompileEPK.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeOfflineDownload "javascript/OfflineDownloadTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/Eaglercraft_1.6.4_Offline.html" "javascript/lang"
|
||||
java -cp "lwjgl-rundir/MakeOfflineDownload.jar:CompilePackage.jar" net.lax1dude.eaglercraft.v1_8.buildtools.workspace.MakeOfflineDownload "javascript/OfflineDownloadTemplate.txt" "javascript/classes.js" "javascript/assets.epk" "javascript/Eaglercraft_1.6.4_Offline.html" "javascript/lang"
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -31,6 +31,8 @@ Be aware that some server owners are lazy and do not update their client regular
|
|||
|
||||
window.eaglercraftOpts = { container: "game_frame",
|
||||
|
||||
serverWorkerURI: ${worker_bootstrap_js},
|
||||
|
||||
servers: [
|
||||
{ serverName: "Local Test Server", serverAddress: "ws://localhost:25565", hideAddress: false },
|
||||
{ serverName: "CathCraft", serverAddress: "wss://cathcraft.zelz.net", hideAddress: false },
|
||||
|
@ -68,6 +70,7 @@ window.addEventListener("load", () => {
|
|||
});
|
||||
|
||||
</script>
|
||||
|
||||
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAX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2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/Pz09PT7O1NNnZ2Tw3fgZkXVhYKCUlUhBATP+hCVyKZGky17RV0g04laayslJ6hlVeFHB4eFhKaogGd0LxtmTgE+hbhKDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg==" />
|
||||
</head>
|
||||
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame">
|
||||
|
|
Binary file not shown.
34316
javascript/classes.js
34316
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,5 @@
|
|||
onmessage = function(o) {
|
||||
importScripts("classes.js");
|
||||
eaglercraftServerOpts = o.data;
|
||||
startIntegratedServer();
|
||||
};
|
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,3 @@
|
|||
|
||||
language.name=English
|
||||
language.region=US
|
||||
language.code=en_US
|
||||
|
@ -11,6 +10,7 @@ gui.up=Up
|
|||
gui.down=Down
|
||||
gui.yes=Yes
|
||||
gui.no=No
|
||||
gui.killTask=Kill Task
|
||||
|
||||
translation.test.none=Hello, world!
|
||||
translation.test.complex=Prefix, %s%2$s again %s and %1$s lastly %s and also %1$s again!
|
||||
|
@ -70,16 +70,15 @@ profile.clearSkin=Clear List
|
|||
|
||||
fancyGraphicsNote=go to -> Options -> Video Settings on the pause menu to enable fancy graphics and smooth lighting
|
||||
|
||||
|
||||
selectWorld.title=Select World
|
||||
selectWorld.empty=empty
|
||||
selectWorld.world=World
|
||||
selectWorld.select=Play Selected World
|
||||
selectWorld.create=Create New World
|
||||
selectWorld.recreate=Re-Create
|
||||
selectWorld.backup=Backup
|
||||
selectWorld.createDemo=Play New Demo World
|
||||
selectWorld.delete=Delete
|
||||
selectWorld.rename=Rename
|
||||
selectWorld.delete=Delete
|
||||
selectWorld.deleteQuestion=Are you sure you want to delete this world?
|
||||
selectWorld.deleteWarning=will be lost forever! (A long time!)
|
||||
selectWorld.deleteButton=Delete
|
||||
|
@ -94,6 +93,33 @@ selectWorld.enterSeed=Seed for the World Generator
|
|||
selectWorld.seedInfo=Leave blank for a random seed
|
||||
selectWorld.cheats=Cheats
|
||||
selectWorld.customizeType=Customize
|
||||
selectWorld.duplicateTitle=Duplicate World
|
||||
selectWorld.duplicateButton=Duplicate
|
||||
selectWorld.importName=Set World Name
|
||||
|
||||
selectWorld.backup.title=World Backup Menu:
|
||||
selectWorld.backup.recreate=Re-Create World
|
||||
selectWorld.backup.recreate.tooltip=Create a new world with the same seed
|
||||
selectWorld.backup.seed=Seed:
|
||||
selectWorld.backup.duplicate=Duplicate World
|
||||
selectWorld.backup.duplicate.tooltip=Copy this world into a new save
|
||||
selectWorld.backup.export=Export EPK File
|
||||
selectWorld.backup.export.tooltip=Download this world as a compressed .epk file
|
||||
selectWorld.backup.vanilla=Convert to Vanilla
|
||||
selectWorld.backup.vanilla.tooltip=Download this world as a vanilla 1.6.4 world
|
||||
selectWorld.backup.clearPlayerData=Delete Player Data
|
||||
selectWorld.backup.clearPlayerData.tooltip=Clears the inventories of all players except the owner
|
||||
|
||||
selectWorld.backup.clearPlayerData.warning1=Are you sure you want to delete all player data?
|
||||
selectWorld.backup.clearPlayerData.warning2=All players in '$world$' will lose their inventories (besides $player$)
|
||||
|
||||
selectWorld.create.title=What do you wanna do?
|
||||
selectWorld.create.create=Create New World
|
||||
selectWorld.create.create.tooltip=Make a new world for eaglercraft
|
||||
selectWorld.create.import=Load EPK File
|
||||
selectWorld.create.import.tooltip=Load an Eaglercraft .epk world file
|
||||
selectWorld.create.vanilla=Import Vanilla World
|
||||
selectWorld.create.vanilla.tooltip=Load a vanilla minecraft 1.6.4 world
|
||||
|
||||
createWorld.customize.presets=Presets
|
||||
createWorld.customize.presets.title=Select a Preset
|
||||
|
@ -140,6 +166,17 @@ selectWorld.hardcoreMode=Hardcore:
|
|||
selectWorld.hardcoreMode.info=World is deleted upon death
|
||||
selectWorld.bonusItems=Bonus Chest:
|
||||
|
||||
selectWorld.progress.deleting=Deleting World
|
||||
selectWorld.progress.renaming=Renaming World
|
||||
selectWorld.progress.copying=Copying World
|
||||
selectWorld.progress.exporting.1=Exporting as EPK
|
||||
selectWorld.progress.exporting.2=Exporting as Vanilla
|
||||
selectWorld.progress.importing.0=Importing as EPK
|
||||
selectWorld.progress.importing.1=Importing as Vanilla
|
||||
selectWorld.progress.cancelWarning=Do you really want to 'Kill Task'? Your world may fail to save
|
||||
selectWorld.progress.confirmCancel=Yes, Kill Task
|
||||
selectWorld.progress.continue=Continue
|
||||
|
||||
generator.default=Default
|
||||
generator.flat=Superflat
|
||||
generator.largeBiomes=Large Biomes
|
||||
|
|
|
@ -50,6 +50,7 @@ public class IntegratedServer {
|
|||
public static void begin(String[] locale, String[] stats) {
|
||||
logException = true;
|
||||
if(!isWorkerAlive()) {
|
||||
System.out.println("beginning?");
|
||||
openConnections.clear();
|
||||
exceptions.clear();
|
||||
statusState = IntegratedState.WORLD_WORKER_BOOTING;
|
||||
|
@ -59,6 +60,9 @@ public class IntegratedServer {
|
|||
clearTPS();
|
||||
EaglerAdapter.beginLoadingIntegratedServer();
|
||||
}
|
||||
else {
|
||||
System.out.println("FUCK");
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isReady() {
|
||||
|
|
|
@ -534,7 +534,8 @@ public class IntegratedServer {
|
|||
@JSBody(params = { "wb" }, script = "onmessage = function(o) { wb(o.data.ch, o.data.dat); };")
|
||||
private static native void registerPacketHandler(WorkerBinaryPacketHandler wb);
|
||||
|
||||
public static void startServer() {
|
||||
public static void startIntegratedServer() {
|
||||
System.out.println("Starting integrated server (kinda)");
|
||||
registerPacketHandler(new WorkerBinaryPacketHandlerImpl());
|
||||
isRunning = true;
|
||||
sendIPCPacket(new IPCPacketFFProcessKeepAlive(0xFF));
|
||||
|
|
|
@ -142,10 +142,6 @@ public abstract class MinecraftServer implements ICommandSender, Runnable {
|
|||
*/
|
||||
protected abstract boolean startServer() throws IOException;
|
||||
|
||||
protected void convertMapIfNeeded(String par1Str) {
|
||||
// no
|
||||
}
|
||||
|
||||
/**
|
||||
* Typically "menu.convertingLevel", "menu.loadingLevel" or others.
|
||||
*/
|
||||
|
|
|
@ -8,9 +8,6 @@ import net.lax1dude.eaglercraft.EaglerAdapter;
|
|||
import net.lax1dude.eaglercraft.EaglerImage;
|
||||
import net.lax1dude.eaglercraft.TextureLocation;
|
||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||
import net.lax1dude.eaglercraft.glemu.EffectPipeline;
|
||||
import net.lax1dude.eaglercraft.glemu.EffectPipelineFXAA;
|
||||
import net.lax1dude.eaglercraft.glemu.GameOverlayFramebuffer;
|
||||
import net.lax1dude.eaglercraft.glemu.vector.Matrix4f;
|
||||
|
||||
public class EntityRenderer
|
||||
|
|
|
@ -136,13 +136,11 @@ public class GuiMainMenu extends GuiScreen {
|
|||
*/
|
||||
public void initGui() {
|
||||
if(viewportTexture == -1) viewportTexture = this.mc.renderEngine.makeViewportTexture(256, 256);
|
||||
Calendar var1 = Calendar.getInstance();
|
||||
var1.setTime(new Date());
|
||||
|
||||
StringTranslate var2 = StringTranslate.getInstance();
|
||||
int var4 = this.height / 4 + 48;
|
||||
|
||||
if(EnumBrowser.getBrowser() != EnumBrowser.DESKTOP) { // EaglerAdapter.isIntegratedServerAvailable()
|
||||
if(EaglerAdapter.isIntegratedServerAvailable()) { // EaglerAdapter.isIntegratedServerAvailable()
|
||||
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, var4, var2.translateKey("menu.singleplayer")));
|
||||
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, var4 + 24 * 1, var2.translateKey("menu.multiplayer")));
|
||||
this.buttonList.add(new GuiButton(3, this.width / 2 - 100, var4 + 24 * 2, var2.translateKey("menu.forkme")));
|
||||
|
@ -156,7 +154,6 @@ public class GuiMainMenu extends GuiScreen {
|
|||
this.buttonList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey("menu.editprofile")));
|
||||
|
||||
this.buttonList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));
|
||||
Object var5 = this.field_104025_t;
|
||||
|
||||
synchronized (this.field_104025_t) {
|
||||
this.field_92023_s = this.fontRenderer.getStringWidth(this.field_92025_p);
|
||||
|
|
|
@ -2,6 +2,7 @@ package net.lax1dude.eaglercraft;
|
|||
|
||||
import static org.teavm.jso.webgl.WebGLRenderingContext.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.sp.IntegratedServer;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.teavm.jso.JSBody;
|
||||
|
@ -68,14 +69,14 @@ public class Client {
|
|||
conf.put("assetsURI", assetsURI.substring(0, 256) + " ... ");
|
||||
crashScreenOptsDump = "window.eaglercraftOpts = " + conf.toString();
|
||||
}
|
||||
String serverWorkerURI = conf.optString("serverWorkerURI", null);
|
||||
//EaglerAdapterImpl2.setWorldDatabaseName(conf.optString("worldsFolder", "MAIN"));
|
||||
String serverWorkerURI = conf.optString("serverWorkerURI", "worker_bootstrap.js");
|
||||
EaglerAdapterImpl2.setWorldDatabaseName(conf.optString("worldsFolder", "MAIN"));
|
||||
|
||||
registerErrorHandler();
|
||||
|
||||
try {
|
||||
|
||||
EaglerAdapterImpl2.initializeContext(rootElement, assetsURI, null);
|
||||
EaglerAdapterImpl2.initializeContext(rootElement, assetsURI, serverWorkerURI);
|
||||
|
||||
ServerList.loadDefaultServers(conf);
|
||||
AssetRepository.loadOverrides(conf);
|
||||
|
@ -105,7 +106,7 @@ public class Client {
|
|||
|
||||
try {
|
||||
|
||||
EaglerAdapterImpl2.initializeContext(rootElement = Window.current().getDocument().getElementById(e[0]), e[1], null);
|
||||
EaglerAdapterImpl2.initializeContext(rootElement = Window.current().getDocument().getElementById(e[0]), e[1], "worker_bootstrap.js");
|
||||
|
||||
LocalStorageManager.loadStorage();
|
||||
if(e.length > 2 && e[2].length() > 0) {
|
||||
|
@ -141,6 +142,7 @@ public class Client {
|
|||
|
||||
private static void run1() {
|
||||
instance.run();
|
||||
//IntegratedServer.startIntegratedServer();
|
||||
}
|
||||
|
||||
@JSBody(params = { }, script = "return window.minecraftOpts;")
|
||||
|
|
|
@ -25,6 +25,7 @@ import java.util.Set;
|
|||
import java.util.function.Consumer;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.lax1dude.eaglercraft.sp.WorkerNetworkManager;
|
||||
import org.json.JSONObject;
|
||||
import org.teavm.interop.Async;
|
||||
import org.teavm.interop.AsyncCallback;
|
||||
|
@ -2869,6 +2870,7 @@ public class EaglerAdapterImpl2 {
|
|||
server.terminate();
|
||||
}
|
||||
workerMessageQueue.put("IPC", new LinkedList<PKT>());
|
||||
System.out.println("doing server worker shit");
|
||||
server = new Worker(integratedServerScript);
|
||||
server.onError(new EventListener<ErrorEvent>() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue