/ ========== TOOLS & ARMOR ==========


/ all wood, stone and gold tools
group(ID=wooden_sword;ID=wooden_shovel;ID=wooden_pickaxe;ID=wooden_axe;ID=wooden_hoe)@luck=0
group(ID=stone_sword;ID=stone_shovel;ID=stone_pickaxe;ID=stone_axe;ID=stone_hoe)@luck=0
group(ID=golden_sword;ID=golden_shovel;ID=golden_pickaxe;ID=golden_axe;ID=golden_hoe)@luck=1

/ 2-3 iron tools
group:#rand(2,3):(ID=iron_shovel;ID=iron_pickaxe;ID=iron_axe;ID=iron_sword;ID=iron_hoe)@luck=1

/ 1-2 diamond tools
group:#rand(1,2):(ID=diamond_sword;ID=diamond_shovel;ID=diamond_pickaxe;ID=diamond_axe;ID=diamond_hoe)@luck=2@chance=0.92

/ 2-3 chain and iron armor
group:#rand(2,3):(ID=chainmail_helmet;ID=chainmail_chestplate;ID=chainmail_leggings;ID=chainmail_boots)@luck=2
group:#rand(2,3):(ID=iron_helmet;ID=iron_chestplate;ID=iron_leggings;ID=iron_boots;ID=iron_horse_armor)@luck=1

/ 1-2 diamond armor
group:#rand(1,2):(ID=diamond_helmet;ID=diamond_chestplate;ID=diamond_leggings;ID=diamond_boots;ID=diamond_horse_armor)@luck=2

/ all horse armor
group(ID=iron_horse_armor;ID=golden_horse_armor;ID=diamond_horse_armor)@luck=2

/ all gold armor
group(ID=golden_helmet;ID=golden_chestplate;ID=golden_leggings;ID=golden_boots;ID=golden_horse_armor)@luck=1

/hammers
group:#rand(1,2):(ID=golden_axe;ID=iron_axe;ID=netherite_axe)@luck=0

