Blablalib implementation - #11
Merged
Merged
Conversation
To test this publish Blablalib to mavenLocal
…s prior to BlablaLib
There was a problem hiding this comment.
Pull request overview
This PR migrates the mod’s in-house dialogue system to the external BlablaLib library, updating content and runtime hooks to use BlablaLib’s dialogue APIs and events.
Changes:
- Added BlablaLib as a required Forge dependency and updated Gradle configuration to fetch Architectury/BlablaLib.
- Reworked story progression hooks (Scourge entities + server events) to open/track dialogues via BlablaLib instead of custom packets/UI.
- Updated
dialogues.jsonsets/links to use namespaced ids and new choice actions.
Reviewed changes
Copilot reviewed 25 out of 26 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/resources/META-INF/mods.toml |
Declares BlablaLib as a mandatory dependency. |
src/main/resources/assets/worldscolliding/dialogues.json |
Updates dialogue set references/choices for BlablaLib integration. |
src/main/java/fr/gcjojo/worldscolliding/network/ModNetwork.java |
Removes dialogue-related packets from the old custom networking layer. |
src/main/java/fr/gcjojo/worldscolliding/ModEntry.java |
Registers BlablaLib dialogue event listeners at mod init. |
src/main/java/fr/gcjojo/worldscolliding/events/ModEvents.java |
Switches dialogue open/progression hooks to BlablaLib + adds BlablaLib event handlers. |
src/main/java/fr/gcjojo/worldscolliding/entity/ScourgeEntity.java |
Uses BlablaLib player dialogue state to trigger dialogues server-side. |
src/main/java/fr/gcjojo/worldscolliding/entity/AwakenedScourgeEntity.java |
Opens post-boss dialogues via BlablaLib. |
src/main/java/fr/gcjojo/worldscolliding/commands/ModCommands.java |
Replaces legacy dialogue command with BlablaLib’s DialogueCommand helper. |
src/main/java/fr/gcjojo/worldscolliding/client/gui/DialogueScreen.java |
Removes the custom dialogue UI implementation. |
settings.gradle |
Adds Architectury Maven repository. |
gradle.properties |
Adds Architectury/BlablaLib version properties and bumps mod version. |
build.gradle |
Adds Architectury plugin + dependencies, switches repos for BlablaLib resolution. |
README.md |
Updates documentation to point dialogue system users to BlablaLib. |
Comments suppressed due to low confidence (1)
src/main/java/fr/gcjojo/worldscolliding/commands/ModCommands.java:63
- This registers a special-case mapping for
chapter_5_6_set, but that dialogue id is not present in thechapterslist (and doesn't exist indialogues.json). As written, this callback will never run its toggle logic, and it returns non-namespaced ids (chapter_5_set/chapter_6_set) that don't match the namespaced ids used elsewhere (e.g.worldscolliding:chapter_0_set).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 26 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (3)
src/main/java/fr/gcjojo/worldscolliding/commands/ModCommands.java:54
- The chapter IDs are currently stored with embedded quote characters (e.g.
\"worldscolliding:credits\"). That will make the dialogue command work with quoted IDs instead of normal resource locations, breaking suggestions and likely lookup. Also, the list includeschapter_5_past_set, but the JSON defineschapter_5_past_accept_set(so the command can suggest a non-existent set).
src/main/java/fr/gcjojo/worldscolliding/commands/ModCommands.java:63 - The chapter-5/6 toggle will never run as written: the special-case compares against
chapter_5_6_set(no namespace), but the registered chapter IDs are namespaced (worldscolliding:...). This means the callback will always return the original dialogue ID and never redirect to chapter 5 vs 6.
src/main/java/fr/gcjojo/worldscolliding/commands/ModCommands.java:77 - The callback returns un-namespaced set IDs (
chapter_5_set/chapter_6_set), but everything else in this file now uses namespaced IDs (worldscolliding:...). Returning the un-namespaced IDs is likely to break dialogue lookup (or at least make IDs inconsistent).
Comment on lines
+68
to
+73
| [[dependencies.${mod_id}]] | ||
| modId="blablalib" | ||
| mandatory=true | ||
| versionRange="${blablalib_version_range}" | ||
| ordering="AFTER" | ||
| side="BOTH" |
| "chapter_1_ask": [ | ||
| { "action": "message", "speaker": 1, "text": "worldscolliding.dialogue.chapter_1_ask.text" }, | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.yes", "action1": "seal_1", "next1": "chapter_1_yes_set", "save1": "chapter_2_set", "option2": "worldscolliding.dialogue.choice.no", "action2": "none", "next2": "chapter_1_no_set", "save2": "chapter_1_ask" } | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.yes", "action1": "seal_1", "next1": "worldscolliding:chapter_1_yes_set", "save1": "worldscolliding:chapter_1_yes_set", "option2": "worldscolliding.dialogue.choice.no", "action2": "none", "next2": "worldscolliding:chapter_1_no_set", "save2": "worldscolliding:chapter_1_ask" } |
| "chapter_5_seal_ask": [ | ||
| { "action": "message", "speaker": 1, "text": "worldscolliding.dialogue.chapter_5_seal_ask.text" }, | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.yes", "action1": "none", "next1": "chapter_5_past_accept_set", "save1": "chapter_5_seal_set", "option2": "worldscolliding.dialogue.choice.no", "action2": "none", "next2": "chapter_5_seal_no_set", "save2": "chapter_5_seal_ask" } | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.yes", "action1": "seal_5", "next1": "worldscolliding:chapter_5_yes_set", "save1": "worldscolliding:chapter_5_yes_set", "option2": "worldscolliding.dialogue.choice.no", "action2": "none", "next2": "worldscolliding:chapter_5_no_set", "save2": "worldscolliding:chapter_5_seal_ask" } |
| "chapter_6_seal_ask": [ | ||
| { "action": "message", "speaker": 1, "text": "worldscolliding.dialogue.chapter_6_seal_ask.text" }, | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.yes", "action1": "seal_6", "next1": "chapter_6_seal_yes_set", "save1": "chapter_7_prologue_set", "option2": "worldscolliding.dialogue.choice.no", "action2": "none", "next2": "chapter_6_seal_no_set", "save2": "chapter_6_seal_ask" } | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.yes", "action1": "seal_6", "next1": "worldscolliding:chapter_6_seal_yes_set", "save1": "worldscolliding:chapter_6_seal_yes_set", "option2": "worldscolliding.dialogue.choice.no", "action2": "none", "next2": "worldscolliding:chapter_6_seal_no_set", "save2": "worldscolliding:chapter_6_seal_ask" } |
| { "action": "message", "speaker": 0, "text": "worldscolliding.dialogue.chapter_6_seal_yes_set.9" }, | ||
| { "action": "message", "speaker": 1, "text": "worldscolliding.dialogue.chapter_6_seal_yes_set.10" }, | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.seal_light", "action1": "none", "next1": "chapter_6_seal_light_set", "save1": "chapter_7_light_set", "option2": "worldscolliding.dialogue.choice.seal_dark", "action2": "none", "next2": "chapter_6_seal_dark_set", "save2": "chapter_7_dark_set" } | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.seal_light", "action1": "none", "next1": "worldscolliding:chapter_6_seal_light_set", "save1": "worldscolliding:chapter_6_seal_light_set", "option2": "worldscolliding.dialogue.choice.seal_dark", "action2": "none", "next2": "worldscolliding:chapter_6_seal_dark_set", "save2": "worldscolliding:chapter_6_seal_dark_set" } |
| { "action": "message", "speaker": 2, "text": "worldscolliding.dialogue.new_game_plus_choice.1" }, | ||
| { "action": "message", "speaker": 2, "text": "worldscolliding.dialogue.new_game_plus_choice.2" }, | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.seal_light", "action1": "none", "next1": "chapter_5_6_seal_light_set", "save1": "chapter_7_light_set", "option2": "worldscolliding.dialogue.choice.seal_dark", "action2": "none", "next2": "chapter_5_6_seal_dark_set", "save2": "chapter_7_dark_set" } | ||
| { "action": "choice", "option1": "worldscolliding.dialogue.choice.seal_light", "action1": "none", "next1": "worldscolliding:chapter_6_seal_light_set", "save1": "worldscolliding:chapter_6_seal_light_set", "option2": "worldscolliding.dialogue.choice.seal_dark", "action2": "none", "next2": "worldscolliding:chapter_6_seal_dark_set", "save2": "worldscolliding:chapter_6_seal_dark_set" } |
Comment on lines
23
to
25
| import net.minecraft.world.level.Level; | ||
| import org.apache.logging.log4j.core.jmx.Server; | ||
| import software.bernie.geckolib.animatable.GeoEntity; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removed the Dialogue System of the mod in favor of our new BlablaLib implementation.
This PR also includes some fixes.