YUNGs-Better-Strongholds icon indicating copy to clipboard operation
YUNGs-Better-Strongholds copied to clipboard

Add vanilla loot tables support for the sake of mod compatibility

Open yungnickyoung opened this issue 3 years ago • 1 comments

yungnickyoung avatar Apr 19 '21 19:04 yungnickyoung

An example of a mod where this would be useful is Quark, which injects "Tomes" into the vanilla stronghold library rooms. Also Botania which adds black lotus flowers to various chests

I'm having trouble making a datapack to add in the vanilla loot tables, which would be a possible solution, i've tried a vew variations of the following and failed to change either the grand library or library chest loot:

path: data/betterstrongholds/loot_tables/chests/grand_library.json and also library.json in the same directory| i also tried moving the .jsons into further subdirectories titled stronghold, overworld

the contents of the jsons is:

{
  "type": "minecraft:chest",
  "pools": [
    {
        "rolls": 1,
        "entries": [
            {
                "type": "minecraft:loot_table",
                "name": "minecraft:chests/stronghold_library",
                "weight": 1
            }
        ]
    }
  ]
}

and

{
  "pools": [
      {
          "rolls": 1,
          "entries": [
              {
                  "type": "item",
                  "weight": 1,
                  "name": "minecraft:stick",
                  "functions": [
                      {
                          "function": "set_count",
                          "count": {
                              "min": 1,
                              "max": 5
                          }
                      }
                  ]
              }
          ]
      }
  ]
}

none of which worked, i'm sure I am missing something simple, but could I get some help with the datapack, im guessing its the directory structure where I am going wrong

But definitely a +1 for a config option for vanilla loot tables to increase mod compatability

77wisher77 avatar Sep 10 '22 05:09 77wisher77

This has been added starting in 1.19.

yungnickyoung avatar Mar 01 '23 04:03 yungnickyoung