Initial Fabric mod for chat-based quiz answer submission

Hooks ServerMessageEvents.ALLOW_CHAT_MESSAGE to intercept chat while the
music_quiz datapack is in answer-accepting state (init=5 on objective
'main'). Intercepted messages are forwarded to mq:answer/submit with the
player's UUID context and the chat broadcast is suppressed so the answer
stays hidden from other players. Outside that state chat passes through
normally.

Target: Minecraft 1.21.6+, Java 21, Fabric Loader 0.16+, Fabric API.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-05-13 21:44:16 +09:00
commit 3e59d08db1
12 changed files with 632 additions and 0 deletions

16
gradle.properties Normal file
View File

@@ -0,0 +1,16 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
# Minecraft / Fabric versions
# Targets MC 1.21.6 (oldest Minecraft version with the dialog system).
# Chat events are stable since 1.19 — the same jar typically works across
# the 1.21.x line; rebuild against newer mappings if a future version
# breaks binary compatibility.
minecraft_version=1.21.6
yarn_mappings=1.21.6+build.1
loader_version=0.16.10
fabric_version=0.128.2+1.21.6
mod_id=chat_answer
mod_version=1.0.0
mod_group=kr.tkrmagid.chatanswer