1

I just found out how to make a working loot table and already made it generate custom potions and the like, but I cannot make it generate this enchanted sword. I believe it's because I'm using a 1.12 format instead of 1.13. Anyone can help me update this?

            {
                "type": "item",
                "weight": 5,
                "name": "minecraft:iron_sword",
                "quality": 5,
                "functions": [
                    {
                        "function": "enchant_randomly",
                        "enchantments": [
                            "smite"
                        ]
                    },
                    {
                        "function": "set_damage",
                        "damage": {
                            "min": 0.2,
                            "max": 0.8
                        }
                    },
                    {
                        "function": "set_nbt",
                        "tag": "{display:{Name:\"{\\\"text\\\":\\\"The Zombie Smiter\\\",\\\"color\\\":\\\"gold\\\",\\\"bold\\\":\\\"true\\\"}\",Lore:[\"Go bash some undead\"]}}}"
                    }
                ]
            },

1 Answer 1

1

Just found a way to bypass the need of this version adding enchanted weapons, by adding the enchantment in the tag string instead of a string of its own. Loot table looks like this now

{
"pools": [
    {
        "rolls": {
            "min": 2,
            "max": 6
        },
        "bonus_rolls": {
            "min": 2,
            "max": 3
        },
        "entries": [
            {
                "type": "item",
                "weight": 1,
                "name": "minecraft:iron_axe",
                "functions": [
                    {
                        "function": "set_damage",
                        "damage": {
                            "min": 0.15,
                            "max": 0.65
                        }
                    },
                    {
                        "function": "set_nbt",
                        "tag": "{display:{Name:\"{\\\"text\\\":\\\"The Zombie Cleaver\\\",\\\"color\\\":\\\"dark_green\\\",\\\"bold\\\":\\\"true\\\"}\"},Enchantments:[{id:\"minecraft: smite\",lvl:8}]}"
                    }
                ]
            }
        ]
    }
]

}

1
  • You can mark your own answer as accepted using the checkmark to indicate that it solved the problem. Aug 2, 2018 at 22:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .