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

オープン
#302 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
java
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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?

主要言語
Java
スター
181
フォーク
41
平均マージ
16時間 38分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Sinytra/ForgifiedFabricAPI のほかの issue

Sinytra/ForgifiedFabricAPI の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。