How do i make all torches have fire aspect?

How do i make all torches have fire aspect? - Two People Making fire

I wanted to make all torches (Crafted and found) have fire aspect using commands. I tried some different things but they didn't work out. Does anyone else have any ideas?



Best Answer

Default items have no data of which to detect in order to separate them from custom items. Unfortunately this greatly restricts methods of replacing default items since, for example, /clear would not be able to differentiate your custom torches with default ones.

One work-around is to detect each individual slot in the player's inventory and use /replaceitem, but that requires 64 command blocks for each of the 36 slots just for detection alone.

As a quick run-down:

  1. Find 1 torch in slot 0.

    /scoreboard players set @a TorchSlot0 1 {Inventory:[{id:"minecraft:torch",Count:1b,Slot:0b}]}
    
  2. Replace that torch with 1 custom torch.

    /replaceitem entity @a[score_TorchSlot0_min=1,score_TorchSlot0=1] slot.container.0 minecraft:torch 1 0 {ench:[{id:20s,lvl:1s}]}
    

Which would need to be repeated for every number of torches possible in every slot possible.


If using 1.9, you can customize the loot tables so that the torches that are at least found in chests will have the desired enchantment.

For example, the chests/abandoned_mineshaft.json loot table has the following entry:

{
    "type": "item",
    "name": "minecraft:torch",
    "functions": [
        {
            "function": "set_count",
            "count": {
                "min": 1,
                "max": 16
            }
        }
    ],
    "weight": 15
}

If you want it to be enchanted with fire aspect, you'd add the enchant_randomly function while only specifying minecraft:fire_aspect:

{
    "type": "item",
    "name": "minecraft:torch",
    "functions": [
        {
            "function": "set_count",
            "count": {
                "min": 1,
                "max": 16
            }
        },
        {
            "function": "enchant_randomly",
            "enchantments":[
                "minecraft:fire_aspect"
            ]
        }
    ],
    "weight": 15
}



Pictures about "How do i make all torches have fire aspect?"

How do i make all torches have fire aspect? - Man Holding Burning Torches in the Dark
How do i make all torches have fire aspect? - Photograph of a Man Near Torches
How do i make all torches have fire aspect? - Person Standing and Holding Lamp Inside Cave



How do I get fire aspect enchantment?

Added Fire Aspect, which can be applied to swords. Fire Aspect can now be applied to axes.

Is it possible to get fire Aspect on an axe?

The Fire Aspect enchantment sets your target on fire when you attack. You can add the Fire Aspect enchantment to any sword using an enchanting table, anvil, or game command.

Does fire aspect set you on fire?

A sword enchanted with Fire Aspect III can set an entity on blue soul fire. This can be used in 1.16 or later updates. Soul Fire deals a bit higher damage than normal fire, and also, it looks cool. This enchanted may also be further restricted to the Nether dimension or on Nether mobs.



Minecraft Plugin Spotlight | Fire Aspect Torches by TheWolfBadger




More answers regarding how do i make all torches have fire aspect?

Answer 2

Are you currently playing Minecraft without mods, or with mods? Without mods, you are unable to add an enchant to items such as torches, even with commands or command blocks. There are ways however, to use command blocks to set your target that you hit with a torch on fire but it involves some more complicated programming.

An easier method of setting mobs on fire when you hit them with a torch is to download a mod. One example of a mod that works for you is this one: http://dev.bukkit.org/bukkit-plugins/fire_aspect-torches/

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Mike, Tsepin Цепа, Tsepin Цепа, Jeremy Bishop