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

@@ -1,5 +1,4 @@
import { MolangVariableMap, Vector3, world } from "@minecraft/server";
import { Vector3Add } from "../utils/vectorUtils";
import { MolangVariableMap, Vector3 } from "@minecraft/server";
import { TrailType } from "./trailTypes";
import { PARTICLES, spawnParticle } from "../utils/particleUtils";
@@ -14,10 +13,12 @@ class TrailPoint {
spawn() {
// let spawnPosition: Vector3 = Vector3Add(this.postion, { x: 0.5, y: 0.5, z: 0.5 });
let spawnPosition: Vector3 = this.postion;
const spawnPosition: Vector3 = this.postion;
try {
spawnParticle(spawnPosition, PARTICLES.balloon_gas_particle, new MolangVariableMap());
} catch (e) {}
} catch (error) {
console.error("Error spawning particle", error);
}
}
}
@@ -54,7 +55,6 @@ class Trail {
if (this.currentParticleCounter >= this.nextParticleTimer) {
this.currentParticleCounter = 0;
//wrapindex is in how many segments the trail is divided into
let pointsPerInterval = this.wrapIndex > 0 ? this.calculatedLength / this.wrapIndex : 0;
this.points
.filter((point) => {
if (this.wrapIndex > 0) {
@@ -68,7 +68,7 @@ class Trail {
});
this.currentPoint++;
let actualLength = this.wrapIndex > 0 ? this.wrapIndex : this.calculatedLength;
const actualLength = this.wrapIndex > 0 ? this.wrapIndex : this.calculatedLength;
if (this.currentPoint >= actualLength) {
this.currentPoint = 0;
}