Fixed offline downloads & begin work on pre eagler loading screen

This commit is contained in:
ThisIsALegitUsername 2023-02-20 15:26:13 +00:00
parent c048193d8e
commit a215b5d0c3
14 changed files with 83235 additions and 83750 deletions

View File

@ -54,37 +54,14 @@ ${classes_js}
window.eaglercraftXOpts.assetsURI = ${assets_epk};
var launchInterval = -1;
var launchCounter = 1;
var launchCountdownNumberElement = null;
var launchCountdownProgressElement = null;
function launchTick() {
launchCountdownNumberElement.innerText = "" + Math.floor(6.0 - launchCounter * 0.06);
launchCountdownProgressElement.style.width = "" + launchCounter + "%";
if(++launchCounter > 100) {
clearInterval(launchInterval);
setTimeout(() => { document.getElementById("launch_countdown_screen").remove(); main(); }, 50);
}
}
window.addEventListener("load", () => {
launchCountdownNumberElement = document.getElementById("launchCountdownNumber");
launchCountdownProgressElement = document.getElementById("launchCountdownProgress");
launchInterval = setInterval(launchTick, 50);
main();
});
</script>
<link type="image/png" rel="shortcut icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAR/SURBVEhLtZXZK3ZRFMYPcqXc+gv413DHxVuGIpIhkciQWaRccCNjSCkligwXSOZ5nmfv9zvn2e8+58V753sudmuvvdZ61l5r7XOc8H+GS/D19aUNkPz5+aktQH5/f//4+LBKZKuRkpUtQjCUYG5gD2T38vLy/PwsDfL9/f3Dw8PT05M0b29vnKLhCKCBT4L4gvBLBIei4//4+Hh1dUVEQutUuLu7E83FxQUGnKLBWKfQaA3S+AREVxaEOD8/Pzk50XpzcyMDcH19zdZG3N3d3dzc3Nvb01aX5pQUpQGGQJxcQpfNysoKhUIdHR1o1tbWbInYAgxIPDMzMy8vLzc3FxqOdMoRqwJK8G8ALUYIhHMiSEhIwI6CyIb0qQzC4eGhsXCc1tZWnZIEKzdQJQSXgKxfX18RCM3Z5eWlcfVAxKOjo+Pj49PTU88lTOk2NjbMsePc3t6SAfcgFdszOyMuAdeBg0CQi2lhYUHOeOLDCisN8FzcPFZXV3t7ezHY3t5GQ+6it+2xMASsKhEEWKsmRLRBBUpPvpJ/TpFKFBwKYAiITmicsbYhdHfJAltqhUCVsCQhwslmeXmZxiBQT9c0Ar9E2O3v72sYSE0N1yQArkKy0kBMXLqlZqIZHR3t6empqqqSDcBdhXEJSJ/bUc3q6uq+vj629GB9fR1WsLW1NTs7u7S0RN2locMjIyOEm5ubQ7+4uJienk4/+vv77Y1hwhLBEKhwWHitdVFfX9/Y2Gg2HuLi4owUAysrK8yCG97rh0+ApP5Q2ZycHFlPTExUVFRIBvn5+WhKSkp2dnaMKhptbW2426GgQ/rwuAQCZ1hwFayLiork9hMFBQV1dXVmE0BLS4vqw3QFB8kn4IAxoGPkYpxi4FeDmpqas7Mz4pClAgqGwD48rjY2NmacYqC0tJQ1KSlJWyE5OZkpUKkBAxZVIntAoZh04+Q48fHxPNGBgYHExMT29naj9cBodnZ2mo3jlJWVMeW2OGQck4B1amqqoaGhqamJjx2lGxwcpL0mUgR8fJhsWqJtSkoKU2SbHHUDpkhPBujd8xuQG6PJRM/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">
<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 style="margin:auto;text-align:center;">
<h1>This file is from <span style="color:#AA0000;">${date}</span></h1>
<h2>Game will launch in <span id="launchCountdownNumber">5</span>...</h2>
<div style="border:2px solid black;width:100%;height:15px;padding:1px;margin-bottom:20vh;"><div id="launchCountdownProgress" style="background-color:#555555;width:0%;height:100%;"></div></div>
</div>
</div>
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">
</body>
</html>

View File

