Spaces:
Running
Running
<html lang="und" style="width:100%;height:100%;background-color:black;"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"> | |
<meta name="description" content="Eaglercraft 1.12.2 Offline Download"> | |
<meta name="keywords" content="eaglercraft, minecraft"> | |
<title>EFI v2.7.92 on 1.12.2</title> | |
<meta property="og:locale" content="en-US"> | |
<meta property="og:type" content="website"> | |
<meta property="og:title" content="Eaglercraft 1.12.2 Offline"> | |
<meta property="og:description" content="this file is not a website, whoever uploaded it to this URL is a dumbass"> | |
<script type="text/javascript"> | |
; | |
if(false) { | |
alert("このHTMLファイルはブラウザで直接'開く'ことはできません。あなたのHTTPサーバーにアップロードしてアクセスしてプレイできます。バグではありません。付属のドキュメントを参照してください。"); | |
}else { | |
window.addEventListener("load", function(){ | |
const relayId = Math.floor(Math.random() * 3); | |
window.eaglercraftXOpts = { | |
container: "game_frame", assetsURI: "assets.epk", worldsFolder: "MAIN", worldsDB: "worlds", | |
servers: [ | |
{ serverName: "ArchMC", serverAddress: "wss://mc.arch.lol/", hideAddress: false }, | |
{ serverName: "Asspixel(少し重い)", serverAddress: "wss://web.asspixel.net/CAPixel/", hideAddress: false }, | |
{ serverName: "Aeon(The Pit)", serverAddress: "wss://aeon.megatkc.repl.co/", hideAddress: false } | |
], | |
relays: [ | |
{ addr: "wss://relay.deev.is/", name: "lax1dude relay #1", primary: relayId == 0 }, | |
{ addr: "wss://relay.lax1dude.net/", name: "lax1dude relay #2", primary: relayId == 1 }, | |
{ addr: "wss://relay.shhnowisnottheti.me/", name: "ayunami relay #1", primary: relayId == 2 } | |
], | |
mainMenu: { splashes: [ | |
"MODが追加可能なEaglercraft 1.12.2" | |
], eaglerLogo: true }}; | |
(function(){ | |
var q = window.location.search; | |
if(typeof q === 'string' && q.startsWith("?")) { | |
q = new URLSearchParams(q); | |
var s = q.get("server"); | |
if(s) window.minecraftOpts.push(s); | |
} | |
})(); | |
main(); | |
});} | |
</script> | |
<script type="text/javascript" src="classes.js"> | |
</script> | |
<script type="text/javascript"> | |
; | |
(function(){ | |
var launchInterval = -1; | |
var launchCounter = 1; | |
var launchCountdownNumberElement = null; | |
var launchCountdownProgressElement = null; | |
var launchSkipCountdown = false; | |
var launchTick = function() { | |
var urlParams = new URLSearchParams(window.location.search); | |
var showModGUI = urlParams.has('ShowModGUI'); | |
var countdownScreen = document.getElementById("launch_countdown_screen"); | |
if (countdownScreen && countdownScreen.parentNode) { | |
document.body.removeChild(countdownScreen); | |
} | |
// ゲームがまだ起動していない場合のみ実行 | |
if (!window.eaglercraftXRunning) { | |
window.eaglercraftXRunning = true; | |
document.body.style.backgroundColor = "black"; | |
if (showModGUI) { | |
// ShowModGUIが指定されている場合、MOD GUIが表示されているか確認 | |
if (!document.getElementById("modapi_gui_container")) { | |
main(); | |
ModAPI.hooks._postInit(); | |
} | |
// インターバルをクリアしない(継続的にチェック) | |
// ※特に必要があれば clearInterval を明示的に避ける | |
} else { | |
// ShowModGUIが指定されていない場合、即座に起動 | |
main(); | |
ModAPI.hooks._postInit(); | |
clearInterval(launchInterval); | |
} | |
} | |
}; | |
window.addEventListener("load", function() { | |
launchCountdownNumberElement = document.getElementById("launchCountdownNumber"); | |
launchCountdownProgressElement = document.getElementById("launchCountdownProgress"); | |
launchInterval = setInterval(launchTick, 50); | |
/* | |
document.getElementById("bootMenu").addEventListener("click", function() { | |
launchSkipCountdown = true; | |
window.eaglercraftXOpts.showBootMenuOnLaunch = true; | |
}); | |
*/ | |
}); | |
})(); | |
</script> | |
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753s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KDnPjMzgw8E3qGL2tpaBWpubjYqj2BoaEj6rq4uNATRZ0ZwCbiL6gXEzINk5vCBQJ9rMD4+rkA8QNK036uDg4Py8vLu7m680KjIBNR3zBDoWQM1g98snyB+VSoRW8C/UwR81/SvhgNj9JOTkwwVERUdRBEI0BAdLRVERkhLS8vIyEDQlrsTPTU1lVFhKxARvZgUlFLbegCf4BvIsbi4mIg4E5EogIHhiKCMtU0WUFiVy06j5fAJIDdSBDQw+PegDfBRcbOPwH4F9LuFWIIQdQNKwWqzIE0aoFUaBsw+SQuFw0uNtC9A+F4i3QNrbg3IDn+SAsHh+wYiEpeyBEMLv/cAO6KzAijxxB+Y4wisBhssJUhjEbPJf4Nw+B+JXqLW3bw+wQAAAABJRU5ErkJggg=="> | |
</head> | |
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:#121212;" id="game_frame"> | |
<script id="modapi_patchesreg_events">globalThis.modapi_specialevents = [`render`];;</script> | |
<script id="modapi_postinit" src="modapi1.js"></script> | |
<script id="modapi_modloader">(() => { | |
globalThis.promisifyIDBRequest = function promisifyIDBRequest(request) { | |
return new Promise((resolve, reject) => { | |
request.onsuccess = () => resolve(request.result); | |
request.onerror = () => reject(request.error); | |
}); | |
} | |
globalThis.getDatabase = async function getDatabase() { | |
const dbRequest = indexedDB.open("EF_MODS"); | |
const db = await promisifyIDBRequest(dbRequest); | |
if (!db.objectStoreNames.contains("filesystem")) { | |
db.close(); | |
const version = db.version + 1; | |
const upgradeRequest = indexedDB.open("EF_MODS", version); | |
upgradeRequest.onupgradeneeded = (event) => { | |
const upgradedDb = event.target.result; | |
upgradedDb.createObjectStore("filesystem"); | |
}; | |
return promisifyIDBRequest(upgradeRequest); | |
} | |
return db; | |
} | |
globalThis.getMods = async function getMods() { | |
const db = await getDatabase(); | |
const transaction = db.transaction(["filesystem"], "readonly"); | |
const objectStore = transaction.objectStore("filesystem"); | |
const object = await promisifyIDBRequest(objectStore.get("mods.txt")); | |
var out = object ? (await object.text()).split("|").toSorted() : []; | |
db.close(); | |
return out; | |
} | |
globalThis.getMod = async function getMod(mod) { | |
const db = await getDatabase(); | |
const transaction = db.transaction(["filesystem"], "readonly"); | |
const objectStore = transaction.objectStore("filesystem"); | |
const object = await promisifyIDBRequest(objectStore.get("mods/" + mod)); | |
var out = object ? (await object.text()) : ""; | |
db.close(); | |
return out; | |
} | |
globalThis.saveMods = async function saveMods(mods) { | |
const db = await getDatabase(); | |
const transaction = db.transaction(["filesystem"], "readwrite"); | |
const objectStore = transaction.objectStore("filesystem"); | |
const encoder = new TextEncoder(); | |
const modsData = encoder.encode(mods.toSorted().join("|")); | |
const modsBlob = new Blob([modsData], { type: "text/plain" }); | |
await promisifyIDBRequest(objectStore.put(modsBlob, "mods.txt")); | |
db.close(); | |
} | |
globalThis.addMod = async function addMod(mod) { | |
const mods = await getMods(); | |
mods.push("web@" + mod); | |
await saveMods(mods); | |
} | |
globalThis.addFileMod = async function addFileMod(mod, textContents) { | |
const mods = await getMods(); | |
if (mods.includes(mod)) { | |
await removeMod(mods.indexOf(mod)); | |
} else { | |
mods.push(mod); | |
} | |
await saveMods(mods); | |
const db = await getDatabase(); | |
const transaction = db.transaction(["filesystem"], "readwrite"); | |
const objectStore = transaction.objectStore("filesystem"); | |
const encoder = new TextEncoder(); | |
const modsData = encoder.encode(textContents); | |
const modsBlob = new Blob([modsData], { type: "text/plain" }); | |
await promisifyIDBRequest(objectStore.put(modsBlob, "mods/" + mod)); | |
db.close(); | |
} | |
globalThis.removeMod = async function removeMod(index) { | |
const mods = await getMods(); | |
if (index >= 0 && index < mods.length) { | |
var deleted = mods.splice(index, 1)[0]; | |
await saveMods(mods); | |
if (!deleted.startsWith("web@")) { | |
const db = await getDatabase(); | |
const transaction = db.transaction(["filesystem"], "readwrite"); | |
const objectStore = transaction.objectStore("filesystem"); | |
await promisifyIDBRequest(objectStore.delete("mods/" + deleted)); | |
db.close(); | |
} | |
} | |
} | |
globalThis.resetMods = async function resetMods() { | |
console.log("Resetting mods..."); | |
const db = await getDatabase(); | |
const transaction = db.transaction(["filesystem"], "readwrite"); | |
const objectStore = transaction.objectStore("filesystem"); | |
await promisifyIDBRequest(objectStore.clear()); | |
console.log("Mods reset"); | |
db.close(); | |
} | |
globalThis.modLoader = async function modLoader(modsArr = []) { | |
if (!window.eaglerMLoaderMainRun) { | |
var searchParams = new URLSearchParams(location.search); | |
searchParams.getAll("mod").forEach((modToAdd) => { | |
console.log( | |
"[EaglerML] Adding mod to loadlist from search params: " + modToAdd | |
); | |
modsArr.push("web@" + modToAdd); | |
}); | |
searchParams.getAll("plugin").forEach((modToAdd) => { | |
console.log( | |
"[EaglerML] Adding mod to loadlist from search params: " + modToAdd | |
); | |
modsArr.push("web@" + modToAdd); | |
}); | |
if ( | |
!!eaglercraftXOpts && | |
!!eaglercraftXOpts.Mods && | |
Array.isArray(eaglercraftXOpts.Mods) | |
) { | |
eaglercraftXOpts.Mods.forEach((modToAdd) => { | |
console.log( | |
"[EaglerML] Adding mod to loadlist from eaglercraftXOpts: " + | |
modToAdd | |
); | |
modsArr.push("web@" + modToAdd); | |
}); | |
} | |
console.log("[EaglerML] Searching in iDB"); | |
try { | |
var idbMods = await getMods(); | |
modsArr = modsArr.concat(idbMods | |
.filter(x => { return x && x.length > 0 }) | |
); | |
} catch (error) { | |
console.error(error); | |
} | |
window.eaglerMLoaderMainRun = true; | |
} | |
if (window.noLoadMods === true) { | |
modsArr.splice(0, modsArr.length); | |
} | |
function checkModsLoaded(totalLoaded, identifier) { | |
console.log( | |
"[EaglerML] Checking if mods are finished :: " + | |
totalLoaded + | |
"/" + | |
modsArr.length | |
); | |
if (totalLoaded >= modsArr.length) { | |
clearInterval(identifier); | |
window.ModGracePeriod = false; | |
if ( | |
window.eaglerMLoaderMainRun && | |
ModAPI && | |
ModAPI.events && | |
ModAPI.events.callEvent | |
) { | |
ModAPI.events.callEvent("load", {}); | |
} | |
console.log( | |
"[EaglerML] Checking if mods are finished :: All mods loaded! Grace period off." | |
); | |
} | |
} | |
function methodB(currentMod) { | |
try { | |
console.log("[EaglerML] Loading " + currentMod + " via method B."); | |
var script = document.createElement("script"); | |
script.setAttribute("data-hash", ModAPI.util.hashCode("web@" + currentMod)); | |
script.src = currentMod; | |
script.setAttribute("data-isMod", "true"); | |
script.onerror = () => { | |
console.log( | |
"[EaglerML] Failed to load " + currentMod + " via method B!" | |
); | |
script.remove(); | |
totalLoaded++; | |
}; | |
script.onload = () => { | |
console.log( | |
"[EaglerML] Successfully loaded " + currentMod + " via method B." | |
); | |
totalLoaded++; | |
}; | |
document.body.appendChild(script); | |
} catch (error) { | |
console.log( | |
"[EaglerML] Oh no! The mod " + currentMod + " failed to load!" | |
); | |
totalLoaded++; | |
} | |
} | |
window.ModGracePeriod = true; | |
var totalLoaded = 0; | |
var loaderCheckInterval = null; | |
modsArr.sort(); | |
for (let i = 0; i < modsArr.length; i++) { | |
let currentMod = modsArr[i]; | |
var isIDBMod = !currentMod.startsWith("web@"); | |
if (!isIDBMod) { | |
currentMod = currentMod.replace("web@", ""); | |
} | |
console.log("[EaglerML] Starting " + currentMod); | |
try { | |
var responseText = isIDBMod ? await getMod(currentMod) : await (await fetch(currentMod)).text(); | |
console.log("[EaglerML] Loading " + currentMod + " via method A."); | |
var script = document.createElement("script"); | |
script.setAttribute("data-hash", ModAPI.util.hashCode((isIDBMod ? "" : "web@") + currentMod)); | |
try { | |
script.src = | |
"data:text/javascript," + encodeURIComponent(responseText); | |
} catch (error) { | |
methodB(currentMod); | |
return; | |
} | |
script.setAttribute("data-isMod", "true"); | |
script.onerror = () => { | |
console.log( | |
"[EaglerML] Failed to load " + currentMod + " via method A!" | |
); | |
script.remove(); | |
totalLoaded++; | |
}; | |
script.onload = () => { | |
console.log( | |
"[EaglerML] Successfully loaded " + currentMod + " via method A." | |
); | |
totalLoaded++; | |
}; | |
document.body.appendChild(script); | |
} catch (error) { | |
methodB(currentMod); | |
} | |
} | |
loaderCheckInterval = setInterval(() => { | |
checkModsLoaded(totalLoaded, loaderCheckInterval); | |
}, 500); | |
console.log( | |
"[EaglerML] Starting to load " + modsArr.length + " mods..." | |
); | |
window.returnTotalLoadedMods = function returnTotalLoadedMods() { | |
return totalLoaded; | |
}; | |
}; | |
})();</script> | |
<script id="modapi_guikit"> | |
</script> | |
<script id="modapi_postinit_data" src="modapi2.js"></script> | |
<script id="libserverside">{"._|_libserverside_|_."}</script> | |
<script id="__eaglerforgeinjector_installation_flag__">console.log("Thank you for using EaglerForge!");</script> | |
<div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="launch_countdown_screen"> | |
</div> | |
</body> | |
</html> |