/ crossbow and arrows
group(ID=crossbow;ID=arrow,amount=#rand(16,32))@luck=1

/ ========== BLOCKS ==========

/fire
type=block,ID=fire@luck=-1
type=entity,ID=falling_block,amount=#rand(5,10),posOffset=#circleOffset(#rand(1,5)),NBTTag=(BlockState=(Name=fire),Fuse=50b,Motion=#randLaunchMotion)@luck=-1
type=entity,ID=falling_block,amount=#rand(5,10),posOffset=#circleOffset(#rand(10,25)),NBTTag=(BlockState=(Name=fire),Fuse=50b,Motion=#randLaunchMotion)@luck=-2
type=entity,ID=falling_block,amount=#rand(5,12),posOffset=#circleOffset(#rand(1,5)),NBTTag=(BlockState=(Name=lava),Fuse=50b,Motion=#randLaunchMotion)@luck=-2
type=fill,ID=fire,size=(2,2,2)@luck=-1
type=fill,ID=fire,size=(3,3,3)@luck=-1
type=fill,ID=fire,size=(4,4,4)@luck=-2
type=fill,ID=fire,size=(7,7,7)@luck=-2@chance=0.5
type=fill,ID=fire,size=(9,9,9)@luck=-2@chance=0.25
type=block,ID=fire,amount=#rand(8,16),posOffset=#circleOffset(#randList(1,2,4,6,8))@luck=-1
type=block,ID=fire,amount=#rand(16,40),posOffset=#circleOffset(#randList(1,2,4,6,8))@luck=-2
type=block,ID=fire,amount=#rand(36,128),posOffset=#circleOffset(#rand(1,15))@luck=-2
type=entity,ID=falling_block,amount=#rand(6,13),posOffset=#circleOffset(#rand(1,5)),NBTTag=(BlockState=(Name=fire),Fuse=50b,Motion=#randLaunchMotion)@luck=-1
type=entity,ID=falling_block,amount=#rand(12,25),posOffset=#circleOffset(#rand(1,5)),NBTTag=(BlockState=(Name=fire),Fuse=50b,Motion=#randLaunchMotion)@luck=-2
type=entity,ID=falling_block,amount=#rand(20,60),posOffset=#circleOffset(#rand(1,5)),NBTTag=(BlockState=(Name=fire),Fuse=50b,Motion=#randLaunchMotion)@luck=-2


/campfire
ID=campfire@luck=0

/nether
ID=netherrack,amount=32@luck=0

/jack on fire
group(type=block,ID=fire,amount=#rand(10,40),posOffset=#circleOffset(#rand(1,10));type=block,ID=jack_o_lantern,amount=#rand(4,9),posOffset=#circleOffset(#rand(0,6)))@luck=-1

/crying obsidian
ID=crying_obsidian,amount=#rand(6,16)@luck=1

/string trap
type=fill,ID=string,size=(7,7,7)@luck=-1

/ chests
type=block,ID=chest,tileEntity=(Items=#chestLootTable("chests/bastion_bridge"))@luck=0
type=block,ID=chest,tileEntity=(Items=#chestLootTable("chests/bastion_hoglin_stable"))@luck=1
type=block,ID=chest,tileEntity=(Items=#chestLootTable("chests/bastion_other"))@luck=1
type=block,ID=chest,tileEntity=(Items=#chestLootTable("chests/bastion_treasure"))@luck=1


/ ========= ITEMS ==========

/nuggets
ID=iron_nugget,amount=#rand(20,64)@luck=-1
ID=gold_nugget,amount=#rand(40,128)@luck=0
ID=gold_nugget,amount=#rand(64,420)@luck=1

/ingots
ID=iron_ingot,amount=#rand(8,18)@luck=1
ID=gold_ingot,amount=#rand(8,18)@luck=1
ID=gold_ingot,amount=#rand(16,56)@luck=2
ID=netherite_ingot@luck=2@chance=0.8

/diamonds
ID=diamond,amount=#rand(2,6)@luck=2
ID=diamond,amount=#rand(6,13)@luck=2@chance=0.7

/scraps
ID=netherite_scrap,amount=#rand(1,5)@luck=2

/quartz
ID=quartz,amount=#rand(16,44)@luck=0

/golden carrot
ID=golden_carrot,amount=10@luck=1

/golden apple
ID=golden_apple,amount=2@luck=2

/enchanted golden apple
ID=enchanted_golden_apple@luck=2@chance=0.5

/blaze rod
ID=blaze_rod@luck=-1

/nether star
ID=nether_star@luck=2@chance=0.8

/fire charge
ID=fire_charge,amount=#rand(8,16)@luck=0

/firework rocket
ID=firework_rocket,amount=#rand(8,16)@luck=0

/fire resistance potions
ID=potion,amount=#rand(1,2),NBTTag=(Potion="fire_resistance")@luck=1
ID=potion,amount=#rand(1,2),NBTTag=(Potion="long_fire_resistance")@luck=2

/fire resistance arrows
ID=tipped_arrow,amount=#rand(8,16),NBTTag=(Potion="fire_resistance")@luck=0
ID=tipped_arrow,amount=#rand(8,16),NBTTag=(Potion="long_fire_resistance")@luck=1

/spectral arrows
ID=spectral_arrow,amount=#rand(5,10)@luck=1


/rose
ID=wither_rose,NBTTag=(display=(Name=#jsonStr(text="Romantic Rose",color=dark_red)))@luck=-1

/torch
ID=torch,amount=128@luck=1

/fire wheel
ID=redstone_block,NBTTag=(display=(Name=#jsonStr(text="Fire Wheel",color=dark_red)))@luck=0

/cooked foods
group:#rand(1,3):(ID=cooked_cod,amount=#rand(8,20);ID=cooked_salmon,amount=#rand(8,20);ID=cooked_rabbit,amount=#rand(8,20);ID=cooked_mutton,amount=#rand(8,20);ID=cooked_chicken,amount=#rand(8,20);ID=cooked_beef,amount=#rand(8,20))@luck=0


/ ========== GROUPS ==========

/ netherrack combo
group(ID=soul_sand,amount=#rand(20,48);ID=netherrack,amount=#rand(16,32);ID=nether_gold_ore,amount=#rand(8,20);ID=nether_gold_ore,amount=#rand(12,24))@luck=0

/nether brick set
group(ID=nether_bricks,amount=#rand(8,24);ID=nether_brick,amount=#rand(16,64))@luck=0

/quartz block set
group(ID=quartz_block,amount=#rand(8,24);ID=quartz,amount=#rand(16,64))@luck=1

/nether wart growing set
group(type=block;ID=soul_sand,ID=nether_wart,amount=#rand(5,10))@luck=1

/dark stones set
group(ID=blackstone,amount=#rand(12,32);ID=deepslate,amount=#rand(24,56);ID=tuff,amount=#rand(8,20))@luck=0

/fire corals set
group(ID=fire_coral_block,amount=#rand(8,16);ID=fire_coral,amount=#rand(16,64))@luck=0

/bows and fire resistance arrows
group(ID=bow;ID=tipped_arrow,amount=#rand(8,24),NBTTag=(Potion="fire_resistance"))@luck=1

/torches
group(ID=torch,amount=#rand(32,64);ID=redstone_torch,amount=#rand(8,24);ID=fire_charge,amount=#rand(4,12))@luck=0

/brewing combo
group(ID=magma_cream,amount=#rand(3,7);ID=blaze_powder,amount=#rand(4,9);ID=blaze_rod,amount=#rand(2,4))@luck=1

/enchantment books
ID=enchanted_book,NBTTag=(StoredEnchantments=#randEnchantment),amount=#rand(5,10)@luck=1



/ ========== ENTITIES ==========

/magma cubes
type=entity,ID=magma_cube,amount=#rand(1,4)@luck=-1
type=entity,ID=magma_cube,amount=#rand(3,9)@luck=-2

/ghasts
type=entity,ID=ghast,amount=#rand(1,3)@luck=-1
type=entity,ID=ghast,amount=#rand(2,5)@luck=-2

/blazes
type=entity,ID=blaze,amount=#rand(1,4)@luck=-1
type=entity,ID=blaze,amount=#rand(3,9)@luck=-2

/fire stalfos
group(type=difficulty,ID=hard;type=entity,ID=skeleton,amount=#rand(4,9),NBTTag=(
    HandItems=[(id=lucky:elefire_lucky_sword,Count=1,tag=(Enchantments=#luckySwordEnchantments))],
    ArmorItems=[(id=golden_boots,Count=1,tag=(Enchantments=#luckyBootsEnchantments)),(id=golden_leggings,Count=1,tag=(Enchantments=#luckyLeggingsEnchantments)),(id=golden_chestplate,Count=1,tag=(Enchantments=#luckyChestplateEnchantments)),(id=golden_helmet,Count=1,tag=(Enchantments=#luckyHelmetEnchantments))],
    HandDropChances=[0.05f,0f],ArmorDropChances=[0.03f,0.03f,0.03f,0.03f],
    CustomName=#jsonStr(text="Fire Stalfo",color=orange,bold=true),CustomNameVisible=true)
)@luck=-1

/fire bros
group(type=difficulty,ID=hard;type=entity,ID=blaze,amount=#rand(2,8),NBTTag=(
    HandItems=[(id=golden_sword,Count=1,tag=(Enchantments=#luckySwordEnchantments))],
    ArmorItems=[(id=golden_boots,Count=1,tag=(Enchantments=#luckyBootsEnchantments)),(id=golden_leggings,Count=1,tag=(Enchantments=#luckyLeggingsEnchantments)),(id=golden_chestplate,Count=1,tag=(Enchantments=#luckyChestplateEnchantments)),(id=golden_helmet,Count=1,tag=(Enchantments=#luckyHelmetEnchantments))],
    HandDropChances=[0.05f,0f],ArmorDropChances=[0.03f,0.03f,0.03f,0.03f],
    CustomName=#jsonStr(text="Fire Bro",color=orange,bold=true),CustomNameVisible=true)
)@luck=-2

/fire bob
group(type=difficulty,ID=hard;type=entity,ID=zombie,NBTTag=(
    HandItems=[(id=lucky:elefire_lucky_sword,Count=1,tag=(Enchantments=#luckySwordEnchantments))],
    ArmorItems=[(id=netherite_boots,Count=1,tag=(Enchantments=#luckyBootsEnchantments)),(id=netherite_leggings,Count=1,tag=(Enchantments=#luckyLeggingsEnchantments)),(id=netherite_chestplate,Count=1,tag=(Enchantments=#luckyChestplateEnchantments)),(id=netherite_helmet,Count=1,tag=(Enchantments=#luckyHelmetEnchantments))],
    HandDropChances=[0.1f,0f],ArmorDropChances=[0.1f,0.1f,0.1f,0.1f],
    CustomName=#jsonStr(text="Fire Bob",color=blue,bold=true),CustomNameVisible=true)
)@luck=-2

/ black horse
type=entity,ID=horse,amount=#rand(1,4),posOffset=#circleOffset(4),NBTTag=(Variant=1029,Tame=true,Owner=#pUUIDArray)@luck=1

/ blaze fire ball
type=entity,ID=small_fireball,amount=#rand(2,7)@luck=-1

/ ghast fire ball
type=entity,ID=fireball,amount=#rand(2,7)@luck=-2

/ dragon fire ball
type=entity,ID=dragon_fireball,amount=#rand(1,3)@luck=-2@chance=0.9

/ fiery villagers
type=entity,ID=villager,NBTTag=(
    VillagerData=(level=3,profession=toolsmith,type=savanna),
    Offers=(Recipes=[
        (buy=(id=diamond,Count=#rand(20,25)),sell=(id=lucky:elefire_lucky_sword,Count=1,tag=(Enchantments=#luckySwordEnchantments,display=(Name=#jsonStr(text="Heat Blade",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(20,25)),sell=(id=lucky:elefire_lucky_bow,Count=1,tag=(Enchantments=#luckyBowEnchantments,display=(Name=#jsonStr(text="Heat Blaster",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(10,15)),sell=(id=warped_fungus_on_a_stick,Count=1,tag=(Enchantments=#luckyFishingRodEnchantments,display=(Name=#jsonStr(text="Lucky Fungus Rod",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(20,40)),sell=(id=potion,Count=1,tag=(Potion="fire_resistance",CustomPotionEffects=#luckyPotionEffects,display=(Name=#jsonStr(text="Lucky Potion",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(20,40)),sell=(id=splash_potion,Count=1,tag=(Potion="harming",CustomPotionEffects=#unluckyPotionEffects,display=(Name=#jsonStr(text="Unlucky Potion",color=red,bold=true)))),maxUses=1)
    ]),
    CustomName=#jsonStr(text="Fiery",color=red,bold=true),CustomNameVisible=true
)@luck=1

type=entity,ID=villager,NBTTag=(
    VillagerData=(level=3,profession=toolsmith,type=savanna),
    Offers=(Recipes=[
        (buy=(id=diamond,Count=#rand(12,17)),sell=(id=netherite_helmet,Count=1,tag=(Enchantments=#luckyHelmetEnchantments,display=(Name=#jsonStr(text="Fiery Helmet",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(20,25)),sell=(id=netherite_chestplate,Count=1,tag=(Enchantments=#luckyChestplateEnchantments,display=(Name=#jsonStr(text="Fiery Chestplate",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(15,20)),sell=(id=netherite_leggings,Count=1,tag=(Enchantments=#luckyLeggingsEnchantments,display=(Name=#jsonStr(text="Fiery Leggings",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(12,17)),sell=(id=netherite_boots,Count=1,tag=(Enchantments=#luckyBootsEnchantments,display=(Name=#jsonStr(text="Fiery Boots",color=red,bold=true)))),maxUses=1)
    ]),
    CustomName=#jsonStr(text="Fiery",color=red,bold=true),CustomNameVisible=true
)@luck=1

type=entity,ID=villager,NBTTag=(
    VillagerData=(level=3,profession=toolsmith,type=savanna),
    Offers=(Recipes=[
        (buy=(id=diamond,Count=#rand(10,15)),sell=(id=golden_shovel,Count=1,tag=(Enchantments=#luckyToolEnchantments,display=(Name=#jsonStr(text="Fiery Shovel",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(15,20)),sell=(id=golden_pickaxe,Count=1,tag=(Enchantments=#luckyToolEnchantments,display=(Name=#jsonStr(text="Fiery Pickaxe",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(15,20)),sell=(id=golden_axe,Count=1,tag=(Enchantments=#luckyAxeEnchantments,display=(Name=#jsonStr(text="Fiery Axe",color=red,bold=true)))),maxUses=1),
        (buy=(id=diamond,Count=#rand(10,15)),sell=(id=golden_hoe,Count=1,tag=(Enchantments=#luckyToolEnchantments,display=(Name=#jsonStr(text="Fiery Hoe",color=red,bold=true)))),maxUses=1)
    ]),
    CustomName=#jsonStr(text="Fiery",color=red,bold=true),CustomNameVisible=true
)@luck=1

/ ========== STRUCTURES ==========

/fire overlay
group(type=command,ID="/fill ~10 ~10 ~10 ~-10 ~-10 ~-10 fire replace air";type=message,ID="$4$lReady to burn!")@luck=-2


/fire explosions
type=explosion,radius=3,fire=true@luck=-1
type=explosion,radius=4,fire=true@luck=-1
type=explosion,radius=6,fire=true@luck=-2
type=explosion,radius=8,fire=true@luck=-2@chance=0.5

/falling iron
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(BlockState=(Name=iron_block));type=particle,ID=large_smoke,size=(1,2,1),particleAmount=500;type=sound,ID=block.fire.extinguish)@luck=0

/falling gold
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(BlockState=(Name=gold_block));type=particle,ID=flame,size=(1,2,1),particleAmount=500;type=sound,ID=entity.ghast.shoot)@luck=0

/falling lodestone
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(BlockState=(Name=lodestone));type=particle,ID=happy_villager,size=(1,2,1),particleAmount=500;type=sound,ID=block.grass.break)@luck=1

/falling respawn anchor
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(BlockState=(Name=respawn_anchor));type=particle,ID=splash,size=(1,2,1),particleAmount=1000;type=sound,ID=entity.player.swim)@luck=0

/falling debris
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(BlockState=(Name=ancient_debris));type=entity,ID=lightning_bolt)@luck=2


/nether gold ore
group(type=fill,ID=air,size=(1,51,1);
    group(
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+5;
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+10;
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+15;
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+20;
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+25;
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+30;
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+35;
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+40;
        NBTTag=(BlockState=(Name=nether_gold_ore)),posY=#bPosY+45
    ),type=entity,ID=falling_block;
    type=entity,ID=falling_block,NBTTag=(BlockState=(Name=lucky:lucky_block)),posY=#bPosY+50;
    type=entity,ID=lightning_bolt,posY=#bPosY+10,delay=5.3
)@luck=0

/magma
group(type=fill,ID=air,size=(1,51,1);
    group(
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+5;
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+10;
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+15;
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+20;
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+25;
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+30;
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+35;
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+40;
        NBTTag=(BlockState=(Name=magma_block)),posY=#bPosY+45
    ),type=entity,ID=falling_block;
    type=entity,ID=falling_block,NBTTag=(BlockState=(Name=lucky:elefire_lucky_block)),posY=#bPosY+50;
    type=entity,ID=lightning_bolt,posY=#bPosY+10,delay=5.3
)@luck=0

/obsidian with end crystal
group(type=fill,ID=air,size=(1,51,1);
    group(
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+5;
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+10;
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+15;
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+20;
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+25;
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+30;
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+35;
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+40;
        NBTTag=(BlockState=(Name=obsidian)),posY=#bPosY+45
    ),type=entity,ID=falling_block;
    type=entity,ID=falling_block,NBTTag=(BlockState=(Name=end_crystal)),posY=#bPosY+50
)@luck=0

/ lava cage
group(
    type=structure,ID=cage,pos=#pPos,rotation=#pDirect;
    type=block,ID=lava,pos=(#pPosX,#pPosY+3,#pPosZ)
)@luck=-2

/ lava pit
group(
    type=fill,ID=air,size=(3,20,3),pos=(#pPosX-1,#pPosY-20,#pPosZ-1);
    type=fill,ID=lava,size=(3,1,3),pos=(#pPosX-1,#pPosY-20,#pPosZ-1);
    type=fill,ID=cobweb,size=(3,1,3),pos=(#pPosX-1,#pPosY-19,#pPosZ-1)
)@luck=-2

/pmd fire hut
type=structure,ID=elefire_firehut@luck=0

/fire ring
group(type=entity,ID=wither_skeleton,amount=#rand(1,3);type=structure,ID=elefire_firering)@luck=-2

/mlss fire temple (lucky)
type=structure,ID=elefire_firetemple#rand(1,20)@luck=2

/sims bbq
type=structure,ID=elefire_bbq@luck=0

/ wishing wells
group(
    type=structure,ID=elefire_wellfire;type=message,ID="A wishing well? Maybe you should throw in a coin...";
    type=command,ID=/give #pName gold_nugget{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\"}"}};
    type=block,ID=lucky:lucky_block,posY=#bPosY-3,NBTTag=(Drops=["group(
        type=message,ID=\"$bYour wish came true!\";
        type=block,ID=air,posY='#'bPosY+3;
        type=block,ID=beacon,posY='#'bPosY+2;
        type=entity,ID=firework_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=firework_rocket,Count=1,tag='#'randFireworksRocket)),amount=20,posY='#'bPosY+3,posOffset='#'circleOffset(2);
        ID=iron_ingot,amount=#rand(24,36),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=gold_ingot,amount=#rand(20,28),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=diamond,amount=#rand(12,20),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=netherite_scrap,amount=#rand(0,10),posY='#'bPosY+10,posOffset='#'circleOffset(2)
    )"])
)@luck=2

group(
    type=structure,ID=elefire_wellfire;type=message,ID="A wishing well? Maybe you should throw in a coin...";
    type=command,ID=/give #pName gold_nugget{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\"}"}};
    type=block,ID=lucky:lucky_block,posY=#bPosY-3,NBTTag=(Drops=["group(
        type=message,ID=\"$4Your hot wish came true!)\";
        type=block,ID=air,posY='#'bPosY+3;
        type=block,ID=beacon,posY='#'bPosY+2;
        ID=blaze_powder,amount=#rand(12,24),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=fire_charge,amount=#rand(10,20),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=lucky:elefire_lucky_potion,amount=#rand(6,12),posY='#'bPosY+10,posOffset='#'circleOffset(2)
    )"])
)@luck=1

/ wishing wells
group(
    type=structure,ID=elefire_wellfire;type=message,ID="A wishing well? Maybe you should throw in a coin...";
    type=command,ID=/give #pName gold_nugget{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\"}"}};
    type=block,ID=lucky:lucky_block,posY=#bPosY-3,NBTTag=(Drops=["group(
        type=message,ID=\"$eYour materials wish came true!\";
        type=block,ID=air,posY='#'bPosY+3;
        type=block,ID=beacon,posY='#'bPosY+2;
        type=entity,ID=firework_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=firework_rocket,Count=1,tag='#'randFireworksRocket)),amount=20,posY='#'bPosY+3,posOffset='#'circleOffset(2);
        ID=blaze_powder,amount=#rand(6,16),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=magma_cream,amount=#rand(3,12),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=blaze_rod,amount=#rand(2,8),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=ghast_tear,amount=#rand(1,5),posY='#'bPosY+10,posOffset='#'circleOffset(2)
    )"])
)@luck=1



group(
    type=structure,ID=elefire_wellfire;
    type=message,ID="A wishing well? Maybe you should throw in a coin...";
    type=command,ID=/give #pName gold_nugget{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\"}"}};
    type=block,ID=lucky:lucky_block,posY=#bPosY-3,NBTTag=(Drops=["group(
        type=message,ID=\"$4Your burning wish came true!\";
        type=block,ID=air,posY='#'bPosY+3;
        type=block,ID=beacon,posY='#'bPosY+2;
        type=entity,ID=blaze,posOffset='#'circleOffset(#rand(1,5)),amount=#rand(4,9);
		type=entity,ID=falling_block,amount=#rand(8,20),posOffset=#circleOffset(#rand(1,5)),NBTTag=(BlockState=(Name=fire),Fuse=50b,Motion=#randLaunchMotion)
	    type=entity,ID=ghast,posY='#'bPosY+#rand(6,12),posOffset='#'circleOffset(#rand(4,15)),amount=#rand(1,4)
    )"])
)@luck=-1

group(
    type=structure,ID=elefire_wellfire;
    type=message,ID="A wishing well? Maybe you should throw in a coin...";
    type=command,ID=/give #pName gold_nugget{display:{Name:"{\"text\":\"Coin\",\"color\":\"gold\"}"}};
    type=block,ID=lucky:lucky_block,posY=#bPosY-3,NBTTag=(Drops=["group(
        type=message,ID=\"$4Your death wish came true!\";
        type=block,ID=air,posY='#'bPosY+3;
        type=block,ID=beacon,posY='#'bPosY+2;
        type=entity,ID=tnt,NBTTag=(Fuse=50b,Motion='#'randLaunchMotion),posY='#'bPosY+7,amount=20
    )"])
)@luck=-2

/ ========== ENCHANTED + LUCKY ITEMS ==========

/fire warlock armor
group(ID=leather_helmet,NBTTag=(display=(color=13710131,Name=#jsonStr(text="$4Fire Warlock Cap")),Enchantments=[(id=fire_protection,lvl=#randList(5,5,6,6,6,7,5,5,6,6,6,7,8))]);ID=leather_chestplate,NBTTag=(display=(color=13710131,Name=#jsonStr(text="$4Fire Warlock Jacket")),Enchantments=[(id=fire_protection,lvl=#randList(5,5,6,6,6,7,5,5,6,6,6,7,8))]);ID=leather_leggings,NBTTag=(display=(color=13710131,Name=#jsonStr(text="$4Fire Warlock Pants")),Enchantments=[(id=fire_protection,lvl=#randList(5,5,6,6,6,7,5,5,6,6,6,7,8))]);ID=leather_boots,NBTTag=(display=(color=13710131,Name=#jsonStr(text="$4Fire Warlock Shoes")),Enchantments=[(id=fire_protection,lvl=#randList(5,5,6,6,6,7,5,5,6,6,6,7,8))]))@luck=1

/ fire skull
ID=wither_skeleton_skull,NBTTag=(Enchantments=#luckyHelmetEnchantments,display=(Name=#jsonStr(text="Fire Skull",color=orange,bold=true)))@luck=0

/ daira axe
ID=stone_axe,NBTTag=(Enchantments=#luckySwordEnchantments,display=(Name=#jsonStr(text="Fire Daira's Axe",color=orange,bold=true)))@luck=1

/ firebringers axe
ID=iron_axe,NBTTag=(Enchantments=#luckySwordEnchantments,display=(Name=#jsonStr(text="Fire Bringer's Axe",color=orange,bold=true)))@luck=2

/ bon fire
ID=blaze_rod,NBTTag=(display=(Name=#jsonStr(text="$4Bonfire")),Enchantments=[(id=fire_aspect,lvl=#rand(2,6))])@luck=2

/ lucky fire element blaster
group(ID=arrow,amount=#rand(8,16);ID=lucky:elefire_lucky_bow,NBTTag=(Enchantments=#luckyBowEnchantments,display=(Name=#jsonStr(text="Fire Lucky Blaster",color=orange,bold=true))))@luck=2

/ lucky fire element sword
ID=lucky:elefire_lucky_sword,NBTTag=(Enchantments=#luckySwordEnchantments,display=(Name=#jsonStr(text="Fire Lucky Sword",color=orange,bold=true)))@luck=2

/ minecrafter pickaxe
ID=diamond_pickaxe,NBTTag=(Enchantments=#luckyToolEnchantments,display=(Name=#jsonStr(text="Minecrafter's Pickaxe",color=blue,bold=true)))@luck=2

/ minecrafter shovel
ID=diamond_shovel,NBTTag=(Enchantments=#luckyToolEnchantments,display=(Name=#jsonStr(text="Minecrafter's Shovel",color=blue,bold=true)))@luck=2

/ enchanted golden's tools
group:#rand(1,2):(
    ID=golden_shovel,NBTTag=(Enchantments=#luckyToolEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Shovel",color=gold,bold=true)));
    ID=golden_pickaxe,NBTTag=(Enchantments=#luckyToolEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Pickaxe",color=gold,bold=true)));
    ID=golden_axe,NBTTag=(Enchantments=#luckyAxeEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Axe",color=gold,bold=true)));
    ID=golden_hoe,NBTTag=(Enchantments=#luckyToolEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Hoe",color=gold,bold=true)));
    ID=warped_fungus_on_a_stick,NBTTag=(Enchantments=#luckyFishingRodEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Fishing Rod",color=gold,bold=true)))
)@luck=2

/ enchanted golden's armor
group:#rand(1,2):(
    ID=golden_helmet,NBTTag=(Enchantments=#luckyHelmetEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Helmet",color=gold,bold=true)));
    ID=golden_chestplate,NBTTag=(Enchantments=#luckyChestplateEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Chestplate",color=gold,bold=true)));
    ID=golden_leggings,NBTTag=(Enchantments=#luckyLeggingsEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Leggings",color=gold,bold=true)));
    ID=golden_boots,NBTTag=(Enchantments=#luckyBootsEnchantments,display=(Name=#jsonStr(text="Enchanted Golden's Boots",color=gold,bold=true)))
)@luck=1


/ hero's potion
ID=potion,NBTTag=(
    Potion="fire_resistance",
    CustomPotionEffects=#luckyPotionEffects,
    display=(Name=#jsonStr(text="Fire Energy",color=blue,bold=true))
)@luck=2

/ evil potion
ID=splash_potion,NBTTag=(
    Potion="harming",
    CustomPotionEffects=#unluckyPotionEffects,
    display=(Name=#jsonStr(text="Evil Potion",color=dard_red,bold=true))
)@luck=1

/ lucky items
type=item,ID=lucky:elefire_lucky_sword@chance=1.5@luck=2
type=item,ID=lucky:elefire_lucky_bow@chance=1.5@luck=2
type=item,ID=lucky:elefire_lucky_potion,NBTTag=(Luck=#randList(100,-100)),amount=#rand(10,15)@chance=1.5@luck=2

group(
    type=item,ID=lucky:elefire_lucky_sword;
    type=item,ID=lucky:elefire_lucky_bow;
    type=item,ID=lucky:elefire_lucky_potion,NBTTag=(Luck=#randList(100,-100)),amount=#rand(10,15);
    type=entity,ID=firework_rocket,NBTTag=(
        LifeTime=20,FireworksItem=(id=firework_rocket,Count=1,tag=#randFireworksRocket)
    ),amount=20,posOffset=#circleOffset(0,2)
)@luck=2
