use threejs module js, remove unused libraries, increase world generation seed to 64 bit, implement random world spawn, improve start script

This commit is contained in:
LabyStudio
2022-05-12 02:57:23 +02:00
parent 51c07050e9
commit 24c0451031
28 changed files with 50508 additions and 578 deletions
+5 -14
View File
@@ -84,17 +84,14 @@ export default class Minecraft {
}
init() {
// Load spawn chunk
for (let x = -WorldRenderer.RENDER_DISTANCE; x <= WorldRenderer.RENDER_DISTANCE; x++) {
for (let z = -WorldRenderer.RENDER_DISTANCE; z <= WorldRenderer.RENDER_DISTANCE; z++) {
this.world.getChunkAt(x, z);
}
}
this.player.respawn();
// Start render loop
this.running = true;
this.requestNextFrame();
// Load spawn chunks and respawn player
this.world.findSpawn();
this.world.loadSpawnChunks();
this.player.respawn();
}
hasInGameFocus() {
@@ -112,9 +109,6 @@ export default class Minecraft {
}
onLoop() {
this.window.statsFps.begin();
this.window.statsMs.begin();
// Update the timer
this.timer.advanceTime();
@@ -135,9 +129,6 @@ export default class Minecraft {
this.lastTime += 1000;
this.frames = 0;
}
this.window.statsFps.end();
this.window.statsMs.end();
}
onRender(partialTicks) {