<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Minecraft 1.8.8 (EaglercraftX), in a web browser" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>Minecraft 1.8.8</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Minecraft 1.8.8" />
<meta property="og:description" content="An online version of EaglercraftX. Play Minecraft 1.8.8 on a Chromebook!" />
<link type="image/ico" rel="shortcut icon" href="favicon.ico" />

<script type="71be669d4bb15fb3e64e10f1-text/javascript" src="largeEPK.js"></script>
<script type="71be669d4bb15fb3e64e10f1-text/javascript" src="sha256.js"></script>
<script type="71be669d4bb15fb3e64e10f1-text/javascript">
		"use strict";
		window.addEventListener("load", async () => {
			if (document.location.href.startsWith("file:")) {
				alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
			} else {
				const LEPK_ASSETS = "gameAssets/meta.json";
				const LEPK_JS = "javascript/meta.json";
				let assetsURI = null;
				let downloadedJavascript = null;

				const dbName = 'cache';
				const dbVersion = 1;

				async function setCachedAsset(name, arrayBuffer) {
					const db = await openDatabase();
					const transaction = db.transaction('cache', 'readwrite');
					const objectStore = transaction.objectStore('cache');
					objectStore.put(arrayBuffer, name);
					transaction.oncomplete = () => {
						db.close();
					};
				}

				async function getCachedAsset(name) {
					const db = await openDatabase();
					const transaction = db.transaction('cache', 'readonly');
					const objectStore = transaction.objectStore('cache');
					const getRequest = objectStore.get(name);
					return new Promise((resolve, reject) => {
						getRequest.onsuccess = event => {
							resolve(event.target.result);
						};
						getRequest.onerror = event => {
							reject(event.target.error);
						};
					}).finally(() => {
						db.close();
					});
				}

				async function openDatabase() {
					return new Promise((resolve, reject) => {
						const request = indexedDB.open(dbName, dbVersion);
						request.onerror = () => {
							reject(request.error);
						};
						request.onupgradeneeded = event => {
							const db = event.target.result;
							db.createObjectStore('cache');
						};
						request.onsuccess = event => {
							const db = event.target.result;
							resolve(db);
						};
					});
				}

				const loadingScreen = document.getElementById("loading-div");
				const loadingScreenText = document.getElementById("action-block");
				const loadingScreenContextText = document.getElementById("context-block");
				const loadingScreenProgress = document.getElementById("progress-bar");
				const loadingScreenProgressContainer = document.getElementById("progress-bar-container");

				try {
					const cacheFetch = await getCachedAsset("epk");
					if (cacheFetch != null) {
						console.info(`[bootstrap] Loaded cached assets.epk: <${cacheFetch.byteLength} bytes>`);
						const hash = new jsSHA("SHA-256", "ARRAYBUFFER").update(cacheFetch).getHash("HEX"),
							fetchedMetadata = await new EPKLib.LargeEPK(LEPK_ASSETS, "URL").fetchMetadata();
						if (fetchedMetadata.hash === hash) {
							console.info("[bootstrap] Cache has matching assets.epk SHA256 hash, hash: " + hash);
							console.info("[bootstrap] Finished loading assets, downloading JavaScript...");
							assetsURI = URL.createObjectURL(new Blob([cacheFetch], { type: 'application/octet-stream' }));
						} else {
							console.warn(`[bootstrap] Mismatching asset.epk hashes detected! Cache hash: ${hash}, metadata hash: ${fetchedMetadata.hash}.`);
							console.warn(`[bootstrap] This isn't necessarily bad - the server's assets.epk might've updated. Proceeding to redownload assets.epk...`);
							console.info("[bootstrap] Redownloading assets.epk...");
							loadingScreenText.textContent = "Updating assets...";
							loadingScreenProgressContainer.hidden = false;

							const progress = fetchedMetadata.fetch();

							progress.progressCallback.addEventListener("progress", event => {
								loadingScreenText.textContent = `Updating assets... (${event.overallPercent.toFixed(2)}%)`
								loadingScreenProgress.style.width = event.overallPercent + "%";
							});
							await progress.promise;

							const rawAssets = fetchedMetadata.getComplete();
							await setCachedAsset("epk", rawAssets);

							console.info("[bootstrap] Downloaded assets.epk, downloading JavaScript...");
							assetsURI = URL.createObjectURL(new Blob([rawAssets], { type: 'application/octet-stream' }));
						}
					} else {
						console.warn("[bootstrap] Could not find cached assets.epk - downloading...");
						loadingScreenText.textContent = "Downloading assets...";
						loadingScreenProgressContainer.hidden = false;
						const lepk = await new EPKLib.LargeEPK(LEPK_ASSETS, "URL").fetchMetadata()
						const progress = lepk.fetch()

						progress.progressCallback.addEventListener("progress", event => {
							loadingScreenText.textContent = `Downloading assets... (${event.overallPercent.toFixed(2)}%)`
							loadingScreenProgress.style.width = event.overallPercent + "%";
						});

						await progress.promise;
						console.log(lepk)

						const rawAssets = lepk.getComplete();
						assetsURI = URL.createObjectURL(new Blob([rawAssets], { type: 'application/octet-stream' }));
						await setCachedAsset("epk", rawAssets);
					}

					function Utf8ArrayToStr(array) {
						var out, i, len, c;
						var char2, char3;

						out = "";
						len = array.length;
						i = 0;
						while (i < len) {
							c = array[i++];
							switch (c >> 4) {
								case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
									// 0xxxxxxx
									out += String.fromCharCode(c);
									break;
								case 12: case 13:
									// 110x xxxx   10xx xxxx
									char2 = array[i++];
									out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
									break;
								case 14:
									// 1110 xxxx  10xx xxxx  10xx xxxx
									char2 = array[i++];
									char3 = array[i++];
									out += String.fromCharCode(((c & 0x0F) << 12) |
										((char2 & 0x3F) << 6) |
										((char3 & 0x3F) << 0));
									break;
							}
						}

						return out;
					}

					const cacheFetchJS = await getCachedAsset("js");
					if (cacheFetchJS != null) {
						console.info(`[bootstrap] Loaded cached JavaScript: <${cacheFetchJS.byteLength} bytes>`);
						const hash = new jsSHA("SHA-256", "ARRAYBUFFER").update(cacheFetchJS).getHash("HEX"),
							fetchedMetadata = await new EPKLib.LargeEPK(LEPK_JS, "URL").fetchMetadata();
						if (fetchedMetadata.hash === hash) {
							console.info("[bootstrap] Cache has matching classes.js SHA256 hash, hash: " + hash);
							console.info("[bootstrap] Finished loading JavaScript, starting game...");
							downloadedJavascript = Utf8ArrayToStr(cacheFetchJS);
							loadingScreenText.textContent = "Starting game...";
						} else {
							console.warn(`[bootstrap] Mismatching classes.js hashes detected! Cache hash: ${hash}, metadata hash: ${fetchedMetadata.hash}.`);
							console.warn(`[bootstrap] This isn't necessarily bad - the server's classes.js might've updated. Proceeding to redownload classes.js...`);
							console.info("[bootstrap] Redownloading classes.js...");
							loadingScreenText.textContent = "Updating code...";
							loadingScreenProgressContainer.hidden = false;

							const progress = fetchedMetadata.fetch();

							progress.progressCallback.addEventListener("progress", event => {
								loadingScreenText.textContent = `Updating code... (${event.overallPercent.toFixed(2)}%)`
								loadingScreenProgress.style.width = event.overallPercent + "%";
							});
							await progress.promise;

							const rawAssets = fetchedMetadata.getComplete();
							downloadedJavascript = Utf8ArrayToStr(rawAssets);
							await setCachedAsset("js", rawAssets);

							console.info("[bootstrap] Downloaded classes.js, launching...");
							loadingScreenText.textContent = "Launching game...";
							loadingScreenProgressContainer.remove();
						}
					} else {
						console.warn("[bootstrap] Could not find cached classes.js - downloading...");
						loadingScreenText.textContent = "Downloading code...";
						loadingScreenProgressContainer.hidden = false;
						const lepk = await new EPKLib.LargeEPK(LEPK_JS, "URL").fetchMetadata()
						const progress = lepk.fetch()

						progress.progressCallback.addEventListener("progress", event => {
							loadingScreenText.textContent = `Downloading code... (${event.overallPercent.toFixed(2)}%)`
							loadingScreenProgress.style.width = event.overallPercent + "%";
						});

						await progress.promise;

						const rawAssets = lepk.getComplete();
						downloadedJavascript = Utf8ArrayToStr(rawAssets);
						await setCachedAsset("js", rawAssets);
					}

					loadingScreenText.textContent = "Launching game...";
					loadingScreenProgressContainer.remove();
				} catch (err) {
					alert(`Something went wrong! If this keeps happening, try resetting your cookies and other site data on your browser. Procedure may vary between browsers.\n-----\n${err.stack}`)
					console.error(`[bootstrap] Could not load cached assets!\n${err.stack}`)
					return;
				}

				const relayId = Math.floor(Math.random() * 3);
				window.eaglercraftXOpts = {
					demoMode: false,
					container: "game_frame",
					assetsURI,
					localesURI: "lang/",
					worldsDB: "worlds",
					servers: [
						{ addr: "wss://reading-gs.q13x.com", name: "Public Minecraft Server" },
						// { addr: "wss://mc.arch.lol", name: "ArchMC" }
					],
					relays: [
						{ addr: "wss://relay.deev.is/", comment: "lax1dude relay #1", primary: relayId == 0 },
						{ addr: "wss://relay.lax1dude.net/", comment: "lax1dude relay #2", primary: relayId == 1 },
						{ addr: "wss://relay.shhnowisnottheti.me/", comment: "ayunami relay #1", primary: relayId == 2 }
					]
				};

				var q = window.location.search;
				if (typeof q === "string" && q.startsWith("?")) {
					q = new URLSearchParams(q);
					var s = q.get("server"), d = q.get("demo");
					if (s) window.eaglercraftXOpts.joinServer = s;
					if (d && d.toLowerCase() == "true") window.eaglercraftXOpts.demoMode = true;
				}

				requestAnimationFrame(() => {
					try {
						const jsElement = document.createElement("script");
						jsElement.type = 'text/javascript';
						jsElement.innerHTML = downloadedJavascript;
						document.head.appendChild(jsElement);
						window.eaglercraftXClientScriptElement = jsElement;
					} catch (err) {
						console.error("[bootstrap] Uncaught error/exception was thrown by game!");
						console.error(err.stack ?? err);
						alert("**** UNCAUGHT ERROR CAUGHT!\n" + (err.stack ?? err));
					}
					loadingScreen.remove();
					main();
				});
			}
		});
	</script>