@ -1,323 +0,0 @@
<!DOCTYPE html>
<!--
This file is from ${date}, there is no official eagler download link anymore, check the websites and discords of your favorite eagler servers for new versions
Be aware that some server owners are lazy and do not update their client regularly
Compile it yourself here: https://gitlab.com/lax1dude/eaglercraftx-1.8/
-->
<html>
<head>
<title>Resent Client</title>
<meta charset="application/javascript" />
<!--meta content="IMAGE" property="og:image"/>-->
<meta content="Eaglercraft pvp client. Currently developed by hooman#1196/Nitwit in-game. Over 100 texture packs for 1.5 and 40+ mods. 1.8 currently in development." property="og:description" />
<link rel="icon" type="image/x-icon" href="/images/favicon.ico" />
</head>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
font-weight: 390;
letter-spacing: 1px;
overflow: hidden;
}
body {
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: red;
margin: 0;
width: 100vw;
height: 100vh;
background-color: red;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#changelog {
top: 35%;
right: 15%;
text-align: center;
position: absolute;
background-color: rgb(49, 51, 54);
height: 30vh;
width: 13vw;
padding-left: 1vw;
padding-right: 1vw;
padding-top: 1vw;
padding-bottom: 1vw;
border-radius: 1vw;
color: white;
max-width: 30vw;
text-align: center;
font-size: calc(1.2vw);
overflow-y: scroll;
}
#quickstart {
position: relative;
text-align: center;
bottom: 2px;
overflow-y: scroll;
top: 35%;
left: 15%;
right: 10vw;
text-align: center;
position: absolute;
background-color: rgb(49, 51, 54);
height: 30vh;
width: 13vw;
padding-left: 1vw;
padding-right: 1vw;
padding-top: 1vw;
padding-bottom: 1vw;
border-radius: 1vw;
color: white;
max-width: 30vw;
font-size: calc(1.2vw);
text-align: center;
}
.stuff {
padding-bottom: 1vw;
transition: 1s ease-in-out;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
align-items: center;
}
#Packs {
height: 3vh;
width: 9vw;
font-size: 0.8vw;
text-align: center;
}
#Selection {
vertical-align: center;
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgb(49, 51, 54);
padding: 1vw;
border-radius: 1vw;
color: white;
width: 20vw;
height: 40vh;
text-align: center;
overflow-y: scroll;
font-size: calc(1.1vw);
transition: 1s ease-in-out;
}
.btn {
position: relative;
display: inline-block;
border: none;
border-radius: 50px;
background: none;
padding: 25px 75px;
margin: 30px;
}
.btn a {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: rgb(255, 255, 255, 0.05);
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
border-top: 1px solid rgba(255, 255, 255, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 30px;
color: white;
z-index: 1;
letter-spacing: 1px;
text-decoration: none;
backdrop-filter: blur(15px);
transition: all 0.3s ease-in-out;
}
.btn:hover a {
letter-spacing: 3px;
}
.btn a::before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 50%;
height: 100%;
background: linear-gradient(to left, rgba(255, 255, 255, 0.15), transparent);
transform: skewX(40deg) translateX(0);
transition: all 0.5s ease-out;
}
.btn:hover a::before {
transform: skewX(40deg) translateX(200%);
}
.btn::before,
.btn::after {
content: "";
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 30px;
height: 10px;
border-radius: 10px;
background: #9e4444;
transition: all 0.4s ease-in-out;
transition-delay: 0s;
}
.btn::before {
bottom: -5px;
}
.btn::after {
top: -5px;
}
.btn:hover::before,
.btn:hover::after {
height: 50%;
width: 80%;
border-radius: 30px;
transition-delay: 0.3s;
}
.btn:hover::before {
bottom: 0;
}
.btn:hover::after {
top: 0;
}
.btn:nth-child(1)::before,
.btn:nth-child(1)::after {
background: #2bd2ff;
box-shadow: 0 0 5px #2bd2ff, 0 0 15px #2bd2ff, 0 0 30px #2bd2ff,
0 0 60px #2bd2ff;
}
.btn:nth-child(2)::before,
.btn:nth-child(2)::after {
background: #2bd2ff;
box-shadow: 0 0 5px #2bd2ff, 0 0 15px #2bd2ff, 0 0 30px #2bd2ff,
0 0 60px #2bd2ff;
}
.btn:nth-child(3)::before,
.btn:nth-child(3)::after {
background: #1eff45;
box-shadow: 0 0 5px #1eff45, 0 0 15px #1eff45, 0 0 30px #1eff45,
0 0 60px #1eff45;
}
.btn:nth-child(4)::before,
.btn:nth-child(4)::after {
background: #fffa65;
box-shadow: 0 0 5px #fffa65, 0 0 15px #fffa65, 0 0 30px #fffa65,
0 0 60px #fffa65;
}
#Selection:hover {
box-shadow: 1vw 1vw rgb(24, 8, 33);
transition-delay: 1s;
transition: box-shadow 0.5s ease-in-out;
}
.stuff:hover {
box-shadow: 1vw 1vw rgb(24, 8, 33);
transition-delay: 1s;
transition: box-shadow 0.5s ease-in-out;
}
</style>
<body id="game_frame">
<div class="stuff" id="changelog">
<h3>Changelog and Updates</h3>
<div>
<br/>
<br />
<p>too lazy to update changelog cope</p>
<br />
</div>
</div>
<div class="stuff" id="quickstart">
<h3>Quick Guide</h3>
<br/>
<br/>
<p>- Press "Y" in game to open the GUI</p>
<br />
<p>- Set hotkeys and other keybinds in controls</p>
<br />
<p>- Press "Modify HUD" to change the layout</p>
</div>
<div id="Selection">
<div background-color: light-grey;>
<h1>Resent Client 1.8</h1>
<br/>
<div class="container">
<button onclick="Start();" class="btn"><a href="#">Launch</a></button>
</div>
</div>
<script type="text/javascript">
function Start() {
document.getElementById("Selection").style.display = "none";
document.getElementById("changelog").style.display = "none";
document.getElementById("quickstart").style.display = "none";
"use strict";
window.eaglercraftXOpts = { container: "game_frame", };
${classes_js}
window.eaglercraftXOpts.assetsURI = ${assets_epk};
main();
}
</script>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,308 +1,132 @@
<!DOCTYPE html>
<html>
<head>
<title>Resent Client</title>
<meta charset="application/javascript" />
<!--meta content="IMAGE" property="og:image"/>-->
<meta content="Eaglercraft pvp client. Currently developed by hooman#1196/Nitwit in-game. Over 100 texture packs for 1.5 and 40+ mods. 1.8 currently in development." property="og:description" />
<link rel="icon" type="image/x-icon" href="/images/favicon.ico" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="EaglercraftX 1.8 test directory HTML page" />
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
<title>EaglercraftX 1.8</title>
<meta property="og:locale" content="en-US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="EaglercraftX 1.8" />
<meta property="og:description" content="test directory HTML page" />
<link type="image/png" rel="shortcut icon" href="favicon.png" />
<script type="text/javascript" src="classes.js"></script>
<script type="text/javascript" src="fix-webm-duration.js"></script>
</head>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Roboto", sans-serif;
font-weight: 390;
letter-spacing: 1px;
overflow: hidden;
html {
font-family: sans-serif;
text-align: center;
}
body {
#progresstext {
font-weight: bold;
top: 30vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: red;
margin: 0;
font-size: 1.75vw;
}
#clienttitle {
position: relative;
top: 20vh;
font-size: 5.5vw;
}
#clientversion {
position: relative;
top: 15vh;
font-size: 2.5vw;
color: gray;
}
#progress {
width: 10%;
height: 7.5vh;
display: block;
border-radius: 10vw;
background-color: black;
transition: all 0.5s;
margin-top: -2.8vh;
margin-left: -1.3vw;
}
#meter {
width: 80vw;
margin:auto;
top: 28vh;
height: 2vh;
position: relative;
border: 0.65vw solid black;
border-radius: 20vw;
padding: 1.15vw;
}
#dividk {
background-color: white;
position: absolute;
top: 0px;
left: 0px;
width: 100vw;
height: 100vh;
background-color: red;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#changelog {
top: 35%;
right: 15%;
text-align: center;
position: absolute;
background-color: rgb(49, 51, 54);
height: 30vh;
width: 13vw;
padding-left: 1vw;
padding-right: 1vw;
padding-top: 1vw;
padding-bottom: 1vw;
border-radius: 1vw;
color: white;
max-width: 30vw;
text-align: center;
font-size: calc(1.2vw);
overflow-y: scroll;
}
#quickstart {
position: relative;
text-align: center;
bottom: 2px;
overflow-y: scroll;
top: 35%;
left: 15%;
right: 10vw;
text-align: center;
position: absolute;
background-color: rgb(49, 51, 54);
height: 30vh;
width: 13vw;
padding-left: 1vw;
padding-right: 1vw;
padding-top: 1vw;
padding-bottom: 1vw;
border-radius: 1vw;
color: white;
max-width: 30vw;
font-size: calc(1.2vw);
text-align: center;
}
.stuff {
padding-bottom: 1vw;
transition: 1s ease-in-out;
}
.container {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
align-items: center;
}
#Packs {
height: 3vh;
width: 9vw;
font-size: 0.8vw;
text-align: center;
}
#Selection {
vertical-align: center;
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgb(49, 51, 54);
padding: 1vw;
border-radius: 1vw;
color: white;
width: 20vw;
height: 40vh;
text-align: center;
overflow-y: scroll;
font-size: calc(1.1vw);
transition: 1s ease-in-out;
}
.btn {
position: relative;
display: inline-block;
border: none;
border-radius: 50px;
background: none;
padding: 25px 75px;
margin: 30px;
}
.btn a {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
background: rgb(255, 255, 255, 0.05);
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
border-top: 1px solid rgba(255, 255, 255, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 30px;
color: white;
z-index: 1;
letter-spacing: 1px;
text-decoration: none;
backdrop-filter: blur(15px);
transition: all 0.3s ease-in-out;
}
.btn:hover a {
letter-spacing: 3px;
}
.btn a::before {
content: "";
position: absolute;
left: 0;
top: 0;
width: 50%;
height: 100%;
background: linear-gradient(to left, rgba(255, 255, 255, 0.15), transparent);
transform: skewX(40deg) translateX(0);
transition: all 0.5s ease-out;
}
.btn:hover a::before {
transform: skewX(40deg) translateX(200%);
}
.btn::before,
.btn::after {
content: "";
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 30px;
height: 10px;
border-radius: 10px;
background: #9e4444;
transition: all 0.4s ease-in-out;
transition-delay: 0s;
}
.btn::before {
bottom: -5px;
}
.btn::after {
top: -5px;
}
.btn:hover::before,
.btn:hover::after {
height: 50%;
width: 80%;
border-radius: 30px;
transition-delay: 0.3s;
}
.btn:hover::before {
bottom: 0;
}
.btn:hover::after {
top: 0;
}
.btn:nth-child(1)::before,
.btn:nth-child(1)::after {
background: #2bd2ff;
box-shadow: 0 0 5px #2bd2ff, 0 0 15px #2bd2ff, 0 0 30px #2bd2ff,
0 0 60px #2bd2ff;
}
.btn:nth-child(2)::before,
.btn:nth-child(2)::after {
background: #2bd2ff;
box-shadow: 0 0 5px #2bd2ff, 0 0 15px #2bd2ff, 0 0 30px #2bd2ff,
0 0 60px #2bd2ff;
}
.btn:nth-child(3)::before,
.btn:nth-child(3)::after {
background: #1eff45;
box-shadow: 0 0 5px #1eff45, 0 0 15px #1eff45, 0 0 30px #1eff45,
0 0 60px #1eff45;
}
.btn:nth-child(4)::before,
.btn:nth-child(4)::after {
background: #fffa65;
box-shadow: 0 0 5px #fffa65, 0 0 15px #fffa65, 0 0 30px #fffa65,
0 0 60px #fffa65;
}
#Selection:hover {
box-shadow: 1vw 1vw rgb(24, 8, 33);
transition-delay: 1s;
transition: box-shadow 0.5s ease-in-out;
}
.stuff:hover {
box-shadow: 1vw 1vw rgb(24, 8, 33);
transition-delay: 1s;
transition: box-shadow 0.5s ease-in-out;
}
</style>
<body id="game_frame">
<div class="stuff" id="changelog">
<h3>Changelog and Updates</h3>
<div>
<br/>
<br />
<p>too lazy to update changelog cope</p>
<br />
</div>
</div>
<div class="stuff" id="quickstart">
<h3>Quick Guide</h3>
<br/>
<br/>
<p>- Press "Y" in game to open the GUI</p>
<br />
<p>- Set hotkeys and other keybinds in controls</p>
<br />
<p>- Press "Modify HUD" to change the layout</p>
</div>
<div id="Selection">
<div background-color: light-grey;>
<h1>Resent Client 1.8</h1>
<br/>
<div class="container">
<button onclick="Start();" class="btn"><a href="#">Launch</a></button>
</div>
</div>
<script type="text/javascript">
"use strict";
window.addEventListener("load", () => {
if(document.location.href.startsWith("file:")) {
alert(
"You cannot 'open' this file in your browser, the code doesn't work. Upload this folder to your HTTP(s) server and access it via the internet to launch the stable-download game. This is not a bug, please read the documentation."
);
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
}else {
function Start() {
document.getElementById("Selection").style.display = "none";
document.getElementById("changelog").style.display = "none";
document.getElementById("quickstart").style.display = "none";
window.eaglercraftXOpts = {
container: "game_frame",
assetsURI: "assets.epk",
localesURI: "lang/",
servers: [
/* example: { addr: "ws://localhost:8081/", name: "Local test server" } */ {addr: "wss://blobcraft.minecraft.pe", name: "BlobCraft"}
{ addr: "ws://localhost:8081/", name: "Local test server" }
]
};
var q = window.location.search;
if(typeof q === "string" && q.startsWith("?")) {
q = new URLSearchParams(q);
var s = q.get("server");
if(s) window.eaglercraftXOpts.joinServer = s;
}
main();
}
}
});
</script>
</head>
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame">
<div id = "dividk">
<h1 id="clienttitle">Resent Client</h1>
<h2 id="clientversion">3.5</h2>
<p id="progresstext">0%</p>
<div id="meter">
<span style="width: 0%" id="progress"></span>
</div>
<script type="text/javascript">
function updateTextProgress(event, epkSize){
document.getElementById("progresstext").innerText = Math.round((event.loaded/1024/1024)/(epkSize/1024/1024))*100 + "%" + "(" + Math.round(event.loaded/1024/1024) + "MB" + "/" + Math.round(epkSize/1024/1024) + "MB )";
}
function setVersion(version){
document.getElementById("clientversion").innerText = version;
}
function setBarProg(event, epkSize){
let progress = Math.round(event.loaded/1024/1024);
let size = Math.round(epkSize/1024/1024);
document.getElementById("progress").style.width = Math.round(progress/size)*100+4+"%";
updateTextProgress(event, epkSize);
}
function die(){
document.getElementById( "dividk" ).style.display = "none";
}
</script>
</div>
</body>
</html>

