Add interval property for configurable tick rate in LagoonAddons
This commit is contained in:
@@ -2,7 +2,7 @@ import { system, world } from "@minecraft/server";
|
||||
import utils from "utils";
|
||||
import { websocket, WebSocketClient } from "@minecraft/server-net";
|
||||
import { InitPlayer } from "entities/player";
|
||||
import { roomCode } from "properties";
|
||||
import { interval, roomCode } from "properties";
|
||||
|
||||
class LagoonAddons {
|
||||
|
||||
@@ -53,7 +53,7 @@ class LagoonAddons {
|
||||
this.timer++;
|
||||
|
||||
// 1 seconde
|
||||
if (this.timer % 20 === 0) {
|
||||
if (this.timer % interval === 0) {
|
||||
|
||||
if (this.ws.isOpen) {
|
||||
const players: {x: number, y: number, z: number, code: string, muted: boolean}[] = world.getAllPlayers().map((p) => {
|
||||
|
||||
Reference in New Issue
Block a user