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

group(ID=golden_sword;ID=golden_shovel;ID=golden_pickaxe;ID=golden_axe;ID=golden_hoe,ID=iron_ingot,ID=iron_ingot,ID=iron_ingot,ID=iron_ingot)@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
/ all leather and gold armor
group(ID=leather_helmet;ID=leather_chestplate;ID=leather_leggings;ID=leather_boots;ID=iron_block)@luck=0
group(ID=golden_helmet;ID=golden_chestplate;ID=golden_leggings;ID=golden_boots;ID=golden_horse_armor;ID=gold_block;ID=redstone_block)@luck=1
/ 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(4,5):(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
/ bow and arrows
group(ID=bow;ID=arrow,amount=#rand(16,32))@luck=1
group(ID=iron_block;iron_block;iron_block;iron_block;pumpkin)@luck=2
group(ID=iron_block;ID=redstone_block;ID=gold_block;ID=iron_block;ID=redstone,amount=#rand(12,16))@luck=1
group(ID=piston;ID=redstone_block;ID=lever;ID=tnt)@luck=0
group(ID=coal,amount=#rand(8,12);ID=furnace;ID=raw_beef,amount=#rand(2,8))
group(ID=wooden_shovel,amount=128;ID=beacon)@luck=-1
group(ID=wooden_hoe,amount=128;ID=nether_star)@luck=-1
group(ID=wooden_axe,amount=128;ID=dragon_egg)@luck=-1

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

ID=sponge@luck=0
ID=tnt,amount=8@luck=1
ID=obsidian,amount=14@luck=1
ID=enchanting_table@luck=2
ID=ender_chest,amount=2@luck=0
ID=dropper,amount=8@luck=0
ID=hay_block,amount=8@luck=0
ID=iron_block,amount=5@luck=0
ID=gold_block,amount=5
ID=emerald_block,amount=5
ID=redstone_block,amount=10

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

ID=gold_ingot,amount=#rand(8,16)@luck=1
ID=stick@luck=-1
ID=saddle,amount=2@luck=0
ID=cake@luck=0
ID=red_flower,NBTTag=(display=(Name="$cRomantic Rose"))@luck=-1
ID=rabbit_stew,amount=#rand(5,7)@luck=1


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

/ bookshelves and books
group(ID=bookshelf,amount=#rand(6,12);ID=book,amount=#rand(8,16))@luck=0
/ pumpkins and jack o'lanterns
group(ID=pumpkin,amount=#rand(8,16);ID=lit_pumpkin,amount=#rand(8,16))@luck=0
/ golden apples
group(ID=golden_apple,amount=#rand(2,4);ID=golden_apple,amount=#rand(1,2),damage=1)@luck=2
/ buckets
group(ID=bucket,amount=#rand(1,2);ID=water_bucket,amount=#rand(1,2);ID=lava_bucket,amount=#rand(1,2);ID=milk_bucket,amount=#rand(1,2))@luck=0
/ mecha meat (raw and cooked)
group(group(ID=porkchop,amount=#rand(8,16);ID=cooked_porkchop,amount=#rand(4,8));group(ID=fish,amount=#rand(8,16);ID=cooked_fish,amount=#rand(4,8));group(ID=beef,amount=#rand(8,16);ID=cooked_beef,amount=#rand(4,8));group(ID=chicken,amount=#rand(8,16);ID=cooked_chicken,amount=#rand(4,8));group(ID=mutton,amount=#rand(8,16);ID=cooked_mutton,amount=#rand(4,8));group(ID=rabbit,amount=#rand(8,16);ID=cooked_rabbit,amount=#rand(4,8));ID=iron_block,amount=#rand(4,12)))@luck=1
/ mega vegetable food (carrots, potatoes, pumpkin pie)
group(group(ID=carrot,amount=#rand(8,16);ID=golden_carrot,amount=#rand(4,8));group(ID=potato,amount=#rand(8,16);ID=baked_potato,amount=#rand(4,8);ID=poisonous_potato,amount=#rand(2,4));group(ID=pumpkin_pie,amount=#rand(6,12)))@luck=1
/ ender pearls and eyes 
group(ID=ender_pearl,amount=10;ID=ender_eye,amount=5)@luck=2
/ potions
ID=#randList(potion,splash_potion),NBTTag=(Potion=#randPotion),amount=#rand(4,8)@luck=1
/ spawn eggs
ID=spawn_egg,NBTTag=(EntityTag=(id=#randSpawnEgg)),amount=#rand(4,8)@luck=1
/ heads
ID=skull,damage=#rand(0,4),amount=#rand(1,3)@luck=0
group(ID=skull,damage=#rand(0,4),amount=#rand(1,3);ID=fence)@luck=0
/ jukebox music discs
group(ID=jukebox;ID=#rand(2256,2267),amount=#rand(1,3))@luck=1
/ brewing
group(ID=ender_pearl,amount=#rand(1,3);ID=blaze_rod,amount=#rand(1,3);ID=ghast_tear,amount=#rand(1,3);ID=gold_nugget,amount=#rand(1,3);ID=nether_wart,amount=#rand(1,3);ID=spider_eye,amount=#rand(1,3);ID=fermented_spider_eye,amount=#rand(1,3);ID=blaze_powder,amount=#rand(1,3);ID=magma_cream,amount=#rand(1,3);ID=ender_eye,amount=#rand(1,3);ID=speckled_melon,amount=#rand(1,3);ID=rabbit_foot,amount=#rand(1,3);type=particle,ID=splashpotion,potion="fire_resistance")@luck=2
/ redstone
group(ID=dispenser,amount=2;ID=noteblock,amount=1;ID=sticky_piston,amount=4;ID=piston,amount=4;ID=tnt,amount=6;ID=lever,amount=2;ID=stone_pressure_plate,amount=2;ID=wooden_pressure_plate,amount=2;ID=redstone_torch,amount=8;ID=stone_button,amount=2;ID=trapdoor,amount=2;ID=iron_trapdoor,amount=2;ID=fence_gate,amount=1;ID=redstone_lamp,amount=4;ID=tripwire_hook,amount=2;ID=wooden_button,amount=2;ID=light_weighted_pressure_plate,amount=1;ID=heavy_weighted_pressure_plate,amount=1;ID=daylight_detector,amount=1;ID=hopper,amount=4;ID=dropper,amount=#rand(2,4);ID=wooden_door,amount=1;ID=iron_door,amount=1;ID=redstone,amount=#rand(32,64);ID=repeater,amount=8;ID=comparator,amount=2;type=particle,ID=splashpotion,potion="healing";;type=entity,ID=fireworks_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,Count=1,tag=#randFireworksRocket)),amount=20,posOffset=#circleOffset(0,2))@luck=2
/ colorful
group(group:1:(ID=wool,damage=#rand(0,15),amount=#rand(32,64);ID=stained_hardened_clay,damage=#rand(0,15),amount=#rand(32,64);ID=dye,damage=#rand(0,15),amount=#rand(32,64));type=particle,ID=splashpotion,potion=#randPotion,amount=10)@luck=1
/ iron, gold, diamond, emerald, lapis with fireworks
group(ID=iron_ingot,amount=#rand(8,16);ID=gold_ingot,amount=#rand(8,16);ID=diamond,amount=#rand(8,16);ID=emerald,amount=#rand(8,16);ID=dye,damage=4,amount=#rand(8,16);type=entity,ID=fireworks_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,Count=1,tag=#randFireworksRocket)),amount=20,posOffset=#circleOffset(0,2))@luck=2
/ quartz
group(ID=stone_slab,damage=7,amount=#rand(4,8);ID=quartz_ore,amount=#rand(16,32);ID=quartz_block,amount=#rand(4,8);ID=quartz_block,damage=1,amount=#rand(4,8);ID=quartz_block,damage=2,amount=#rand(4,8);ID=quartz_stairs,amount=#rand(4,8);ID=quartz,amount=#rand(24,32);type=particle,ID=splashpotion,potion="invisibility")@luck=1
/ fish
group(ID=fishing_rod;ID=349,damage=#rand(0,3),amount=#rand(10,20))@luck=1
/ random jokes
group:1:(ID=clock,NBTTag=(display=(Name="You're wasting your time"));ID=fish,damage=2,NBTTag=(display=(Name="I'm funny"));ID=fish,damage=3,NBTTag=(display=(Name="Oooooh!")))@luck=-1
/ flowers
group(ID=red_flower,damage=#rand(0,8),amount=64)@luck=0
/ enchantment books
ID=enchanted_book,NBTTag=(StoredEnchantments=#randEnchantment),amount=#rand(7,10)@luck=1
/ prismarine
group(ID=prismarine,amount=#rand(4,8);ID=prismarine,damage=1,amount=#rand(4,8);ID=prismarine,damage=2,amount=#rand(4,8);ID=sea_lantern,amount=#rand(4,8);ID=prismarine_shard,amount=#rand(15,30);ID=prismarine_crystals,amount=#rand(10,20);type=particle,ID=splashpotion,potion="invisibility")@luck=1

/ Gain the power of robobotic flight
group(ID=elytra,NBTTag=(ench=#luckyChestplateEnchantments,display=(Name=("$7$lRobobot Thrusters");ID=fireworks,display=(Name="$7Robobot Rockets"))@luck=2
/ ========== ENTITIES ==========

/ lucky mobs
group:1:(type=entity,ID=Pig,NBTTag=(CustomName="$e$lPiggleston Jr.",CustomNameVisible=true);type=entity,ID=Cow,NBTTag=(CustomName="$e$lLord O Beef",CustomNameVisible=true);type=entity,ID=Chicken,NBTTag=(CustomName="$e$lEgg Engine",CustomNameVisible=true);type=entity,ID=Sheep,NBTTag=(CustomName="$e$lMister Static",CustomNameVisible=true);type=entity,ID=Rabbit,NBTTag=(CustomName="$e$lLucki the Rabbit",CustomNameVisible=true);type=entity,ID=Squid,NBTTag=(CustomName="$e$lToo Bad So Sad",CustomNameVisible=true))@luck=0
/ colored sheep
type=entity,ID=Sheep,NBTTag=(CustomName="$cMachine Created Sheep",CustomNameVisible=true,Color=#rand(0,15)),posOffset=#circleOffset(4),amount=16@luck=1
type=entity,ID=Vex,NBTTag=(CustomName="$cHaunted Security Force",CustomNameVisible=true,Color=#rand(0,15)),posOffset=#circleOffset(4),amount=16@luck=-1

/ eggs + diamonds
group(type=entity,ID=egg,NBTTag=(Motion=#randLaunchMotion(0.6,15)),amount=40;type=entity,ID=Item,NBTTag=(Item=(id=iron_ingot,Count=1),Motion=#randLaunchMotion(0.7,18)),amount=20)@luck=2

/ thrown exp bottles
type=entity,ID=xp_bottle,NBTTag=(Motion=#randLaunchMotion),amount=#rand(16,32)@luck=2
/ launched tnt
type=entity,ID=tnt,NBTTag=(Fuse=50b,Motion=#randLaunchMotion),amount=15@luck=-2

/ lightning creeper
group(type=difficulty,ID=hard;type=entity,ID=Pig;type=entity,ID=LightningBolt);(type=difficulty,ID=hard;type=entity,ID=Pig;type=entity,ID=LightningBolt);(type=difficulty,ID=hard;type=entity,ID=Pig;type=entity,ID=LightningBolt);(type=difficulty,ID=hard;type=entity,ID=Pig;type=entity,ID=LightningBolt);(type=difficulty,ID=hard;type=entity,ID=Pig;type=entity,ID=LightningBolt);(type=difficulty,ID=hard;type=entity,ID=Pig;type=entity,ID=LightningBolt);(type=difficulty,ID=hard;type=entity,ID=Pig;type=entity,ID=LightningBolt);(type=difficulty,ID=hard;type=entity,ID=Pig;type=entity,ID=LightningBolt)@luck=-2
/ wither
group(type=difficulty,ID=hard;type=entity,ID=wither,NBTTag=(CustomName="-Mechanized Wither-)@chance=0.1@luck=-2
/ ghast
group(type=difficulty,ID=hard;type=entity,ID=Ghast)@chance=0.2@luck=-2
/ elder guardian
group(type=difficulty,ID=hard;type=entity,ID=Guardian,NBTTag=(Elder=1)))@chance=0.5@luck=-2
/ killer rabbit
group(type=difficulty,ID=hard;type=entity,ID=Rabbit,NBTTag=(RabbitType=99,CustomName=Mechanized Rabbit",))@luck=-1
/ bob zombie
group(type=difficulty,ID=hard;type=entity,ID=Zombie,NBTTag=(HandItems=[(id=lucky:mech_lucky_sword,Count=1,tag=(ench=#luckySwordEnchantments))],ArmorItems=[(id=iron_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=iron_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=iron_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=iron_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$7Mecha Knight",CustomNameVisible=true))@luck=-1
group(type=difficulty,ID=hard;type=entity,ID=Skeleton,NBTTag=(HandItems=[(id=lucky:mech_lucky_sword,Count=1,tag=(ench=#luckySwordEnchantments))],ArmorItems=[(id=diamond_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=diamond_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=diamond_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=diamond_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$9$lMecha Knight +",CustomNameVisible=true))@luck=-1
group(type=difficulty,ID=hard;type=entity,ID=Skeleton,NBTTag=(HandItems=[(id=iron_sword,Count=1,tag=(ench=#luckySwordEnchantments))],ArmorItems=[(id=iron_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=iron_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=iron_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=iron_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$7Stock Mecha Knights",CustomNameVisible=true);type=entity,ID=Skeleton,NBTTag=(HandItems=[(id=iron_sword,Count=1,tag=(ench=#luckySwordEnchantments))],ArmorItems=[(id=iron_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=iron_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=iron_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=iron_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$7Stock Mecha Knights",CustomNameVisible=true))@luck=-2
group(type=difficulty,ID=hard;type=entity,ID=PigZombie,NBTTag=(HandItems=[(id=lucky:mech_lucky_sword,Count=1,tag=(ench=#luckySwordEnchantments))],ArmorItems=[(id=leather_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=gold_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=gold_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=gold_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[2.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$7$lMorpho Knight",CustomNameVisible=true))@luck=-2
/ ghostly horseman skeleton
group(type=difficulty,ID=hard;type=entity,ID=Bat,NBTTag=(Silent=true,ActiveEffects=[(Id=14,Duration=100000,Amplifier=1,ShowParticles=false)],Passengers=[(id=skeleton_horse,Tame=true,Type=4,Passengers=[(id=Skeleton,HandItems=[(id=bow,Count=1,tag=(ench=#luckyBowEnchantments))],ArmorItems=[(id=chainmail_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=chainmail_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=chainmail_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=chainmail_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$7$lMecha Archer +",CustomNameVisible=true)])]))@luck=-2
group(type=difficulty,ID=hard;type=entity,ID=Horse,NBTTag=(Tame=true,Type=4,Passengers=[(id=Skeleton,HandItems=[(id=bow,Count=1,tag=(ench=#luckyBowEnchantments))],ArmorItems=[(id=iron_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=iron_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=iron_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=iron_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$7$lThe King of Chaos, The King of Pain",CustomNameVisible=true)])]))@luck=-2
/ stacked villager and pigs
group(type=entity,ID=Pig,NBTTag=(Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Pig,Passengers=[(id=Villager)])])])])])])])]);type=entity,id=LightningBolt@luck=-1

/ horses
type=entity,ID=#randList(horse,skeleton_horse,zombie_horse),amount=12,posOffset=#circleOffset(4),NBTTag=(Tame=true,OwnerUUID=#pUUID)@luck=1

/ llamas & bears
type=entity,ID=llama,amount=8,posOffset=#circleOffset(4),NBTTag=(CustomName=#randList("$5$lLlaura","$5$lLlauretta","$5$lLlavender","$5$lLlinda","$5$lLlisa","$5$lLlouise","$5$lLlucy","$5$lLlydia"),Variant=#rand(0,3),CustomNameVisible=true)@luck=0
type=entity,ID=polar_bear,amount=8,posOffset=#circleOffset(4),NBTTag=(CustomName=#randList("$b$lPeter","$b$lPolar","$b$lPumpkin","$b$lPringle","$b$lPatrick","$b$lPumpernickel","$b$lPeabody","$b$lPrince"),Variant=#rand(0,3),CustomNameVisible=true)@luck=0
/ witch with vile minions
group(type=difficulty,ID=hard;type=entity,ID=Witch;type=entity,ID=Silverfish,posY=#bPosY+#rand(0,2),posOffset=#circleOffset(0,1),amount=64)@luck=-2
group(type=difficulty,ID=hard;type=entity,ID=Witch;type=entity,ID=Bat,posY=#bPosY+#rand(0,2),posOffset=#circleOffset(0,1),amount=64)@luck=-1
/ huge slime and magma cube
group:1:(type=entity,ID=Slime,NBTTag=(Size=10);type=entity,ID=magma_cube,NBTTag=(Size=10))@luck=-2

/ pet wolves
group(type=entity,ID=Wolf,amount=#rand(10,15),posOffset=#circleOffset(3),NBTTag=(CollarColor=#rand(0,14),OwnerUUID=#pUUID,Sitting=1);type=particle,ID="heart",size=(2,0,2)particleAmount=20,CustomName="Mechanized Dog")@luck=1
/ pet cats
group(type=entity,ID=ocelot,amount=#rand(5,10),posOffset=#circleOffset(3),NBTTag=(CatType=#rand(0,3),OwnerUUID=#pUUID,Sitting=1);type=particle,ID="heart",size=(2,0,2),particleAmount=20)@luck=1
/ pet rabbits
group(type=entity,ID=Rabbit,amount=#rand(5,10),posOffset=#circleOffset(3),NBTTag=(RabbitType=#rand(0,5),OwnerUUID=#pUUID,Sitting=1);type=particle,ID="heart",size=(2,0,2),particleAmount=20)@luck=1

/ hero villagers
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=diamond,Count=#rand(20,25)),sell=(id=diamond_sword,Count=1,tag=(ench=#luckySwordEnchantments,display=(Name="$7$lRobobot Schimitar"))),maxUses=1),(buy=(id=diamond,Count=#rand(20,25)),sell=(id=bow,Count=1,tag=(ench=#luckyBowEnchantments,display=(Name="$7$lBeamer"))),maxUses=1),(buy=(id=diamond,Count=#rand(10,15)),sell=(id=fishing_rod,Count=1,tag=(ench=#luckyFishingRodEnchantments,display=(Name="$7$lIron Claw"))),maxUses=1),(buy=(id=diamond,Count=#rand(10,15)),sell=(id=potion,Count=1,tag=(Potion="fire_resistance",CustomPotionEffects=#luckyPotionEffects,display=(Name="$7$lHeroing Ointment"))),maxUses=1),(buy=(id=diamond,Count=#rand(7,12)),sell=(id=splash_potion,Count=1,tag=(Potion="harming",CustomPotionEffects=#unluckyPotionEffects,display=(Name="$4$lBottle o Nuts & Bolts"))),maxUses=1)]),CustomName="$7$lMechanized Merchant",CustomNameVisible=true)@luck=1
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=diamond,Count=#rand(12,17)),sell=(id=diamond_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments,display=(Name="$7$lRobobot Spectacles ULTRA"))),maxUses=1),(buy=(id=diamond,Count=#rand(20,25)),sell=(id=diamond_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments,display=(Name="$7$lRobobot Armor"))),maxUses=1),(buy=(id=diamond,Count=#rand(15,20)),sell=(id=diamond_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments,display=(Name="$7$lSuper Robobot Trousers ULTRA"))),maxUses=1),(buy=(id=diamond,Count=#rand(12,17)),sell=(id=diamond_boots,Count=1,tag=(ench=#luckyBootsEnchantments,display=(Name="$7$lRobobot Shoeplates ULTRA"))),maxUses=1)]),CustomName="$7$lRobobot Trader",CustomNameVisible=true)@luck=1
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=diamond,Count=#rand(10,15)),sell=(id=diamond_shovel,Count=1,tag=(ench=#luckyToolEnchantments,display=(Name="$7$lHeavy Duty Shovel ULTRA"))),maxUses=1),(buy=(id=diamond,Count=#rand(15,20)),sell=(id=diamond_pickaxe,Count=1,tag=(ench=#luckyToolEnchantments,display=(Name="$7$lDiamond Drill"))),maxUses=1),(buy=(id=diamond,Count=#rand(15,20)),sell=(id=diamond_axe,Count=1,tag=(ench=#luckyAxeEnchantments,display=(Name="$7$lBuzzsaw ULTRA"))),maxUses=1),(buy=(id=diamond,Count=#rand(10,15)),sell=(id=diamond_hoe,Count=1,tag=(ench=#luckyToolEnchantments,display=(Name="$7$lTiller"))),maxUses=1)]),CustomName="$7$lMecha Merchant",CustomNameVisible=true)@luck=1

/ falling blocks (iron, gold, diamond, emerald)
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=iron_block);type=particle,ID=largesmoke,size=(1,2,1),particleAmount=500;type=sound,ID=block.fire.extinguish)@luck=0
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=gold_block);type=particle,ID=flame,size=(1,2,1),particleAmount=500;type=sound,ID=entity.ghast.shoot)@luck=0
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=diamond_block);type=entity,ID=LightningBolt)@luck=1
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=emerald_block);type=particle,ID=happyVillager,size=(1,2,1),particleAmount=500;type=sound,ID=block.grass.break)@luck=0
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=falling_block,posY=#bPosY+7,NBTTag=(Block=lapis_block);type=particle,ID=splash,size=(1,2,1),particleAmount=1000;type=sound,ID=entity.player.swim)@luck=0

/ colorful pole
group(type=fill,ID=air,size=(1,51,1);group(NBTTag=(Block=stained_hardened_clay,Data=14),posY=#bPosY+5;NBTTag=(Block=stained_hardened_clay,Data=1),posY=#bPosY+10;NBTTag=(Block=stained_hardened_clay,Data=4),posY=#bPosY+15;NBTTag=(Block=stained_hardened_clay,Data=5),posY=#bPosY+20;NBTTag=(Block=stained_hardened_clay,Data=3),posY=#bPosY+25;NBTTag=(Block=stained_hardened_clay,Data=11),posY=#bPosY+30;NBTTag=(Block=stained_hardened_clay,Data=10),posY=#bPosY+35;NBTTag=(Block=stained_hardened_clay,Data=2),posY=#bPosY+40;NBTTag=(Block=stained_hardened_clay,Data=6),posY=#bPosY+45),type=entity,ID=falling_block;type=entity,ID=falling_block,NBTTag=(Block=diamond_block),posY=#bPosY+50;type=entity,ID=LightningBolt,posY=#bPosY+10,delay=5.3)@luck=2

/ tnt pole
group(type=fill,ID=air,size=(1,51,1);type=entity,ID=falling_block,NBTTag=(Block=redstone_block),posY=#bPosY+5;group(posY=#bPosY+10;posY=#bPosY+15;posY=#bPosY+20;posY=#bPosY+25;posY=#bPosY+30;posY=#bPosY+35;posY=#bPosY+40;posY=#bPosY+45;posY=#bPosY+50),type=entity,ID=falling_block,NBTTag=(Block=tnt))@luck=2
group(type=fill,ID=air,size=(1,51,1);type=entity,ID=falling_block,NBTTag=(Block=redstone_block),posY=#bPosY+5;group(posY=#bPosY+10;posY=#bPosY+15;posY=#bPosY+20;posY=#bPosY+25;posY=#bPosY+30;posY=#bPosY+35;posY=#bPosY+40;posY=#bPosY+45;posY=#bPosY+50),type=entity,ID=falling_block,NBTTag=(Block=iron_block))@luck=2
group(type=fill,ID=air,size=(1,51,1);type=entity,ID=falling_block,NBTTag=(Block=redstone_block),posY=#bPosY+5;group(posY=#bPosY+10;posY=#bPosY+15;posY=#bPosY+20;posY=#bPosY+25;posY=#bPosY+30;posY=#bPosY+35;posY=#bPosY+40;posY=#bPosY+45;posY=#bPosY+50),type=entity,ID=falling_block,NBTTag=(Block=gold_))@luck=2
/ baby player
type=entity,ID=armor_stand,NBTTag=(Small=false,NoBasePlate=true,ShowArms=true,HandItems=[(id=stone_pickaxe,Count=1)],ArmorItems=[(id=chainmail_boots,Count=1,tag=(display=(color=#rand(0,16777215)))),(id=leather_leggings,Count=1,tag=(display=(color=#rand(0,16777215)))),(id=leather_chestplate,Count=1,tag=(display=(color=#rand(0,16777215)))),(id=skull,Damage=3,Count=1,tag=(SkullOwner=#pName))],Rotation=[#pYaw+180f,0f],CustomName="Hollow Mechanized #pName",CustomNameVisible=true)@luck=0

/ ==== Monster Apocalyple ====
/ sword, difficulty, time, potion effects
group(ID=wooden_sword;type=difficulty,ID=hard;type=time,ID=18750;type=effect,ID=slowness,duration=30,amplifier=4;type=effect,ID=blindness,duration=30; \
/ zombies, creepers, spiders & cave spiders, silverfish & endermites, guardians
group:1:(type=entity,ID=Zombie,amount=#rand(20,50);type=entity,ID=Creeper,amount=#rand(10,30);group(type=entity,ID=Spider,amount=#rand(15,45);type=entity,ID=CaveSpider,amount=#rand(5,10));group(type=entity,ID=Silverfish,amount=#rand(15,45);type=entity,ID=Endermite,amount=#rand(5,10));type=entity,ID=Guardian,amount=#rand(10,30); \
group:1:(type=entity,ID=Silverfish,amount=#rand(20,50);type=entity,ID=Endermite,amount=#rand(10,30);group(type=entity,ID=Spider,amount=#rand(15,45);type=entity,ID=CaveSpider,amount=#rand(5,10));group(type=entity,ID=Silverfish,amount=#rand(15,45);type=entity,ID=Endermite,amount=#rand(5,10));type=entity,ID=spider,amount=#rand(10,30); \
/ all
group(type=entity,ID=Zombie,amount=#rand(20,50);type=entity,ID=Creeper,amount=#rand(10,30);group(type=entity,ID=Spider,amount=#rand(15,45);type=entity,ID=CaveSpider,amount=#rand(5,10);type=entity,ID=Silverfish,amount=#rand(15,45);type=entity,ID=Endermite,amount=#rand(5,10);type=entity,ID=Guardian,amount=#rand(10,30)))),posOffset=#circleOffset(8,10))@luck=-2

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

/ traps
type=structure,ID=anvil_trap,pos=#pPos,rotation=#pDirect@luck=-2
type=structure,ID=anvil_trap,pos=#pPos,rotation=#pDirect@luck=-2
type=structure,ID=anvil_trap,pos=#pPos,rotation=#pDirect@luck=-2
type=structure,ID=lava_trap,pos=#pPos,rotation=#pDirect@luck=-2
type=structure,ID=water_trap,pos=#pPos,rotation=#pDirect@luck=-2
type=structure,ID=haystack,pos=#pPos,rotation=#pDirect@luck=-2
/ lucky fort and temple
type=structure,ID=lucky_fort,pos=#pPos@luck=2
type=structure,ID=lucky_temple,pos=#pPos@chance=0.4@luck=2

/ bedrock problem
type=structure,ID=bedrock_problem,rotation=#pDirect@luck=-1

/ explosion
group(type=difficulty,ID=hard;type=explosion,radius=16)@luck=-2

/ wishing wells
group(type=structure,ID=wishing_well;type=message,ID="A wishing well? Maybe you should throw in a coin...";type=command,ID="/give #pName gold_nugget 1 0 {display:{Name:\"$6Iron Infused Coin\"}}";type=block,ID=lucky:lucky_block,posY=#bPosY-3,NBTTag=(Drops=["group(type=message,ID=\"$bRiches rain upon you!\";type=block,ID=air,posY='#'bPosY+3;type=block,ID=beacon,posY='#'bPosY+2;type=entity,ID=fireworks_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,Count=1,tag='#'randFireworksRocket)),amount=20,posY='#'bPosY+3,posOffset='#'circleOffset(2);ID=gold_ingot,amount=#rand(20,30),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=gold_block,amount=#rand(20,30),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=emerald,amount=#rand(20,30),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=dye,damage=4,amount=#rand(20,30),posY='#'bPosY+10,posOffset='#'circleOffset(2))"]))@luck=2
group(type=structure,ID=wishing_well;type=message,ID="A wishing well? Maybe you should throw in a coin...";type=command,ID="/give #pName gold_nugget 1 0 {display:{Name:\"$6Iron Infused Coin\"}}";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=fireworks_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,Count=1,tag='#'randFireworksRocket)),amount=20,posY='#'bPosY+3,posOffset='#'circleOffset(2);ID=gold_ingot,amount=#rand(20,30),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=diamond,amount=#rand(20,30),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=emerald,amount=#rand(20,30),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=dye,damage=4,amount=#rand(20,30),posY='#'bPosY+10,posOffset='#'circleOffset(2))"]))@luck=2
group(type=structure,ID=wishing_well;type=message,ID="A wishing well? Maybe you should throw in a coin...";type=command,ID="/give #pName gold_nugget 1 0 {display:{Name:\"$6Iron Infused Coin\"}}";type=block,ID=lucky:lucky_block,posY=#bPosY-3,NBTTag=(Drops=["group(type=message,ID=\"$eYour scrap wish came true!\";type=block,ID=air,posY='#'bPosY+3;type=block,ID=beacon,posY='#'bPosY+2;ID=,amount=128,posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=iron_ingot,amount=32,posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=gold_ingot,amount=32,posY='#'bPosY+10,posOffset='#'circleOffset(2))"]))@luck=1
group(type=structure,ID=wishing_well;type=message,ID="A wishing well? Maybe you should throw in a coin...";type=command,ID="/give #pName gold_nugget 1 0 {display:{Name:\"$6Iron Infused Coin\"}}";type=block,ID=lucky:lucky_block,posY=#bPosY-3,NBTTag=(Drops=["group(type=message,ID=\"$4The well was a well constructed trap!\";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=40)"]))@luck=-2

/ bouncing castle
type=structure,ID=bouncing_castle,pos=#pPos,rotation=#pDirect

/ new stuff
group(type=structure,ID=mysteryrock;type=message,ID="Step on the stone of sacrifice.")@luck=-1
group(type=structure,ID=mechanizedtree;type=message,ID="This tree has been mechanized.")@luck=2
group(type=structure,ID=research_station,rotation=#pDirect;type=message,ID="Smelt with STYLE!")@luck=0

group(type=structure,ID=research_station,rotation=#pDirect;type=message,ID="You can already feel your brain expanding!")@luck=0

group(type=structure,ID=alchemy_engine,rotation=#pDirect;type=message,ID="Science Away! Bzzt!")@luck=1

group(type=structure,ID=mechanizedstree,rotation=#pDirect;type=message,ID="This tree... has been mechanized.")@luck=2
group(type=structure,ID=mechanizedatree,rotation=#pDirect;type=message,ID="This tree... has been mechanized.")@luck=2
group(type=structure,ID=mechanizedotree,rotation=#pDirect;type=message,ID="This tree... has been mechanized.")@luck=2
group(type=structure,ID=mechanizedbtree,rotation=#pDirect;type=message,ID="This tree... has been mechanized.")@luck=2
group(type=structure,ID=mechanizedjtree,rotation=#pDirect;type=message,ID="This tree... has been mechanized.")@luck=2
group(type=structure,ID=coaforge,rotation=#pDirect;type=message,ID="&eThe Coalforge! Place a button on the magma to acquire endless coal! -Gadget Goblet 2019")@luck=-1
group(type=structure,ID=emerforge,rotation=#pDirect;type=message,ID="$eThe Emeraldforge! Place a button on the magma to acquire tons of riches! -Gadget Goblet 2019")@luck=2
group(type=structure,ID=smiterator,rotation=#pDirect;type=message,ID="$dThe Smiterator! Throw a snowball for one $lheck$r$d of a show in the sky! -Gadget Goblet 2050")@luck=0
group(type=structure,ID=expgenerat,rotation=#pDirect;type=message,ID="$eThe ExpGenerator! Place a button on the log to acquire intelligence. -Gadget Goblet 2019")@luck=2
/ ========== ENCHANTED + LUCKY ITEMS ==========

/ Mechanized Weapons
ID=stone_sword,NBTTag=(ench=[(ID=16,lvl=2)],display=(Name="$7Tweaked Sword")))@luck=0
ID=iron_sword,NBTTag=(ench=#luckySwordEnchantments,display=(Name="$7$lMechanized Sword"))@luck=1
ID=lucky:mech_lucky_sword,NBTTag=(ench=#luckySwordEnchantments,display=(Name="$7$lMechanized Ultra Sword"))@luck=2
ID=shield,NBTTag=(ench=[(ID=34,lvl=2)],display=(Name="$7Tweaked Shield")))@luck=0
ID=shield,NBTTag=(ench=[(ID=34,lvl=4)],display=(Name="$7$lMechanized Shield"))@luck=1
ID=shield,NBTTag=(ench=#luckySwordEnchantments,display=(Name="$7$lDual Purpose Shield"))@luck=2
/ Robobows
ID=bow,NBTTag=(ench=[(ID=48,lvl=2)]),display=(Name="$7$lTweaked Bow"))@luck=0
ID=bow,NBTTag=(ench=#luckyBowEnchantments,display=(Name="$7$lMechanized Bow"))@luck=1
ID=lucky:mech_lucky_bow,NBTTag=(ench=#luckyBowEnchantments,display=(Name="$7$lRobobow X"))@luck=2
/ Void
ID=redstone_block,NBTTag=(ench=#luckySwordEnchantments,display=(Name="$7$lVoid Soul"))@luck=2
/ robo tools
group:#rand(1,2):(ID=iron_shovel,NBTTag=(ench=#luckyToolEnchantments,display=(Name="$7$lHeavy Duty Shovel"));ID=iron_pickaxe,NBTTag=(ench=#luckyToolEnchantments,display=(Name="$7$lIron Digger"));ID=iron_axe,NBTTag=(ench=#luckyAxeEnchantments,display=(Name="$7$lBuzzsaw"));ID=iron_hoe,NBTTag=(ench=#luckySwordEnchantments,display=(Name="$9$lLandreaper")))@luck=2
/ mech armor
group:#rand(3,4):(ID=chainmail_helmet,NBTTag=(ench=#luckyHelmetEnchantments,display=(Name="$7Weak Robobot Spectacles"));ID=iron_chestplate,NBTTag=(ench=#luckyChestplateEnchantments,display=(Name="$7Worn Robobot Armor"));ID=chainmail_leggings,NBTTag=(ench=#luckyLeggingsEnchantments,display=(Name="$7Robobot Trousers"));ID=chainmail_boots,NBTTag=(ench=#luckyBootsEnchantments,display=(Name="$7Weak Robobot Shoeplates")))@luck=0
group:#rand(3,4):(ID=iron_helmet,NBTTag=(ench=#luckyHelmetEnchantments,display=(Name="$7$lRobobot Spectacles"));ID=diamond_chestplate,NBTTag=(ench=#luckyChestplateEnchantments,display=(Name="$7$lRobobot Armor"));ID=iron_leggings,NBTTag=(ench=#luckyLeggingsEnchantments,display=(Name="$7$lSuper Robobot Trousers Ultra "));ID=diamond_boots,NBTTag=(ench=#luckyBootsEnchantments,display=(Name="$7$lRobobot Shoeplates")))@luck=1
group:#rand(2,3):(ID=diamond_helmet,NBTTag=(ench=#luckyHelmetEnchantments,display=(Name="$7$lRobobot Spectacles ULTRA"));ID=diamond_chestplate,NBTTag=(ench=#luckyChestplateEnchantments,display=(Name="$7$lRobobot Armor ULTRA"));ID=diamond_leggings,NBTTag=(ench=#luckyLeggingsEnchantments,display=(Name="$7$lSuper Robobot Trousers DX "));ID=diamond_boots,NBTTag=(ench=#luckyBootsEnchantments,display=(Name="$7$lRobobot Shoeplates ULTRA")))@luck=2
group:#rand(3,4):(ID=iron_helmet,NBTTag=(ench=#luckyHelmetEnchantments,display=(Name="$7Flying Spectacles"));ID=elytra,NBTTag=(ench=#luckyChestplateEnchantments,display=(Name="$7Robobot Thrusters"));ID=chainmail_leggings,NBTTag=(ench=#luckyLeggingsEnchantments,display=(Name="$7Robobot Trousers"));ID=fireworks,NBTTag=(ench=#luckyBootsEnchantments,display=(Name="$7Robo Rockets - for use when flying with elytra")))@luck=0
/ hero potion
ID=potion,NBTTag=(Potion="fire_resistance",CustomPotionEffects=#luckyPotionEffects,display=(Name="$9$lVial of Hope"))@luck=2
ID=potion,NBTTag=(Potion="strength",CustomPotionEffects=[Id=5,Amplifier=10,Duration=120]),display=(Name="$9$lVial of the Strongman"))@luck=2
ID=potion,NBTTag=(Potion="strength",CustomPotionEffects=[Id=21,Amplifier=8,Duration=120]),display=(Name="$9$lVial of the True Hero"))@luck=2
/ unlucky potion
ID=splash_potion,NBTTag=(Potion="harming",CustomPotionEffects=#unluckyPotionEffects,display=(Name="$4$lVial of Irony"))@luck=1

/ lucky items
type=item,ID=lucky:mech_lucky_sword@chance=1.5@luck=2
group:1:(ID=clock,NBTTag=(display=(Name="You're wasting your time"));ID=fish,damage=2,NBTTag=(display=(Name="I'm funny"));ID=fish,damage=3,NBTTag=(display=(Name="Oooooh!")))@luck=-1
type=item,ID=lucky:mech_lucky_bow@chance=1.5@luck=2
type=item,ID=lucky:mech_lucky_potion,NBTTag=(Luck=#randList(100,-100)),amount=#rand(10,15)@chance=1.5@luck=2
group(type=item,ID=lucky:mech_lucky_sword;type=item,ID=lucky:mech_lucky_bow;type=item,ID=lucky:mech_lucky_potion,NBTTag=(Luck=#randList(100,-100)),amount=#rand(10,15);type=entity,ID=fireworks_rocket,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,Count=1,tag=#randFireworksRocket)),amount=20,posOffset=#circleOffset(0,2))@luck=2

/ NEW MECHA STUFFS

type=message,ID="Something terrible is coming...!"@luck=-2
type=message,ID="The lucky block broke down as it was about to give you a gift. Bummer."@luck=-2
group(type=difficulty,ID=hard;type=entity,ID=Giant,NBTTag=(HandItems=[(id=stone_sword,Count=1,tag=(ench=#luckySwordEnchantments))],ArmorItems=[(id=iron_boots,Count=1,tag=(ench=#luckyBootsEnchantments)),(id=iron_leggings,Count=1,tag=(ench=#luckyLeggingsEnchantments)),(id=iron_chestplate,Count=1,tag=(ench=#luckyChestplateEnchantments)),(id=iron_helmet,Count=1,tag=(ench=#luckyHelmetEnchantments))],HandDropChances=[0.5f,0f],ArmorDropChances=[0.3f,0.3f,0.3f,0.3f],CustomName="$7$lMecha Knight Soul OS",CustomNameVisible=true))@luck=-1
type=item,ID=golden_sword,NBTTag=(display(name=Unbreakable Galaxia));(ench=[(id=16,lvl=9),(id=70,lvl=1)])@luck=2@chance=0.2
type=item,ID=stone_sword,NBTTag=(display(name=Egg Excalibur))@luck=1
group:1:(ID=clock,NBTTag=(display=(Name="Speed up someone's life by 1000 years.")),(ench=[(ID=16,lvl=8)]);ID=fish,damage=2,NBTTag=(display=(Name="Make someone laugh so hard that they light on fire.")),(ench=[(ID=20,lvl=15)]);ID=fish,damage=3,NBTTag=(display=(Name="Repel attackers with pufferfish stink!")),(ench=[(ID=19,lvl=5)]))@luck=1