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:
45
build.gradle
Normal file
45
build.gradle
Normal file
@@ -0,0 +1,45 @@
|
||||
plugins {
|
||||
id 'fabric-loom' version '1.10-SNAPSHOT'
|
||||
id 'java'
|
||||
}
|
||||
|
||||
group = project.mod_group
|
||||
version = project.mod_version
|
||||
archivesBaseName = project.mod_id
|
||||
|
||||
java {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(21)
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url = 'https://maven.fabricmc.net/' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mod_id", project.mod_id
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version, "mod_id": project.mod_id
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.release = 21
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
jar {
|
||||
from("LICENSE") {
|
||||
rename { "${it}_${project.archivesBaseName}" }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user