Add player-join hook to signal mod presence to datapack (v1.1.0)

ChatAnswerCore.onPlayerJoin 이 storage chat_answer:status active=1b 를 set.
Fabric 측은 ServerPlayConnectionEvents.JOIN, NeoForge 측은 PlayerLoggedInEvent
에서 호출. 데이터팩이 mq:load 단계에서 0b 로 clear 해 두므로, 모드가 빠진
환경에선 이 hook 이 일어나지 않아 0b 가 유지되고, 모드가 있으면 첫 로그인
직후 1b 로 갱신되어 데이터팩이 활성 상태를 분기할 수 있다.
This commit is contained in:
Claude
2026-05-13 22:20:00 +09:00
parent 2c35e77b8b
commit 464762589c
4 changed files with 35 additions and 1 deletions

View File

@@ -15,6 +15,6 @@ neoforge_version=21.6.20-beta
# ───── mod metadata ─────────────────────────────────────────────────────────
mod_id=chat_answer
mod_version=1.0.0
mod_version=1.1.0
mod_group=kr.tkrmagid.chatanswer
mod_name=채팅정답