# Pack changes for 'HeatElement-Build002-MC1.18.x', applied in memory over the author's own file.
# What they do and why: ADDON_PATCHES.md.

@addon HeatElement-Build002-MC1.18.x

@file drops.txt

@match
/blaze rod
ID=blaze_rod@luck=-1
@replace
@end

@match
group(type=block;ID=soul_sand,ID=nether_wart,amount=#rand(5,10))@luck=1
@replace
group(type=block,ID=soul_sand;ID=nether_wart,amount=#rand(5,10))@luck=1
@end

@match
group(ID=magma_cream,amount=#rand(3,7);ID=blaze_powder,amount=#rand(4,9);ID=blaze_rod,amount=#rand(2,4))@luck=1
@replace
group(ID=magma_cream,amount=#rand(3,7))@luck=1
@end

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

@match
/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
@replace
@end

@match
group(type=entity,ID=wither_skeleton,amount=#rand(1,3);type=structure,ID=elefire_firering)@luck=-2
@replace
group(type=entity,ID=wither_skeleton,NBTTag=(LWCurse=1b),amount=#rand(1,3);type=structure,ID=elefire_firering)@luck=-2
@end

@match
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
@replace
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=5,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
@end

@match
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
@replace
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=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
@end

@match
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
@replace
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=5,posY='#'bPosY+3,posOffset='#'circleOffset(2);
        ID=magma_cream,amount=#rand(3,12),posY='#'bPosY+10,posOffset='#'circleOffset(2);
        ID=ghast_tear,amount=#rand(1,5),posY='#'bPosY+10,posOffset='#'circleOffset(2)
    )"])
)@luck=1
@end

@match
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
@replace
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=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
@end

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

@match
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
@replace
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=5,posOffset=#circleOffset(0,2)
)@luck=2
@end

@file natural_gen.txt

@match
type=block,ID=lucky:elefire_lucky_block@chance=1250
@replace
type=block,ID=lucky:elefire_lucky_block@chance=250
@end

@match
type=block,ID=lucky:elefire_lucky_block@chance=115
@replace
type=block,ID=lucky:elefire_lucky_block@chance=100
@end

@match
>minecraft:the_end
type=block,ID=lucky:elefire_lucky_block@chance=525
@replace
/>minecraft:the_end
/type=block,ID=lucky:elefire_lucky_block@chance=0
@end

