Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ancient Tome Add to Mob Drop #5043

Open
cdymrtn opened this issue Sep 4, 2024 · 0 comments
Open

Ancient Tome Add to Mob Drop #5043

cdymrtn opened this issue Sep 4, 2024 · 0 comments
Labels
version: 1.19 Version: Minecraft 1.19.x

Comments

@cdymrtn
Copy link

cdymrtn commented Sep 4, 2024

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}',
@github-actions github-actions bot added the version: 1.19 Version: Minecraft 1.19.x label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version: 1.19 Version: Minecraft 1.19.x
Projects
None yet
Development

No branches or pull requests

1 participant