Hex Casting

Hex Casting

7M Downloads

Adding Ancient Scrolls to other chests doesn't seem to work?

ZeekDaGeek opened this issue ยท 2 comments

commented

Modloader

Forge

Minecraft version

1.19.2

Hex Casting version

0.10.3

Modloader version

43.3.7

Modpack info

No response

The latest.log file

No response

Issue description

Doesn't seem like adding chest loot tables to the config works properly. Adding them to the config will not make them generate in the loot table.

This is a problem if Integrated Strongholds is installed which replaces the minecraft:chests/stronghold_library with integrated_stronghold:chests/grand_library.

There are also mods that add variety to villages and dungeons that may cause issues as well.

Steps to reproduce

Start with a simple Hex Casting only environment. We'll add it to the Igloo loot_table since it doesn't require any additional mods.

Here's the config for adding the

["Scrolls in Loot"]
	#Which loot tables should a small number of Ancient Scrolls be injected into?
	fewScrollTables = ["minecraft:chests/jungle_temple", "minecraft:chests/simple_dungeon", "minecraft:chests/village/village_cartographer"]
	#Which loot tables should a decent number of Ancient Scrolls be injected into?
	someScrollTables = ["minecraft:chests/bastion_treasure", "minecraft:chests/shipwreck_map"]
	#Which loot tables should a huge number of Ancient Scrolls be injected into?
	manyScrollTables = ["minecraft:chests/stronghold_library", "minecraft:chests/igloo_chest"]

Summon a chest in a create test world with /give @p minecraft:chest{BlockEntityTag:{LootTable:"minecraft:chests/igloo_chest"}}

Place down the chests and notice that there is no scrolls.

I also attempted using the datapack structure from https://github.com/FallingColors/HexMod/blob/3a3baddb92248b48d9819e595f1dec7959d3be1d/Forge/src/generated/resources/data/hexcasting/loot_modifiers/lore/minecraft/chests/stronghold_library.json

I created a datapack with data\hexcasting\loot_modifiers\scroll\integrated_stronghold\chests\grand_library.json

{
  "type": "hexcasting:inject_scrolls",
  "conditions": [
    {
      "condition": "forge:loot_table_id",
      "loot_table_id": "integrated_stronghold:chests/grand_library"
    }
  ],
  "countRange": 5
}

But this doesn't work.

Other information

After talking with Sam in Discord it seems like a recent Merge resolves some of these issues #837

This would make it possible to make custom datapacks, but I do really appreciate the ability to put specific loot tables into a config because making a datapack to edit configs is very annoying and per world.

This may be a TODO of updating how scrolls are injected into chest loot.

commented

Note that several mods do exist for adding datapacks globally: https://modrinth.com/collection/QZ3zVVGE

commented

Alright, a slight change to the suggestion then, it appears that the new #837 ItemScroll.java handles scrolls without patterns, but you still need to specify a known Pattern name. Making a Datapack to add chest loot or alternative sources of the scrolls would be a lot easier with a defined Loot Table that has all of the possible Ancient Scrolls, instead of having to define each one individually with no ability to tell if a mod was added or removed by the player.

Edit:
And possibly a version for op_id: _ANY for a single item that is any possible scroll, and op_id: _LOCKED which generated one that has not been unlocked yet.

Example:

  "pools": [
    {
      "rolls": 0,
      "entries": [
        {
          "type": "minecraft:loot_table",
          "value": "hexcasting:scrolls/all"
        }
      ]
    },
  ],

VS:

    {
      "rolls": 0,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "hexcasting:scroll",
          "functions": [
            {
              "function": "minecraft:set_custom_data",
              "tag": {
                "op_id": "pattern1"
              }
            }
          ],
          "conditions": []
        },
        {
          "type": "minecraft:item",
          "name": "hexcasting:scroll",
          "functions": [
            {
              "function": "minecraft:set_custom_data",
              "tag": {
                "op_id": "pattern2"
              }
            }
          ],
          "conditions": []
        },
        {
          "type": "minecraft:item",
          "name": "hexcasting:scroll",
          "functions": [
            {
              "function": "minecraft:set_custom_data",
              "tag": {
                "op_id": "pattern3"
              }
            }
          ],
          "conditions": []
        },

        ...

      ],
      "functions": []
    }