Add Formatting (Thank God)

This commit is contained in:
2024-08-29 15:47:58 +02:00
parent 545e47a9f3
commit 1ab45204b9
35 changed files with 2331 additions and 254 deletions

View File

@@ -13,7 +13,7 @@ import {
world,
} from "@minecraft/server";
import { vector3, vector3Distance } from "../utils/vectorUtils";
import { Mindkeeper, StoreType } from "../mindKeeper";
import { Mindkeeper } from "../mindKeeper";
import { spawnParticle } from "../utils/particleUtils";
import { Manager } from "./manager";
@@ -46,7 +46,7 @@ export class Maker {
}
if (event.message === "!deleteCurrentTrigger") {
let currentTriggerdTrigger = this.manager
const currentTriggerdTrigger = this.manager
.GetTriggers()
.filter((trigger) => trigger.IsPlayerInside(event.sender as Player));
if (currentTriggerdTrigger.length > 0) {
@@ -85,12 +85,12 @@ export class Maker {
if (this.waitingForPoint2) {
this.point2 = vector3(blockInteracted.location.x, blockInteracted.location.y, blockInteracted.location.z);
let minX = Math.min(this.point1.x, this.point2.x);
let maxX = Math.max(this.point1.x, this.point2.x) + 1;
let minY = Math.min(this.point1.y, this.point2.y);
let maxY = Math.max(this.point1.y, this.point2.y) + 1;
let minZ = Math.min(this.point1.z, this.point2.z);
let maxZ = Math.max(this.point1.z, this.point2.z) + 1;
const minX = Math.min(this.point1.x, this.point2.x);
const maxX = Math.max(this.point1.x, this.point2.x) + 1;
const minY = Math.min(this.point1.y, this.point2.y);
const maxY = Math.max(this.point1.y, this.point2.y) + 1;
const minZ = Math.min(this.point1.z, this.point2.z);
const maxZ = Math.max(this.point1.z, this.point2.z) + 1;
//Take the outer bounds of the two points
this.point1 = vector3(minX, minY, minZ);
@@ -126,7 +126,7 @@ export class Maker {
const z = pos1.z + (zStep / steps) * i;
//make the ends and starts a different color
let map = new MolangVariableMap();
const map = new MolangVariableMap();
if (i == 0 || i == steps) {
map.setColorRGB("variable.color", { red: 0, green: 255, blue: 0 });
const particleData: MolangVariableMap = new MolangVariableMap();
@@ -159,7 +159,7 @@ export class Maker {
}
Update() {
let shouldRender = this.mindKeeper.get("ShowTriggers") as boolean;
const shouldRender = this.mindKeeper.get("ShowTriggers") as boolean;
this.manager.GetTriggers().forEach((trigger: Trigger) => {
trigger.Update();
@@ -178,7 +178,6 @@ export class Maker {
});
distances.sort((a, b) => a.distance - b.distance);
const closestPlayer = distances[0].player;
const distance = distances[0].distance;
if (distance > 25) return;