View File

@ -2,10 +2,10 @@
cd javascript
rm EaglercraftX_1.8_Offline_en_US.html
rm EaglercraftX_1.8_Offline_International.html
rm Resent_3.3_patch__1.8_US.html
rm Resent_3.3_patch_1.8_International.html
rm Resent_6.0_patch__1.8_US.html
rm Resent_6.0_patch_1.8_International.html
cd ../
./MakeOfflineDownload.sh
cd javascript
mv EaglercraftX_1.8_Offline_en_US.html Resent_3.3_patch__1.8_US.html
mv EaglercraftX_1.8_Offline_International.html Resent_3.3_patch_1.8_International.html
mv EaglercraftX_1.8_Offline_en_US.html Resent_6.0_patch__1.8_US.html
mv EaglercraftX_1.8_Offline_International.html Resent_6.0_patch_1.8_International.html

View File

@ -13,7 +13,7 @@ public class Resent {
INSTANCE = new Resent();
}
public static final String NAME = "Resent", VERSION = "3.5";
public static final String NAME = "Resent", VERSION = "3.6";
public static final Resent INSTANCE;
public SoundManager soundManager;
public ModManager modManager;

View File

@ -0,0 +1,17 @@
package dev.resent.javascript;
import org.teavm.jso.JSBody;
import org.teavm.jso.dom.events.Event;
public class LoadScreen {
@JSBody(params = { "event", "epkSize" }, script = "setBarProg(event, epkSize)")
public static native void setBarProgress(Event event, int epkSize);
@JSBody(params = { "version" }, script = "setVersion(version)")
public static native void setClientVersion(String version);
@JSBody( script = "die()")
public static native void remove();
}

