Make every <timespan> Independent of Server Tick Rate

Aperta
#8,692 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

Start by locating how every <timespan> is scheduled and how explicit tick intervals are handled; the issue does not name files or tests. Compare the current 20-ticks-per-second behavior with real elapsed-time scheduling, and check how the two interval forms should behave when server TPS changes. Done means time units track real elapsed time while tick intervals remain tick-based.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

priority: lowest up for debate
Suggestion

I propose that every events use real elapsed time rather than a fixed number of Minecraft ticks.

For example:

every 1 second:

should execute once every real-world second regardless of the server's configured or actual tick rate.

Why?

The term "second" implies a real-world second rather than a specific number of game ticks.

Making every use real elapsed time would:

Produce consistent behavior across servers.
Match user expectations.
Prevent timers from speeding up or slowing down when TPS differs from 20.
Make periodic tasks more suitable for cooldowns, statistics, API polling, and other time-sensitive systems.

Other

every 1 second is currently based on 20 ticks.

This means the real-world interval changes when the server's tick rate differs from 20 TPS:

20 TPS → every 1.0 seconds
30 TPS → every ~0.67 seconds
10 TPS → every 2.0 seconds

As a result, the same script can behave differently across servers.

Tick-based scheduling would still be available through explicit tick intervals:

every 20 ticks:

This allows scripts that need game-time precision to continue using ticks while making time units behave according to their literal meaning.

Agreement
  • I have read the guidelines above and affirm I am following them with this suggestion.
Lingua principale
Java
Stelle
1.3k
Fork
456
Merge medio
4g 14h
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di SkriptLang/Skript

Tutte le issue di SkriptLang/Skript

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.