Override Lost Cities mod loot tables

Started by Ypermat on Mon, 05/30/2022 - 10:53

Topic category: Help with modding (Java Edition)

Last seen on 18:47, 8. Jun 2022
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Override Lost Cities mod loot tables
Mon, 05/30/2022 - 10:54 (edited)

Hello !

This is an hard one.

I would like to override Lost Cities mod loot tables, especially the chests, to add some more useful ressources for a modpack.

I saw that in the mod files (lostcities-1.18-5.1.1.jar\data\lostcities\loot_tables\chests) :

lostcitychest.json

{
  "pools": [
    {
      "name": "lostcities:lostcitychest",
      "rolls": {
        "min": 2,
        "max": 4
      },
      "entries": [
        {
          "type": "item",
          "name": "minecraft:diamond_sword",
          "functions": [
            {
              "function": "set_count",
              "count": {
                "min": 0,
                "max": 1
              }
            }
          ],
          "weight": 2
        },
        {
          "type": "item",
          "name": "minecraft:gold_ingot",
          "functions": [
            {
              "function": "set_count",
              "count": {
                "min": 1,
                "max": 5
              }
            }
          ],
          "weight": 5
        },
        {
          "type": "item",
          "name": "minecraft:diamond",
          "functions": [
            {
              "function": "set_count",
              "count": {
                "min": 1,
                "max": 5
              }
            }
          ],
          "weight": 5
        },
        {
          "type": "item",
          "name": "minecraft:emerald",
          "functions": [
            {
              "function": "set_count",
              "count": {
                "min": 1,
                "max": 3
              }
            }
          ],
          "weight": 5
        }
      ]
    }
  ]
}

But it does not represent what is inside the chests.

I still have tried to do that :

Capture-d-cran

But it did not work...

I found this tutorial-how-make-items-blocks-other-mods-spawn-loot-tables-your-mod but I still does not know how to overwrite the lost cities chests.

Thank you in advance !

Edited by Ypermat on Mon, 05/30/2022 - 10:54
Last seen on 18:47, 8. Jun 2022
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
So I found that there is a…
Mon, 05/30/2022 - 11:18

So I found that there is a lot of loot tables in the \config\lostcities\examples\conditions.json

I assume the mod uses minecraft loot tables too, so do I need to modify all of theses tables ?

{
    "type": "condition",
    "name": "chestloot",
    "values": [
      {
        "factor": 8,
        "value": "lostcities:chests/lostcitychest",
        "range": "4,100"
      },
      {
        "factor": 8,
        "value": "lostcities:chests/lostcitychest",
        "range": "-100,-3"
      },
      {
        "factor": 20,
        "value": "lostcities:chests/raildungeonchest",
        "inpart": "rail_dungeon1"
      },
      {
        "factor": 20,
        "value": "lostcities:chests/raildungeonchest",
        "inpart": "rail_dungeon2"
      },
      {
        "factor": 1,
        "value": "minecraft:chests/buried_treasure"
      },
      {
        "factor": 1,
        "value": "minecraft:chests/desert_pyramid"
      },
      .......
    ]
  }

If so, what should I put in the loot table registery name ?

"chests/lostcitychest" or "lostcities:chests/lostcitychest" ?

And same for the minecraft ones : "chests/buried_treasure" or "minecraft:chests/buried_treasure"

 

----

 

Or can I just change all of the loot tables here to put new of mine ? because this is the Config file.

I think not because this is "examples".

But if so, is this the right way to do it ?

{
  "factor": 1,
  "value": "menethis_zombie_apocalypse:chests/ammochest"
},

Capture-d-cran