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

Ouverte
#302 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
15/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
java
Domaine
backend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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?

Langage dominant
Java
Étoiles
181
Forks
41
Merge moyen
16 h 38 min
PR mergées (30 j)
1

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Sinytra/ForgifiedFabricAPI

Toutes les issues de Sinytra/ForgifiedFabricAPI

Issues similaires

Plus d'issues Java

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.