Quark

Quark

143M Downloads

Ancient Tome Add to Mob Drop

cdymrtn opened this issue ยท 0 comments

commented

Minecraft: 1.19.2
Quark: 3.4-418
Forge: 43.4.2

Trying to figure out if its possible to add Ancient Tomes as a mob drop with random enchantments applied to them from the valid enchantments list. I've tried to add them as a drop using a datapack, see the code block below, but I can't seem to get anything to happen with this method. Using ConfigurableExtraMobDrops allows a mob to drop an Ancient Tome but with no enchantments, it just says (Any Enchantment) and does nothing. Is there a function that is usable with NBT data or in a datapack to enchant them?

Datapack Method

{
  "type": "minecraft:entity",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "quark:ancient_tome",
          "weight": 1,
          "quality": 1,
          "functions": [
            {
              "function": "minecraft:enchant_randomly",
              "enchantments": [
                "minecraft:protection",
                "minecraft:silk_touch",
                "minecraft:feather_falling",
                "minecraft:fire_protection",
                "minecraft:sharpness",
                "minecraft:looting",
                "minecraft:fortune"
              ]
            }
          ]
        }
      ]
    }
  ]
}

ConfigurableExtraMobDrop Config - Working Example

'minecraft:zombie' : '{Count:1b,id:"quark:ancient_tome",tag:{StoredEnchantments:[{id:"minecraft:feather_falling",lvl:4s}],dropchance:1.0d}}',

ConfigurableExtraMobDrop Config - Not Working with enchant_randomly but drop blank Ancient Tomes

'minecraft:zombie' : '{Count:1b,id:"quark:ancient_tome",tag:{enchant_randomly:[],dropchance:1.0d}}',

ConfigurableExtraMobDrop Config - Not Working with enchant_randomly but drop blank Ancient Tomes

'minecraft:zombie' : '{Count:1b,id:"quark:ancient_tome",functions:{"function":"enchant_randomly","enchantments":["protection","silk_touch","feather_falling","fire_protection","protection","sharpness","looting","fortune"]},dropchance:1.0d}',