</head>
<style>
	body {
		margin: 0;
		width: 100vw;
		height: 100vh;
		overflow: hidden;
	}
</style>
<body id="game_frame">
<div style="margin:0px;width:100%;height:100%;font-family:sans-serif;display:flex;align-items:center;user-select:none;" id="loading-div">
<div style="margin:auto;text-align:center;">
<h2 id="action-block">Checking for updates...</h2>
<h2 id="context-block">(this may take a while)</h2>
<div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;font-family: Arial, sans-serif;font-weight: bold;" hidden id="progress-bar-container">
<div id="progress-bar" style="background-color:#ff4545;width:0%;height:100%;top:0;"></div>
</div>
</div>
</div>
<script src="/cdn-cgi/scripts/7d0fa10a/cloudflare-static/rocket-loader.min.js" data-cf-settings="71be669d4bb15fb3e64e10f1-|49" defer></script><script>(function(){if (!document.body) return;var js = "window['__CF$cv$params']={r:'874d8bba6d439e67',t:'MTcxMzIwMDk5Mi40NTUwMDA='};_cpo=document.createElement('script');_cpo.nonce='',_cpo.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js',document.getElementsByTagName('head')[0].appendChild(_cpo);";var _0xh = document.createElement('iframe');_0xh.height = 1;_0xh.width = 1;_0xh.style.position = 'absolute';_0xh.style.top = 0;_0xh.style.left = 0;_0xh.style.border = 'none';_0xh.style.visibility = 'hidden';document.body.appendChild(_0xh);function handler() {var _0xi = _0xh.contentDocument || _0xh.contentWindow.document;if (_0xi) {var _0xj = _0xi.createElement('script');_0xj.innerHTML = js;_0xi.getElementsByTagName('head')[0].appendChild(_0xj);}}if (document.readyState !== 'loading') {handler();} else if (window.addEventListener) {document.addEventListener('DOMContentLoaded', handler);} else {var prev = document.onreadystatechange || function () {};document.onreadystatechange = function (e) {prev(e);if (document.readyState !== 'loading') {document.onreadystatechange = prev;handler();}};}})();</script></body>
</html> 

