Minecraft · handler “Minecraft: Java Edition”
Version 4
Release notes
Auto windowed and notes.
- Released
- Size
- 1.8 KB
- Downloads
- 9
- Check
- Verified
- SHA-256
- 09f865f76a8e795a680e4386d7656b8f8c8ebb405d30e5e0b49b4c11eace310c
Files 1
| Path | Size |
|---|---|
| handler.js | 4.6 KB |
handler.js
Plain textHub.Handler.Version = 4; // Released at https://hub.splitscreen.me/ on Wed Apr 15 2020 01:04:29 GMT+0000 (UTC).
Hub.Handler.Id = "QC7TTYjjZzaQ6Y6Nw";
Hub.Maintainer.Name = "Talos91";
Hub.Maintainer.Id = "eeL7HAz8zJovChWw4";
Game.NeedsSteamEmulation = false;
Game.HandlerInterval = 100;
Game.SymlinkExe = false;
Game.SymlinkGame = false;
Game.SupportsKeyboard = false;
Game.ExecutableName = "MinecraftLauncher.exe";
Game.SteamID = "15";
Game.GUID = "Minecraft Java Edition";
Game.GameName = "Minecraft Java Edition";
Game.MaxPlayers = 16;
Game.MaxPlayersOneMonitor = 16;
Game.HideTaskbar = true;
Game.Hook.ForceFocus = false;
Game.Hook.ForceFocusWindowName = "Minecraft";
Game.HasDynamicWindowTitle = true;
Game.Hook.DInputEnabled = false;
Game.Hook.DInputForceDisable = false;
Game.Hook.XInputEnabled = true;
Game.Hook.XInputReroute = false;
Game.Hook.CustomDllEnabled = false;
Game.FakeFocus = true;
Game.FakeFocusInterval = 120;
Game.HookFocus = true;
Game.PreventGameFocus = true;
Game.RefreshWindowAfterStart = true;
Game.ForceProcessPick = true;
Game.NotTopMost = true;
Game.HideCursor = false;
Game.PauseBetweenStarts = 30;
Game.Description =
"Java version only. If you are using the legit launcher and when launching via Nucleus it asks you to log in close Nucleus and make sure to log in with your account first outside of Nucleus, launch then close minecraft and disconnect your pc from the internet then launch via Nucleus and each launcher instance should have a different name now, that way you don't need to use multiple accounts to connect to each other, you can connect to the internet fine after that. If you use keyboards and mice after the instances open press the END key to lock the input for all instances to have their own cursor. Press the END key again to unlock the input. If you are going to use Controllers, you need to have Forge installed and the Controllable mod, if you want to play with just gamepads disable the Game.SupportsMultipleKeyboardsAndMice option in the script so you can use keyboard shortcuts in gamepad instances and other things that need keyboard.";
Game.SupportsMultipleKeyboardsAndMice = true;
Game.HookSetCursorPos = true;
Game.HookGetCursorPos = true;
Game.HookGetKeyState = true;
Game.HookGetAsyncKeyState = true;
Game.HookGetKeyboardState = true;
Game.HookFilterRawInput = true;
Game.HookFilterMouseMessages = true;
Game.HookUseLegacyInput = false;
Game.HookDontUpdateLegacyInMouseMsg = false;
Game.HookMouseVisibility = false;
Game.SendNormalMouseInput = true;
Game.SendNormalKeyboardInput = true;
Game.SendScrollWheel = true;
Game.ForwardRawKeyboardInput = false;
Game.ForwardRawMouseInput = false;
Game.HookReRegisterRawInput = true;
Game.HookReRegisterRawInputMouse = true;
Game.HookReRegisterRawInputKeyboard = false;
Game.DrawFakeMouseCursor = true;
Game.LockInputAtStart = false;
Game.LockInputToggleKey = 0x23;
MakeNotReadonly = function(path) {
if (System.IO.File.Exists(path)) {
var oldAttr = System.IO.File.GetAttributes(path);
var newAttr = oldAttr & ~1;
System.IO.File.SetAttributes(path, newAttr);
}
};
MakeReadonly = function(path) {
if (System.IO.File.Exists(path)) {
var oldAttr = System.IO.File.GetAttributes(path);
var newAttr = oldAttr | 1;
System.IO.File.SetAttributes(path, newAttr);
}
};
Game.Play = function() {
var username = System.Environment.UserName;
var txtPath = "C:\\Users\\" + username + "\\AppData\\Roaming\\.minecraft\\options.txt";
var dict = ["17|fullscreen:false"];
Context.ReplaceLinesInTextFile(txtPath, dict);
var name = "Player" + Context.PlayerID;
var dotm = System.Environment.GetFolderPath(26) + "\\.minecraft";
//Kill any running Minecraft Launchers or they will use the old username.
Context.KillProcessesMatchingWindowName("Minecraft Launcher");
Context.KillProcessesMatchingProcessName("MinecraftLauncher");
//Paths
var lpfp = dotm + "\\launcher_profiles.json";
var uc = dotm + "\\usercache.json";
var unc = dotm + "\\usernamecache.json";
//Mark not readonly
MakeNotReadonly(lpfp);
MakeNotReadonly(uc);
MakeNotReadonly(unc);
//Wipe files
var emptyLines = [];
Context.WriteTextFile(uc, emptyLines);
Context.WriteTextFile(unc, emptyLines);
var usernameLineNumber = Context.FindLineNumberInTextFile(lpfp, '"displayName"', 0);
if (usernameLineNumber != -1) {
var replaceUsernameLine = [usernameLineNumber + "|" + '"displayName" : "' + name + '"'];
Context.ReplaceLinesInTextFile(lpfp, replaceUsernameLine);
}
//Mark readonly
MakeReadonly(lpfp);
MakeReadonly(uc);
MakeReadonly(unc);
};