/ LUCKY /

/ tools
group(ID=iron_shovel;ID=iron_pickaxe;ID=iron_axe;ID=iron_sword;ID=iron_hoe)@luck=1
group(ID=golden_shovel;ID=golden_pickaxe;ID=golden_axe;ID=golden_sword;ID=golden_hoe)@luck=2
group(ID=diamond_shovel;ID=diamond_pickaxe;ID=diamond_axe;ID=diamond_sword;ID=diamond_hoe)@luck=2

/ armor
group:#rand(1,4):(ID=diamond_boots;ID=diamond_leggings;ID=diamond_chestplate;ID=diamond_helmet)@luck=2
group:#rand(1,4):(ID=iron_boots;ID=iron_leggings;ID=iron_chestplate;ID=iron_helmet)@luck=1
group:#rand(1,4):(ID=golden_boots;ID=golden_leggings;ID=golden_chestplate;ID=golden_helmet)@luck=1
group:#rand(1,4):(ID=leather_boots;ID=leather_leggings;ID=leather_chestplate;ID=leather_helmet)@luck=0
ID=leather_boots,NBTTag=(Attributes=[(AttributeName="generic.movementSpeed",Name="generic.movementSpeed",Amount=50,Operation=1,Slot="feet"),Unbreakable=1,ench=[(id=2,lvl=15)],display=(Name="$r$7Feather Boots",color:15592941))@luck=2

/ lucky gear
ID=diamond_helmet,NBTTag=(ench=#luckyHelmetEnchantments,display=(Name="$b$lLucky Helmet"))@luck=2
ID=diamond_chestplate,NBTTag=(ench=#luckyChestplateEnchantments,display=(Name="$b$lLucky Chestplate"))@luck=2
ID=diamond_leggings,NBTTag=(ench=#luckyLeggingsEnchantments,display=(Name="$b$lLucky Leggings"))@luck=2
ID=diamond_boots,NBTTag=(ench=#luckyBootsEnchantments,display=(Name="$b$lLucky Boots"))@luck=2
ID=golden_helmet,NBTTag=(ench=#luckyHelmetEnchantments,display=(Name="$e$lLucky Helmet"))@luck=2
ID=golden_chestplate,NBTTag=(ench=#luckyChestplateEnchantments,display=(Name="$e$lLucky Chestplate"))@luck=2
ID=golden_leggings,NBTTag=(ench=#luckyLeggingsEnchantments,display=(Name="$e$lLucky Leggings"))@luck=2
ID=golden_boots,NBTTag=(ench=#luckyBootsEnchantments,display=(Name="$e$lLucky Boots"))@luck=2
ID=iron_pickaxe,NBTTag=(ench=#luckyToolEnchantments,display=(Name="$7$lLucky Pickaxe"))@luck=2
ID=iron_hoe,NBTTag=(ench=#luckyToolEnchantments,display=(Name="$7$lLucky Hoe"))@luck=2

/ items
ID=diamond,amount=#rand(5,15)@luck=2
ID=emerald,amount=#rand(5,20)@luck=2
type=entity,ID=Item,NBTTag=(Item=(id=diamond,Count=1),Riding=(ID=FireworksRocketEntity,LifeTime=20,FireworksItem=(id=fireworks,tag=#randFireworksRocket))),posOffset=#circleOffset(5),amount=#rand(5,10)@luck=2
type=entity,ID=Item,NBTTag=(Item=(id=cake,Count=1),Motion=#randLaunchMotion),amount=#rand(8,16)@luck=1
ID=nether_star@luck=2
ID=beacon@luck=2
group(ID=stick,amount=#rand(5,15);ID=blaze_rod,amount=#rand(5,15);)@luck=0.8
group(ID=potato,amount=#rand(3,12);ID=poisonous_potato,amount=#rand(3,12);ID=baked_potato,amount=#rand(3,12))@luck=0.5
ID=bow,amount=#rand(1,2)@luck=0.4
group(ID=apple,amount=#rand(4,16);ID=golden_apple,amount=#rand(4,12);ID=golden_apple,damage=1,amount=#rand(2,8))@luck=2
group(type=block,ID=torch;type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=dragon_egg))@luck=2
ID=ender_chest,amount=2@luck=1
ID=tnt,amount=8@luck=1
ID=lapis,amount=#rand(1,64)@luck=2
ID=redstone,amount=#rand(1,64)@luck=2
ID=skull,damage=1,amount=3@luck=2
ID=name_tag,damage=1,amount=#rand(1,3)@luck=1
type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=egg),impact=["group(type=entity,ID=Chicken,Age=-25000;ID=diamond)"]),amount=#rand(10,20)@luck=2
type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=egg),impact=["group(type=entity,ID=Chicken,Age=-25000;ID=iron)"]),amount=#rand(10,20)@luck=1
ID=potion,damage=16428,NBTTag=(CustomPotionEffects=#unluckyPotionEffects,display=(Name="$e$lUnlucky Potion"))@luck=1
ID=potion,damage=8195,NBTTag=(CustomPotionEffects=#luckyPotionEffects,display=(Name="$e$lLucky Potion"))@luck=2
ID=potion,damage=8197,NBTTag=(CustomPotionEffects=[(Id=6,Amplifier=#rand(0,2),Duration=#randList(600,1200,1800,2400,3000,3600,4200,4800,5400,6000)),(Id=10,Amplifier=#rand(0,2),Duration=#randList(600,1200,1800,2400,3000,3600,4200,4800,5400,6000))],display=(Name="$r$c$lRestoration Potion"))@luck=2

/ orbs
ID=snowball,NBTTag=(Attributes=[(AttributeName="generic.movementSpeed",Name="generic.movementSpeed",Amount=100,Operation=1,Slot="mainhand")],display=(Name="$r$7Speed Orb"))

/ structures
type=structure,ID=nether_wart_farm@luck=1

/ bouncing items
type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=slime_ball),impact=["type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=slime_ball),impact=[\"type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=slime_ball)),amount=2\"]),amount=2"]),amount=#rand(1,3)@luck=1
type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=coal),impact=["type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=coal),impact=[\"type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=coal)),amount=2\"]),amount=2"]),amount=#rand(1,3)@luck=1

/ blocks
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=diamond_block);type=entity,ID=LightningBolt)@luck=0
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=diamond_block);type=entity,ID=LightningBolt)@luck=0

/ 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:\"$6Coin\"}}";type=block,ID=lucky:lucky_block_neutral,posY=#bPosY-3,NBTTag=(Drops=["group(type=message,ID=\"$bYour Ore wish came true!\";type=block,ID=air,posY='#'bPosY+3;type=block,ID=beacon,posY='#'bPosY+2;type=entity,ID=FireworksRocketEntity,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,tag='#'randFireworksRocket)),amount=10,posY='#'bPosY+3,posOffset='#'circleOffset(2);ID=gold_ore,amount=#rand(10,20),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=diamond_ore,amount=#rand(5,15),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=emerald_ore,amount=#rand(5,15),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:\"$6Coin\"}}";type=block,ID=lucky:lucky_block_neutral,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=FireworksRocketEntity,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,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))"]))@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:\"$6Coin\"}}";type=block,ID=lucky:lucky_block_neutral,posY=#bPosY-3,NBTTag=(Drops=["group(type=message,ID=\"$9Your wish kinda came true!\";type=block,ID=air,posY='#'bPosY+3;type=block,ID=beacon,posY='#'bPosY+2;type=entity,ID=FireworksRocketEntity,NBTTag=(LifeTime=20,FireworksItem=(id=fireworks,tag='#'randFireworksRocket)),amount=20,posY='#'bPosY+3,posOffset='#'circleOffset(2);ID=slime_ball,amount=#rand(8,16),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=snowball,amount=#rand(8,16),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=ender_pearl,amount=#rand(8,16),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=ender_eye,amount=#rand(8,16),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=fire_charge,amount=#rand(8,16),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=fire_charge,amount=#rand(8,16),posY='#'bPosY+10,posOffset='#'circleOffset(2);ID=magma_cream,amount=#rand(8,16),posY='#'bPosY+10,posOffset='#'circleOffset(2))"]))@luck=1


/ NEUTRAL /

/ stuff shooting in random directions
type=entity,ID=Item,NBTTag=(Item=(id=ender_pearl,Count=1),Motion=#randLaunchMotion(4,#rand(1,5))),amount=#rand(5,10)@luck=0
type=entity,ID=Item,NBTTag=(Item=(id=egg,Count=1),Motion=#randLaunchMotion(4,#rand(1,5))),amount=#rand(10,20)@luck=0

/ blocks
group(type=entity)@luck=0
group(type=fill,ID=air,size=(1,8,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=slime);type=entity,ID=Slime,amount=#rand(5,10))@luck=0.5
group(type=fill,ID=air,size=(1,10,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=coal_block);type=entity,ID=FallingSand,posY=#bPosY+8,NBTTag=(Block=coal_block);type=entity,ID=FallingSand,posY=#bPosY+9,NBTTag=(Block=coal_block);type=entity,ID=LightningBolt)@luck=0
type=block,ID=#randList(lucky:lucky_block_neutral,lucky:lucky_block),amount=#rand(4,16),posOffset=#circleOffset(6),reinitialize=#randList(true,false)@luck=0
group(type=fill,ID=air,size=(1,10,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=bookshelf);type=entity,ID=FallingSand,posY=#bPosY+8,NBTTag=(Block=bookshelf);type=entity,ID=FallingSand,posY=#bPosY+9,NBTTag=(Block=bookshelf))@luck=2
group(type=fill,ID=air,size=(1,10,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=emerald_block);type=entity,ID=FallingSand,posY=#bPosY+8,NBTTag=(Block=emerald_block);type=entity,ID=FallingSand,posY=#bPosY+9,NBTTag=(Block=emerald_block))@luck=2
group(type=fill,ID=air,size=(1,10,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=diamond_block);type=entity,ID=LightningBolt)@luck=0

/ chests
type=block,ID=chest,tileEntity=(Items=#chestDungeonChest)@luck=1
type=block,ID=chest,tileEntity=(Items=#chestVillageBlacksmith)@luck=1
type=block,ID=chest,tileEntity=(Items=#chestBonusChest)@luck=0
type=block,ID=chest,tileEntity=(Items=#chest(contents=[(ID=diamond,maxAmount=10,weight=10),(ID=emerald,maxAmount=10,weight=10),(ID=gold,maxAmount=10,weight=10),(ID=iron,maxAmount=10,weight=10)]))@luck=2
type=block,ID=chest,tileEntity=(Items=#chest(contents=[(ID=lucky:lucky_block,maxAmount=10,weight=10),(ID=lucky:lucky_block_neutral,maxAmount=10,weight=10)]))@luck=2

/ mobs
type=entity,ID=Sheep,amount=#rand(10,20),posOffset=#circleOffset(5)@luck=0
type=entity,ID=Cow,amount=#rand(10,20),posOffset=#circleOffset(5)@luck=0
type=entity,ID=Slime,NBTTag=(Riding=(id=Enderman))@luck=-1
type=entity,ID=Chicken,NBTTag=(Riding=(id=Ozelot))@luck=0
type=entity,ID=Sheep,NBTTag=(Riding=(id=Bat))@luck=0
type=entity,ID=Cow,NBTTag=(Riding=(id=Bat))@luck=0
type=entity,ID=Sheep,NBTTag=(Riding=(id=Wolf))@luck=1
type=entity,ID=Zombie,NBTTag=(Riding=(id=Villager))@luck=-1
type=entity,ID=Chicken,NBTTag=(Riding=(id=Creeper))@luck=-1

/ villagers
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=emerald,Count=64),sell=(id=beacon,Count=1),maxUses=1)]),CustomName="$lBeacon Vendor",CustomNameVisible=true))@luck=2
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=emerald,Count=64),sell=(id=dragon_egg,Count=1),maxUses=1)]),CustomName="$lDragon Egg Vendor",CustomNameVisible=true)@luck=2
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=emerald,Count=64),sell=(id=nether_star,Count=1),maxUses=1)]),CustomName="$lNether Star Vendor",CustomNameVisible=true)@luck=2
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=slime_ball,Count=2),sell=(id=magma_cream,Count=1)),(buy=(id=ender_pearl,Count=2),sell=(id=ender_eye,Count=1))]),CustomName="$lBall Exchange",CustomNameVisible=true)@luck=1
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=emerald,Count=1),sell=(id=diamond,Count=1)),(buy=(id=diamond,Count=1),sell=(id=emerald,Count=1))]),CustomName="$lCurrency Exchange",CustomNameVisible=true)@luck=2
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=diamond,Count=1),sell=(id=dirt,Count=1))]),CustomName="$lGreedy Villager",CustomNameVisible=true)@luck=-1
type=entity,ID=Villager@luck=0
type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=diamond,Count=#rand(20,25)),sell=(id=golden_sword,Count=1,tag=(ench=#luckySwordEnchantments,display=(Name="$e$lLucky Sword"))),maxUses=1),(buy=(id=diamond,Count=#rand(20,25)),sell=(id=bow,Count=1,tag=(ench=#luckyBowEnchantments,display=(Name="$e$lLucky Bow"))),maxUses=1),(buy=(id=diamond,Count=#rand(10,15)),sell=(id=potion,Damage=8195,Count=1,tag=(CustomPotionEffects=#luckyPotionEffects,display=(Name="$e$lLucky Potion"))),maxUses=1),(buy=(id=diamond,Count=#rand(7,12)),sell=(id=potion,Damage=16428,Count=1,tag=(CustomPotionEffects=#unluckyPotionEffects,display=(Name="$e$lUnlucky Potion"))),maxUses=1)]),CustomName="$lLucky Villager",CustomNameVisible=true)@luck=2

