Skip to content

Commit 630daf8

Browse files
committed
fix ajax requests
1 parent 8425393 commit 630daf8

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/html/index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<!-- META TAGS -->
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<meta charset="utf-8">
8-
<script src="/assets/mineflayer.js"></script>
98
</head>
109
<body>
1110
<!-- RENDER CANVAS -->

src/scripts/Setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ async function Setup(game) {
3737
game.stats.showPanel(0);
3838
document.body.appendChild(game.stats.dom);
3939
game.distanceBasedFog = new DistanceBasedFog(game);
40-
new proxy();
40+
game.proxy = new proxy();
4141
UrlParams(game).then((password) => {
4242
$(".loadingText").text(`Connecting to ${game.server}...`);
4343
console.warn(gpuInfo());

src/scripts/proxy/proxy.worker.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
global.window = {};
1+
global.window = self;
22
global.importScripts("../../assets/mineflayer.js");
3-
console.log(window.mineflayer);
3+
console.log(self.mineflayer);
4+
// let bot = self.mineflayer("localhost", "8080", {
5+
// host: "localhost",
6+
// port: "25565",
7+
// username: "webClient",
8+
// });
9+
// bot.on("login",()=>{
10+
// console.log("Logged in")
11+
// })

0 commit comments

Comments
 (0)