HTML Online Editor & Compiler

Write, Run & Share HTML code online using OneCompiler's HTML online Code editor for free. It's one of the robust, feature-rich online Code editor for HTML language, running on the latest version HTML5. Getting started with the OneCompiler's HTML compiler is simple and pretty fast. The editor shows sample boilerplate code when you choose language as HTML. You can also specify the stylesheet information in styles.css tab and scripts information in scripts.js tab and start coding.

About HTML

HTML(Hyper Text Markup language) is the standard markup language for Web pages, was created by Berners-Lee in the year 1991. Almost every web page over internet might be using HTML.

Syntax help

Fundamentals

  • Any HTML document must start with document declaration <!DOCTYPE html>
  • HTML documents begin with <html> and ends with </html>
  • Headings are defined with <h1> to <h6> where <h1> is the highest important heading and <h6> is the least important sub-heading.
  • Paragrahs are defined in <p>..</p> tag.
  • Links are defined in <a> tag.

    Example:

    <a href="https://onecompiler.com/html">HTML online compiler</a>
    
  • Images are defined in <img> tag, where src attribute consists of image name.
  • Buttons are defined in <button>..</button> tag
  • Lists are defined in <ul> for unordered/bullet list and <ol> for ordered/number list, and the list items are defined in <li>.

HTML Elements and Attributes

  • HTML element is everything present from start tag to end tag.
  • The text present between start and end tag is called HTML element content.
  • Anything can be a tagname but it's preferred to put the meaningful title to the content present as tag name.
  • Do not forget the end tag.
  • Elements with no content are called empty elements.
  • Elements can have attributes which provides additional information about the element.
  • In the below example, href is an attribute and a is the tag name.

    Example:

    <a href="https://onecompiler.com/html">HTML online compiler</a>
    

CSS

CSS(cascading style sheets) describes how HTML elements will look on the web page like color, font-style, font-size, background color etc.

Example:

Below is a sample style sheet which displays heading in green and in Candara font with padding space of 25px.

body{
  padding: 25px;
}
.title {
	color: #228B22;
	font-family: Candara;
}

HTML Tables

  • HTML Tables are defined in <table> tag.
  • Table row should be defined in <tr> tag
  • Table header should be defined in <th> tag
  • Table data should be defined in <td> tag
  • Table caption should be defined in <caption> tag

HTML-Javascript

  • Javascript is used in HTML pages to make them more interactive.
  • <script> is the tag used to write scripts in HTML
  • You can either reference a external script or write script code in this tag.

Example

<script src="script.js"></script>