/ items
ID=fireworks,NBTTag=#randFireworksRocket@luck=0
ID=dye,damage=#rand(0,15),amount=#rand(10,20)@luck=0
group(ID=glass,amount=16;ID=glass_pane,amount=16;ID=glass_bottle,amount=16)@luck=0.4
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=2002,damage=9)@luck=1
ID=stick,damage=3,NBTTag=(display=(Name="Beaver snack"))@luck=0
group(ID=packed_ice,amount=16;ID=ice,amount=16)@luck=0.25
ID=painting,amount=#rand(4,16)@luck=0.25
ID=apple,amount=#rand(4,16)@luck=0.5
ID=melon,amount=#rand(16,64)@luck=0.5
type=block,ID=tnt,damage=#rand(0,1)@luck=-1
group(type=message,ID="Try again.";ID=lucky:lucky_block_neutral)@luck=0
group(type=message,ID="Double!";ID=lucky:lucky_block_neutral,amount=2)@luck=0
group(type=message,ID="Luck upgrade!";ID=lucky:lucky_block_neutral,NBTTag=(Luck=100))@luck=-2
group(type=message,ID="Luck downgrade...";ID=lucky:lucky_block_neutral,NBTTag=(Luck=0))@luck=2
ID=enchanted_book,NBTTag=(StoredEnchantments=#randomEnchantment)@luck=0
group(ID=flint;ID=iron)@luck=0
ID=crafting_table@luck=0
ID=furnace@luck=0
group(ID=quartz_ore,amount=16;ID=netherrack,amount=16)@luck=0.5
ID=wooden_shovel,NBTTag=(display=(Name="Spoon"))@luck=0
ID=wooden_sword,NBTTag=(display=(Name="Knife"))@luck=0
ID=iron_pickaxe,NBTTag=(display=(Name="Isn't it?"))@luck=1
ID=poisonous_potato,NBTTag=(display=(Name="$rPotato"))@luck=-1
ID=end_portal_frame,amount=#rand(2,16)@luck=1
ID=carrot,NBTTag=(display=(Name="Vision enhancer"))@luck=-1
ID=sand,damage=#rand(0,1),amount=#rand(10,20)@luck=0
ID=#randList(pumpkin,lit_pumpkin),amount=#rand(10,20)@luck=0
ID=melon_block,amount=#rand(10,20)@luck=0
ID=bone,amount=#rand(10,20)@luck=0
ID=milk_bucket,NBTTag=(display=(Name="Bone grow"))@luck=1
ID=stone_pickaxe,NBTTag=(display=(Name="Minely Cyrus"))@luck=1
ID=sponge,amount=#rand(10,20)@luck=2
ID=sponge,damage=#rand(0,1),amount=#rand(10,20)@luck=0
ID=#randList(coal_ore,diamond_ore,redstone_ore,lapis_ore,iron_ore,gold_ore,emerald_ore),damage=#rand(10,20),amount=#rand(10,20),reinitialize=false@luck=0
ID=dye,damage=#rand(0,15),amount=10,reinitialize=false@luck=0
ID=dye,damage=3,NBTTag=(display=(Name="Poop"))@luck=-1
ID=feather,amount=#rand(1,64)@luck=0
ID=pumpkin_pie,amount=#rand(4,32),NBTTag=(display=(Name="$rCheese"))@luck=1
ID=apple,amount=#rand(4,32),NBTTag=(display=(Name="Doctor repellant"))@luck=1
ID=cookie,amount=#rand(1,64)@luck=1
ID=soul_sand,amount=32@luck=1
ID=skull,damage=#rand(0,4),amount=4@luck=2
ID=saddle,amount=#rand(1,2)@luck=1
group:#rand(1,3):(ID=diamond_horse_armor;ID=golden_horse_armor;ID=iron_horse_armor)@luck=1
ID=iron_ingot,NBTTag=(display=(Name="Cream cheese"))@luck=0
ID=gold_ingot,NBTTag=(display=(Name="Butter"))@luck=0
ID=slime,NBTTag=(display=(Name="Jello"))@luck=0
group(ID=redstone,amount=16;ID=sugar,amount=16;ID=glass_bottle,gunpowder=16)@luck=0
ID=wool,damage=#rand(0,15),amount=64@luck=0
ID=skull,damage=3,NBTTag=(SkullOwner=textmonster404,display=(Name="$6textmonster404's Head"))@luck=0
ID=diamond,NBTTag=(display=(Name="#pName's Diamond"))@luck=1
group(ID=dirt,amount=#rand(8,32);ID=dirt,damage=1,amount=#rand(8,32);ID=dirt,damage=2,amount=#rand(8,32);ID=grass,amount=#rand(8,32))@luck=1

/ lucky structures
group:1:(type=structure,ID=chance_tower_lucky,rotation=#pDirect;type=structure,ID=lucky_choice_right,rotation=#pDirect)@luck=0
group:1:(type=structure,ID=lucky_altar_neutral;type=structure,ID=lucky_altar_lucky;type=structure,ID=lucky_altar_unlucky)@luck=0
group:1:(type=structure,ID=lucky_choice_left,rotation=#pDirect;type=structure,ID=lucky_choice_right,rotation=#pDirect)@luck=0


/ UNLUCKY /

/ effects
type=effect,ID=special_knockback,power=10,directionYaw=#rand(0,360),directionPitch=#rand(0,360)@luck=-1

/ entities
type=entity,ID=Zombie,amount=#rand(5,10),posOffset=#circleOffset(5)@luck=-1
type=entity,ID=Skeleton,amount=#rand(5,10),posOffset=#circleOffset(5)@luck=-1
group(type=entity,ID=Creeper;type=entity,ID=LightningBolt)@luck=-2
type=entity,ID=LightningBolt,delay=2@luck=-2
type=entity,ID=LightningBolt,delay=10,pos=#pPos@luck=-2
type=entity,ID=Blaze,NBTTag=(CustomName="Jerry",CustomNameVisible=true)@luck=-1
type=entity,ID=Zombie,NBTTag=(CustomName="Bob",CustomNameVisible=true)@luck=-1
type=entity,ID=EnderCrystal@luck=-1
type=entity,ID=Squid@luck=-1
group(type=entity,ID=Villager,NBTTag=(Offers=(Recipes=[(buy=(id=diamond,Count=#rand(20,25)),sell=(id=golden_sword,Count=1,tag=(ench=#luckySwordEnchantments,display=(Name="$e$lLucky Sword"))),maxUses=1),(buy=(id=diamond,Count=#rand(20,25)),sell=(id=bow,Count=1,tag=(ench=#luckyBowEnchantments,display=(Name="$e$lLucky Bow"))),maxUses=1),(buy=(id=diamond,Count=#rand(10,15)),sell=(id=potion,Damage=8195,Count=1,tag=(CustomPotionEffects=#luckyPotionEffects,display=(Name="$e$lLucky Potion"))),maxUses=1),(buy=(id=diamond,Count=#rand(7,12)),sell=(id=potion,Damage=16428,Count=1,tag=(CustomPotionEffects=#unluckyPotionEffects,display=(Name="$e$lUnlucky Potion"))),maxUses=1)]),CustomName="$lLucky Villager",CustomNameVisible=true),posY=#bPosY+1;type=block,ID=web,posY=#bPosY;type=block,ID=lava,posY=#bPosY-1)@luck=-1
type=entity,ID=Arrow,NBTTag=(Motion=#randLaunchMotion),amount=#rand(16,32)@luck=-2

/ blocks
type=block,ID=web,pos=#pPos@luck=-1
type=block,ID=tnt,damage=1@luck=-1
type=block,ID=water@luck=-1
type=block,ID=water,pos=#pPos@luck=-1
type=block,ID=lava@luck=-1
type=block,ID=lava,pos=#pPos@luck=-2
group(type=fill,ID=air,size=(1,10,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=diamond_block);type=entity,ID=LightningBolt)@luck=0
type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=web),impact=["type=block,ID=web"]),amount=#rand(10,20)@luck=-1
type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=sand),impact=["type=block,ID=sand"]),amount=#rand(10,20)@luck=-1
type=entity,ID=LuckyProjectile,NBTTag=(Motion=#randLaunchMotion,item=(id=gravel),impact=["type=block,ID=gravel"]),amount=#rand(10,20)@luck=-1
type=entity,ID=PrimedTnt,amount=10,NBTTag=(Fuse=400,Motion=#randLaunchMotion)@luck=-1
group(type=fill,ID=air,size=(1,15,1);type=entity,ID=FallingSand,posY=#bPosY+7,NBTTag=(Block=obsidian);type=entity,ID=FallingSand,posY=#bPosY+8,NBTTag=(Block=obsidian);type=entity,ID=FallingSand,posY=#bPosY+9,NBTTag=(Block=obsidian);type=entity,ID=FallingSand,posY=#bPosY+10,NBTTag=(Block=obsidian);type=entity,ID=FallingSand,posY=#bPosY+11,NBTTag=(Block=obsidian);type=entity,ID=FallingSand,posY=#bPosY+12,NBTTag=(Block=obsidian);type=entity,ID=FallingSand,posY=#bPosY+13,NBTTag=(Block=obsidian);type=entity,ID=FallingSand,posY=#bPosY+14,NBTTag=(Block=obsidian))@luck=-1
type=chest,ID=chest@luck=-1

/ items
ID=deadbush,amount=#rand(10,20)@luck=-0.5
group(ID=wooden_shovel;ID=wooden_pickaxe;ID=wooden_axe;ID=wooden_sword;ID=wooden_hoe)@luck=-1
group(type=message,ID="Put out the fire before the emeralds fall in!";type=block,ID=fire;type=entity,ID=Item,NBTTag=(Item=(id=emerald,Count=#rand(2,32))),posOffsetY=64)@luck=0
ID=rotten_flesh,amount=#rand(10,20)@luck=-1
ID=spider_eye,amount=#rand(10,20)@luck=-1
ID=#randList(rotten_flesh,egg,slime_ball,potato),NBTTag=(ench=#randomEnchantment)@luck=0

/ explosions
type=explosion,radius=1,fire=false@luck=-0.5
type=explosion,radius=2,fire=false@luck=-1
group(ID=diamond;type=explosion,radius=2)@luck=-1

/ structures
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:\"$6Coin\"}}";type=block,ID=lucky:lucky_block_neutral,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=PrimedTnt,NBTTag=(Fuse=50b,Motion='#'randLaunchMotion),posY='#'bPosY+7,amount=20)"]))@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@luck=-2
type=structure,ID=pit_trap,pos=#pPos@luck=-2

/ tnt cube you may or may not be able to mine
group(type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=0,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=0,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=0,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=0,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=0,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=0,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=0,posOffsetZ=-1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=0,posOffsetZ=-1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=0,posOffsetZ=-1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=1,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=1,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=1,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=1,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=1,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=1,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=1,posOffsetZ=-1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=1,posOffsetZ=-1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=1,posOffsetZ=-1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=2,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=2,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=2,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=2,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=2,posOffsetZ=1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=2,posOffsetZ=0;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=-1,posOffsetY=2,posOffsetZ=-1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=0,posOffsetY=2,posOffsetZ=-1;type=block,ID=tnt,damage=#rand(0,1),posOffsetX=1,posOffsetY=2,posOffsetZ=-1)@luck=-2