implement chat, implement teleport, help and time command, use relative vertex positions for block rendering, version 1.0.3

This commit is contained in:
LabyStudio
2022-05-17 01:41:16 +02:00
parent 1e10dda0e2
commit 32245a9136
18 changed files with 416 additions and 81 deletions
@@ -304,32 +304,32 @@ export default class PlayerEntity extends EntityLiving {
let sneaking = false;
if (this.minecraft.hasInGameFocus()) {
if (Keyboard.isKeyDown("KeyR")) { // R
if (Keyboard.isKeyDown("KeyR")) {
// this.respawn();
}
if (Keyboard.isKeyDown("KeyW")) { // W
if (Keyboard.isKeyDown("KeyW")) {
moveForward++;
}
if (Keyboard.isKeyDown("KeyS")) { // S
if (Keyboard.isKeyDown("KeyS")) {
moveForward--;
}
if (Keyboard.isKeyDown("KeyA")) { // A
if (Keyboard.isKeyDown("KeyA")) {
moveStrafe++;
}
if (Keyboard.isKeyDown("KeyD")) { // D
if (Keyboard.isKeyDown("KeyD")) {
moveStrafe--;
}
if (Keyboard.isKeyDown("Space")) { // Space
if (Keyboard.isKeyDown("Space")) {
jumping = true;
}
if (Keyboard.isKeyDown(this.minecraft.settings.sprinting)) {
if (Keyboard.isKeyDown(this.minecraft.settings.keySprinting)) {
if (this.moveForward > 0 && !this.sneaking && !this.sprinting && this.motionX !== 0 && this.motionZ !== 0) {
this.sprinting = true;
this.updateFOVModifier();
}
}
if (Keyboard.isKeyDown(this.minecraft.settings.crouching)) { // Q
if (Keyboard.isKeyDown(this.minecraft.settings.keyCrouching)) {
sneaking = true;
}