Skip to content

Blablalib implementation - #11

Merged
GCJOJO merged 9 commits into
devfrom
blablalib-implementation
Jun 5, 2026
Merged

Blablalib implementation#11
GCJOJO merged 9 commits into
devfrom
blablalib-implementation

Conversation

@GCJOJO

@GCJOJO GCJOJO commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Removed the Dialogue System of the mod in favor of our new BlablaLib implementation.

This PR also includes some fixes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json sets/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 the chapters list (and doesn't exist in dialogues.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.

Comment thread src/main/resources/assets/worldscolliding/dialogues.json Outdated
Comment thread src/main/resources/assets/worldscolliding/dialogues.json
Comment thread src/main/resources/assets/worldscolliding/dialogues.json
Comment thread src/main/resources/assets/worldscolliding/dialogues.json
Comment thread src/main/resources/assets/worldscolliding/dialogues.json
Comment thread src/main/java/fr/gcjojo/worldscolliding/events/ModEvents.java
Comment thread src/main/java/fr/gcjojo/worldscolliding/events/ModEvents.java
Comment thread src/main/java/fr/gcjojo/worldscolliding/entity/ScourgeEntity.java
Comment thread src/main/java/fr/gcjojo/worldscolliding/entity/ScourgeEntity.java
@GCJOJO
GCJOJO requested a review from Copilot June 5, 2026 12:45
@GCJOJO
GCJOJO merged commit ddb8fbc into dev Jun 5, 2026
2 checks passed
@GCJOJO
GCJOJO deleted the blablalib-implementation branch June 5, 2026 12:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 includes chapter_5_past_set, but the JSON defines chapter_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;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants