User avatar
By Riberto
#212187 Hello,

I have used the new day care and even customize rules with datapack and have some suggestions to improve it. (But describing only one in this ticket as is recommended to split).
The actual message describing item required in requirement is not translated and is “hard coded”. It would be great if it can be auto generated and translatable.

What I have in mind
Use a template for each item, keeping current it would be “{count}x {ItemName}”
(Could be configurable? Settings or maybe lang asset?)
Use a separator in case of multiple items, for example a comma.
(Could be configurable? Settings or maybe lang asset?)
Dynamically generate the full message retrieving the count from the daycare json (requirements.items.amout) and the item name from the relevant lang asset.
(If that’s a problem maybe only for Minecraft and Pixelmon ? And displaying block id for other mods)
And maybe truncate the message if too long.

Code: Select all{
  "spec": "type1:DRAGON",
  "durations": [
      "type": "add",
      "amount": 90,
      "unit": "MINUTES"
  "requirements": [
      "type": "itemstack",
      "error_message": "1x Diamond Block",
      "items": [
          "item": "minecraft:diamond_block",
          "amount": 1
          "item": "minecraft:end_stone",
          "amount": 3

Generated message:
  • “1x Diamond Block, 3x End Stone” in English
  • “1x Bloc de Diamant, 3x Pierre de l’End” in French

Pro & Cons
  • Message would easier to understand when not playing in English
  • On a same server we could have the message in multiples language (vs only the one in the file actually)
  • When using other mods items message would be “ugly”

I think this one can be managed maybe with a naming convention to a custom asset, somethings like “pixelmon.daycare.items.modid.itemid” in a resource pack ? Or otherwise keeping the actual “error_message” in day care JSON to override the auto generated message on need. (So, make the parameter optional)

Best regards,