Skip to content

Commit

Permalink
feat: detect ritual start with no pentacle and send hint in chat
Browse files Browse the repository at this point in the history
Closes #875
  • Loading branch information
klikli-dev committed Jan 14, 2023
1 parent 165c52f commit 046ecbc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/generated/resources/assets/occultism/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1354,6 +1354,7 @@
"ritual.occultism.familiar_parrot.interrupted": "Summoning of parrot familiar interrupted.",
"ritual.occultism.familiar_parrot.started": "Started summoning parrot familiar.",
"ritual.occultism.pentacle_help": "§lInvalid pentacle!§r\nWere you trying to create pentacle: %s? Missing:\n%s",
"ritual.occultism.pentacle_help.no_pentacle": "§lNo pentacle found!§r\nIt seems you did not draw a pentacle, or your pentacle is missing large parts. See the \"Rituals\" section of the Dictionary of Spirits, the required Pentacle will be a clickable blue link above the ritual recipe on the ritual's page.",
"ritual.occultism.pentacle_help_at_glue": " at position ",
"ritual.occultism.possess_enderman.conditions": "Not all requirements for this ritual are met.",
"ritual.occultism.possess_enderman.finished": "Summoned possessed enderman successfully.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,17 @@ private static boolean helpWithPentacle(Level level, BlockPos pos, Player player
}

if (bestPentacleDiff != null && !bestPentacleDiff.isEmpty() && bestPentacleDiff.size() < 4) {
//tell player which pentacle he was probably trying to build
player.displayClientMessage(
Component.translatable("ritual." + Occultism.MODID + ".pentacle_help",
Component.translatable(Util.makeDescriptionId("multiblock", bestMatch.getId())), pentacleDiffToComponent(bestPentacleDiff)),
false);
return true;
} else if(bestPentacleDiff != null && !bestPentacleDiff.isEmpty()) {
//player probably doesn't have a pentacle at all
player.displayClientMessage(
Component.translatable("ritual." + Occultism.MODID + ".pentacle_help.no_pentacle"), false);
return true;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ private void addGuiTranslations() {
private void addRitualMessages() {
this.add("ritual.occultism.pentacle_help", "\u00a7lInvalid pentacle!\u00a7r\nWere you trying to create pentacle: %s? Missing:\n%s");
this.add("ritual.occultism.pentacle_help_at_glue", " at position ");
this.add("ritual.occultism.pentacle_help.no_pentacle", "\u00a7lNo pentacle found!\u00a7r\nIt seems you did not draw a pentacle, or your pentacle is missing large parts. See the \"Rituals\" section of the Dictionary of Spirits, the required Pentacle will be a clickable blue link above the ritual recipe on the ritual's page.");
this.add("ritual.occultism.ritual_help", "\u00a7lInvalid ritual!\u00a7r\nWere you trying to perform ritual: \"%s\"? Missing items:\n%s");
this.add("ritual.occultism.disabled", "This ritual is disabled on this server.");
this.add("ritual.occultism.does_not_exist", "\u00a7lUnknown ritual\u00a7r. Make sure the pentacle & ingredients are set up correctly. If you are still unsuccessful join our discord at https://invite.gg/klikli");
Expand Down

0 comments on commit 046ecbc

Please sign in to comment.