View File

@ -18,6 +18,6 @@ public class ClientButton extends GuiButton {
this.hovered = (mouseX >= this.xPosition && mouseY >= this.yPosition && mouseX < this.xPosition + this.width && mouseY < this.yPosition + this.height);
Gui.drawRect(this.xPosition, this.yPosition, this.xPosition + this.width, this.yPosition + this.height, hovered ? 0x30ffffff : 0x20ffffff);
drawCenteredString(fr, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, Color.RED.getRGB(), false);
drawCenteredString(fr, this.displayString, this.xPosition + this.width / 2, this.yPosition + (this.height - 8) / 2, -1, false);
}
}

View File

@ -331,10 +331,9 @@ public class GuiIngame extends Gui {
int i = sr.getScaledWidth() / 2;
float f = this.zLevel;
this.zLevel = -90.0F;
int itemX = i - 90 + ((int) simpleAnimation.getValue());
drawRect(itemX, sr.getScaledHeight() - 21, itemX + 24, sr.getScaledHeight(), new Color(230, 230, 230, 180).getRGB());
this.drawTexturedModalRect(i - 91, sr.getScaledHeight() - 22, 0, 0, 182, 22);
this.drawTexturedModalRect(i - 91 - 1 + entityplayer.inventory.currentItem * 20,
sr.getScaledHeight() - 22 - 1, 0, 22, 24, 22);
this.zLevel = f;
GlStateManager.enableRescaleNormal();
GlStateManager.enableBlend();

View File

@ -298,7 +298,6 @@ public class PlatformInput {
}
}
);
onBeforeCloseRegister();
fullscreenQuery = fullscreenMediaQuery();
if (keyboardLockSupported = checkKeyboardLockSupported()) {

View File

@ -1,31 +1,12 @@
package net.lax1dude.eaglercraft.v1_8.internal;
import com.jcraft.jzlib.DeflaterOutputStream;
import com.jcraft.jzlib.GZIPInputStream;
import com.jcraft.jzlib.GZIPOutputStream;
import com.jcraft.jzlib.InflaterInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.function.Consumer;
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerArrayBufferAllocator;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.EPKLoader;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.EarlyLoadScreen;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass.EPKFileEntry;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMClientConfigAdapter;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGL2RenderingContext;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums;
import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
import org.teavm.interop.Async;
import org.teavm.interop.AsyncCallback;
import org.teavm.jso.JSBody;
@ -47,6 +28,30 @@ import org.teavm.jso.typedarrays.ArrayBuffer;
import org.teavm.jso.webaudio.MediaStream;
import org.teavm.jso.webgl.WebGLFramebuffer;
import com.jcraft.jzlib.DeflaterOutputStream;
import com.jcraft.jzlib.GZIPInputStream;
import com.jcraft.jzlib.GZIPOutputStream;
import com.jcraft.jzlib.InflaterInputStream;
import dev.resent.client.Resent;
import dev.resent.javascript.LoadScreen;
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerArrayBufferAllocator;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer;
import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.EPKLoader;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.EarlyLoadScreen;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass.EPKFileEntry;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMClientConfigAdapter;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils;
import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGL2RenderingContext;
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums;
import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
/**
* Copyright (c) 2022-2023 LAX1DUDE. All Rights Reserved.
*
@ -147,6 +152,7 @@ public class PlatformRuntime {
}
logger.info("Decompressing: {}", logURL);
LoadScreen.remove();
try {
EPKLoader.loadEPK(epkFileData, epkFiles[i].path, PlatformAssets.assets);
@ -270,10 +276,7 @@ public class PlatformRuntime {
request.setResponseType("arraybuffer");
request.open("GET", assetPackageURI, true);
TeaVMUtils.addEventListener(
request,
"load",
new EventListener<Event>() {
TeaVMUtils.addEventListener(request, "load", new EventListener<Event>() {
@Override
public void handleEvent(Event evt) {
int stat = request.getStatus();
@ -283,8 +286,18 @@ public class PlatformRuntime {
cb.complete(null);
}
}
});
TeaVMUtils.addEventListener(request, "progress", new EventListener<Event>() {
@Override
public void handleEvent(Event evt) {
int epkSize = Integer.parseInt(request.getResponseHeader("content-length"));
Event event = evt;
LoadScreen.setClientVersion(Resent.VERSION);
LoadScreen.setBarProgress(event, epkSize);
}
);
});
TeaVMUtils.addEventListener(
request,