Skip to content

Commit 8425393

Browse files
committed
proxy worker test
1 parent 16ed9b5 commit 8425393

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/scripts/Setup.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { BlockBreak } from "./rendering/BlockBreak.js";
1414
import { BlockPlace } from "./rendering/BlockPlace.js";
1515
import { EventHandler } from "./EventHandler.js";
1616
import { Socket } from "./Socket.js";
17+
import proxy from "./proxy/proxy.worker.js";
1718

1819
async function Setup(game) {
1920
return new Promise((resolve) => {
@@ -36,6 +37,7 @@ async function Setup(game) {
3637
game.stats.showPanel(0);
3738
document.body.appendChild(game.stats.dom);
3839
game.distanceBasedFog = new DistanceBasedFog(game);
40+
new proxy();
3941
UrlParams(game).then((password) => {
4042
$(".loadingText").text(`Connecting to ${game.server}...`);
4143
console.warn(gpuInfo());

src/scripts/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import swal from "sweetalert";
44
import { AssetLoader } from "./AssetLoader.js";
55
import { Setup } from "./Setup.js";
66

7-
console.log(window.mineflayer);
8-
97
class Game {
108
constructor() {
119
this.production = PRODUCTION;

src/scripts/proxy/proxy.worker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
global.window = {};
2+
global.importScripts("../../assets/mineflayer.js");
3+
console.log(window.mineflayer);

0 commit comments

Comments
 (0)