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

@@ -6,7 +6,6 @@ import {
TicksPerSecond,
TitleDisplayOptions,
Vector3,
World,
system,
world,
} from "@minecraft/server";
@@ -46,7 +45,7 @@ class Pupeteer {
static setTitleTimed(message: string, duration: number): void {
world.getPlayers().forEach((player) => {
let options: TitleDisplayOptions = {
const options: TitleDisplayOptions = {
fadeInDuration: 20,
fadeOutDuration: 20,
stayDuration: duration * TicksPerSecond,
@@ -88,11 +87,11 @@ class Pupeteer {
static testForLocation(location: Vector3, radius: number): boolean {
let isPlayerInArea = false;
world.getPlayers().forEach((player) => {
let dx = location.x - player.location.x;
let dy = location.y - player.location.y;
let dz = location.z - player.location.z;
const dx = location.x - player.location.x;
const dy = location.y - player.location.y;
const dz = location.z - player.location.z;
let distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
const distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
if (distance < radius) {
isPlayerInArea = true;
}