Chunk lifecycle events with chunk systems that replace vanilla's (e.g. Moonrise)

Offen
#302 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
15/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
java
Bereich
backend

Rechercherichtung

The events come from mixins into ChunkStatusTasks.full, ChunkMap.scheduleUnload and ChunkHolder.updateFutures, which Moonrise replaces. Read the existing chunk event mixins and how NeoForge's ChunkEvent.Load/Unload are posted. The open question is who owns dispatch, so agree on a design with maintainers before writing code. Done means the events fire once with other chunk systems installed.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

FFAPI fires ServerChunkEvents.CHUNK_LOAD, CHUNK_GENERATE, CHUNK_UNLOAD and FULL_CHUNK_STATUS_CHANGE from mixins into vanilla ChunkStatusTasks.full, ChunkMap.scheduleUnload and ChunkHolder.updateFutures. Moonrise replaces those code paths, so with Moonrise installed none of these events fire, and LoadedChunksCache stays empty (Tuinity/Moonrise#210). Moonrise does post NeoForge's ChunkEvent.Load/Unload.

On Fabric, Moonrise fires the Fabric API events itself. On NeoForge we're unsure where this should live. If Moonrise fires FFAPI's events and FFAPI later starts translating NeoForge's chunk events, everything would fire twice. If FFAPI translates NeoForge's events, the timing changes slightly: on plain NeoForge, ChunkEvent.Unload is posted after the chunk is saved, while Fabric API's CHUNK_UNLOAD fires before it. FULL_CHUNK_STATUS_CHANGE has no NeoForge equivalent either way.

How would you prefer to handle this, so these events work with other chunk systems without risking double dispatch?

Vorherrschende Sprache
Java
Sterne
181
Forks
41
Ø Merge
16 Std. 38 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus Sinytra/ForgifiedFabricAPI

Alle Issues in Sinytra/ForgifiedFabricAPI

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.