Pillage the Village Changes History

v1.0.6
Structures:
-Pillagers Town - introduced a potential temporary fix for a certain scenario randomly not executing fully


v1.0.5
Config:
-All of the options are now saved properly
-Resources check does not instantly apply when enabled in config if already been passed during a session

Algorithms:
-Loading - fixed one-time procedure applying for each world load
-Hard reload - fixed procedure executing multiple times after one click


v1.0.4
Mobs:
-Grand Illusioner - fixed bugs
-Grand Illusioner - rebalanced some parts of the fight
-Grand Illusioner - added missing notifications
-Witch - is now omitted when checking for mobs in a certain scenario

Structures:
-Pillagers Town - changed searching radius for a certain scenario


v1.0.3
Code:
-Reaplied 1.0.1 fix for 1.0.3 first loading

Mobs:
-Illusioner - cloaks now wear off when Illusioner is in water to prevend a critical issue
-Illusioner - introduced temporary solution for boosted cloaking applying always after the first decloaking


v1.0.2
Code:
-Fixed 1.0.1 data fix not applying

Items:
-Charged Lapis Lazuli - fixed item interacting with other Charged Lapis pieces

Structures:
-Ghost Bastion - removed stone from hoglin stable stairs

Advancements:
-Everlasting Fortress - fixed advancement not unlocking


v1.0.1
Mobs:
-Illusioner
	-Fixed spawning chances when player has bad omen
Items:
-Totem of Confusion
	-Fixed not players not getting nausea effect
	-Added players rotating 180 degrees
Configurable menu (CONFIG):
-Fixed some notifications not popping up
Readme:
-Added instagram link


v1.0
Side-note:
-Most of upcoming information serve as default setup. You can modify most options to your will with data pack config.
Mobs:
-Illusioner
	Behavior:
	-Illusioner has Resistance 4 by default
	-Fight splits in 3 phases:
		Phase one: 
		-Illusioner has a hight chance to cloak themselves as one of the various mobs every 15 seconds after being in regular form (list below)
		-If cloaked Illusioner gets damaged, there is 50% chance of decloaking
		-If cloaked Illusioner does not get damaged in 3 minutes, mob will decloak by their own
		-In cloak, Illusioner has a 50% chance of taunting once every minute
		-Cloaks can not be fooled with Seek Goat Horn
		-Illusioner has 30% chance to cast cloning spell when getting hit
		-Maybe do not try to pick up items left behind an illusion
		Phase two: 
		-Begins when Illusioner drops below 10 health points,
		-Illusioner will cloak themselves as one of the various mobs every 5 seconds after being in regular form (list below)
		-In this phase, stronger cloaks have much higher chance of appearing, strong cloaks will take priority above biome exclusive cloaks, excluding Mushroom Island cloak
		-Illusioner has following chances to cast cloning spell when getting hit:
			0% chance on Easy
			10% chance on Phase 1 and 40% chance on Phase 2 and 3 in Normal
			30% chance on Phase 1 and 50% chance on Phase 2 and 3 in Hard
		Phase three:
		-Begins when Illusioner drops below 5 health points
		-Dealing damage when cloning spell is casted will always destroy the clones
		-Breaking Cloak will instantly start Cloning Spell attack
	-Cloning spell:
		-Cloning spell can spawn:
			2-5 clones on Normal
			5-10 clones on Hard
		-Cloning is an ability Illusioner will try to use each time after getting hit. If successful, Illusioner creates 6 copies of themselves, from which, each one can deal damage to player.
		-Copies have 50% chance of disappearing after getting hit
		-All copies have 50% (Phase 1), 65% (Phase 2) or 100% (Phase 3) chance of disappearing after the real Illusioner gets hit
		-Illusioner can not cloak when cloning spell is active
		-Illusioner will gain Regeneration I for duration of Cloning Spell on Hard
		-Copies can not be fooled with Seek Goat Horn
	Raids:
	-Illusioner has 2 different means of joining raids:
		Way one:
		-It will disguise as a different raider, except for Ravagers, Evokers and Raid Captains:
			Wave 5:
			-At least 1 disguised Illusioner
			-10% chance per each of the remaining raiders
			Wave 6:
			-10% chance per each raider
			Wave 8:
			-At least 1 disguised Illusioner
			-20% chance per each of the remaining raiders
		Way two:
		-Illusioner will also spawn in raids as a regular, non disguised mob
			Wave 8:
			-2 non disguised Illusioners
	Natural Spawning:
	-If player has Bad Omen effect of level 4 or higher, Illusioner has a chance to spawn in disguise as one of the mobs in the overworld (list below):
		2% for level 4
		5% for level 5
		45% for level 6
	-If a mob is a disguised Illusioner, it will reveal its true form after getting player in radius of 5 blocks
	-Disguised Illusioner will not taunt
	Drops:
	-(Disabled by default) If participates in a raid, has a chance (65% on Easy and Normal, 80% on Hard) to drop the following:
		0-1 additional Emeralds
		One of the following entries:
		-0-5 additional Emeralds
		-Enchanted Book (level 30, possibility of treasure enchantments)
		-Damaged iron tools (might be enchanted with 19 levels worth of points)
		-Damaged iron armor (might be enchanted with 19 levels worth of points)
	-Totem of Confusion (70% chance)
	-0-1 Emeralds
	-0-2 Arrows
-Grand Illusioner
	An Illusioner whose illusionistic powers are beyond an ordinary Illusioner's capabilites. Unlike most Illusioners you can find, Grand Illusioner has chosen to pratice only defensive magic what makes his way easier to defeat, yet more challenging to overcome.
	This mob is hiding inside its castle located in some of Pillager Towns. Though noone knows how to enter it, as it is protected by a spell... We do not know what this character is capable of, but all we know is  S T A Y   A W A Y . . .
	Behaviour:
		-Unknown
	Drops:
		-Nothing but there are rumors of unseen treasures kept at the castle attic.
-Piglin Emperor
	A boss variant of Piglin. Can be encountered in Guard Bastion Remnant. It is a Piglin Brute that gained their glory and strength through countless battles.
	Behaviour:
		-Fight splits into 5 phases. With each one, Emperor becomes faster and stronger, but its knockback resistance decreases, as armor craks.
		-Healing:
			Starting with phase 2 Emperor will start to use Potions of Regeneration if its opponent turns out to be a coward.
			Carries no more than 5 potions.
		-Fire resistance:
			Emperor will drink Fire Resistance potion if exposed to burning damage.
			If is in lava, it will start to swim in it until it gets out.
			Even if it has Fire Resistance, lava and fire are still preferably avoided.
		-Charge attack:
			Starting with phase 3 Emperor can use charge. If if can not catch up to a player it will stop briefly and start charging in player's direction.
			Thanks to its incredible condition, it can run that way up to 9 seconds.
			Direct hit resulted from this attack will knock player back with strength depending on current fight phase.
		-Player throw attack:
			Starting with phase 4 Emperor cas throw player around the hall.
			If player is really close to the Emperor for too long, it will deal a powerful attack that severely injures player and knocks them back far.
		-Battle cry:
			When Emperor hits phase 5, it will roar boosting all nearby Piglins. ALL of them.
	Drops:
		Double: 1-4 Netherite Scrap, 2-5 Ancient Debris or 1 Netherite Ingot.
		Singular: 1-2 Warped Fungus Cloths (amount can be increased by Looting).
	Minions:
		-Royal Piglin Guard - a Piglin equipped with a Netherite Helmet, a Golden Chestplate and a Golden Axe. All of them possess powerful enchantments and can not be obtained. Royal Guards learnt to ignore gold thrown by intruders, but still can not help themselves if there is a possibility to barted.
		-Royal Piglin Archer - a Piglin equipped with a Netherite Helmet, a Golden Chestplate and a Crossbow. All of them possess powerful enchantments and can not be obtained. Royal Archers learnt to ignore gold thrown by intruders, but still can not help themselves if there is a possibility to barted.
		-Elite Piglin Guard - a rare variant of Royal Piglin Guard equipped with a Netherite Helmet, a Netherite Chestplate and a Golden Axe. All of them possess even more powerful enchantments and can not be obtained. Elite Guards learnt to ignore gold thrown by intruders, but still can not help themselves if there is a possibility to barted.
		-Elite Piglin Archer - a rare variant of Royal Piglin Archer equipped with a Netherite Helmet, a Netherite Chestplate and a Crossbow. All of them possess even more powerful enchantments and can not be obtained. Elite Archers learnt to ignore gold thrown by intruders, but still can not help themselves if there is a possibility to barted.
-Evoker
	Totem of Undying drop has been changed, so that it will only drop if Evoker was spawned inside of a Woodland Mansion or if is a part of final raid wave for Bad Omen 5 or 6
	(Disabled by default) If participates in a raid, has a chance (65% on Easy and Normal, 80% on Hard) to drop the following:
		0-1 additional Emeralds
		One of the following entries:
		-0-5 additional Emeralds
		-Enchanted Book (level 30, possibility of treasure enchantments)
		-Damaged iron tools (might be enchanted with 19 levels worth of points)
		-Damaged iron armor (might be enchanted with 19 levels worth of points)
-Pillager
	Drops:
		0-2 arrows
	If participates in a raid, has a chance (65% on Easy and Normal, 80% on Hard) to drop the following:
		One of the following entries:
		-0-5 additional Emeralds
		-Enchanted Book (level 30, possibility of treasure enchantments)
		-Damaged iron tools (might be enchanted with 19 levels worth of points)
		-Damaged iron armor (might be enchanted with 19 levels worth of points)
-Vindicator
	If participates in a raid, has a chance (65% on Easy and Normal, 80% on Hard) to drop the following:
		0-1 additional Emeralds
		One of the following entries:
		-0-5 additional Emeralds
		-Enchanted Book (level 30, possibility of treasure enchantments)
		-Damaged iron tools (might be enchanted with 19 levels worth of points)
		-Damaged iron armor (might be enchanted with 19 levels worth of points)
-Witch
	(Disabled by default) If participates in a raid, has a chance (65% on Easy and Normal, 80% on Hard) to drop the following:
		0-1 additional Emeralds
		One of the following entries:
		-0-5 additional Emeralds
		-Enchanted Book (level 30, possibility of treasure enchantments)
		-Damaged iron tools (might be enchanted with 19 levels worth of points)
		-Damaged iron armor (might be enchanted with 19 levels worth of points)

Items:
-Totem of Confusion
	A new item that can be obtained by defeating Illusioner:
	-Activates the same way as Totem of Undying
	-Grants Absorption 1 for 5 seconds, Regeneration 1 for 30 seconds and Speed 2 for 5 seconds
	-Makes all aggressive, neutral, and illusion mobs in radius of 20 blocks completly passive for 7 seconds
	-Gives all players, aggressive, neutral, and illusion mobs in radius of 20 blocks Nausea 1 for 30 seconds and Slowness 2 for 5 seconds
-Warped Fungus Cloth
	A new item that can be obtained by defeating Piglin Emperor boss:
	-If Piglin picks it up, it will be nauseated for 10 seconds but also becomes immune to zombification.
-Charged Lapis Lazuli
	A mysteriously empowered piece of Lapis Lazuli somehow found its way into our hands:
	-Can increase level of the first enchantment listed on the list
	-Is destroyed afterwards
	-Enchantment level can not be increased again
	-Can bypass maximum level cap
	-Affected item will have its repair cost increased by 1
-Goat Horn: 
	Using "Seek" Goat Horn has following effects:
	-Iron golems in radius of 256 blocks will become aggressive towards the player.
	-Pillagers, Vindicators, Evokers, Vexes, Witches and uncloaked Illusioners will become passive for 3 seconds once.
	-Does not have any further effet on once affected raiders, vexes, cloaked Illusioners and Illusions.
	-Has 2.3% chance of granting one level of Bad Omen status effect.
	Using "Ponder" or "Dream" Goat Horn has following effects:
	-A chance to negate bad omen effect if player has one.
	-A small chance to reset duration of Hero of the Village effect if player has one. Resetting will get rid of the icon in first person view.
	Using "Admire" or "Sing" Goat Horn has following effects:
	-If there are Iron Golems aggressive to any player, they becomes pacifist if their target is not in sight during usage of the item.
	Using "Yearn" Goat Horn has following effects:
	-If there is a Warden within 1 block radius, its tendrils will explode inflicting damage to Warden and forcing it to retreat, however it will come back after 4 seconds and at that point it knows your exact location. It will be granted temporary speed boost by the sculk and its health will be regenerated by a certain amount.
	-If there is a Warden within 1 to 256 blocks radius, there is a 70% chance its tendrils will overload or explode (40%*70%) making it lose track of player and possibly retreating, however there is a 22% chance that Warden will come back after 5 seconds (80%*40%*70%). While hiding, sculk starts to heal wounded Warden.
	Using "Call" or "Feel" Goat Horn has following effects:
	-Grants glowing effect for 1 second to all mobs in radius of 20 blocks.

Mechanics:
-Raids
	-Music:
		-If player participates in a raid, special music will be played during the final wave.
		-If player wins a raid and has already unlocked challenge tied to that, special ending music will play.
		-If player is away from the event place, music will stop playing after some time.
		-If player is reenters raid area after music stopped, it will start to play again1.
		-Raid music needs Pillage the Village Resource Pack to play
		-Raid music volume can be controlled with Music slider
	-Illusioner
		-Illusioner will spawn as a part of raids
-Bad Omen
	Effect granting system has been reworked to resemble one created by Team Abnormals:
	-Bad Omen can not be obtained by defeating Illager captain anymore
	-Singular level of the effect will be granted by throwing an Ominous Banner into the fire or lava
	-Effect can be stacked up to level 6, which is 1 level higher than in vanilla
	-Getting Bad Omen will be confirmed by an animation
	-Animation has a cooldown, so if banners are burnt rapidly, it will not always play
	-If player obtains level 4 of the effect or higher, Illusioner will start to spawn naturally

Structures:
-Ghost Bastion Remnant:
	An abandoned or killed out Bastion Remnant that can be found in Soul Sand Valley.
	During the time of abandonment it has been looted by trespassers, so it is likely you will not find any gold in here.
-Guarded Bastion:
	Bastion Remnant variant where The Piglin Emperor can be found.
	Does not have ghost variant.
-Swamp Village:
	Overgrown version of Plains Village that can generate on Swamp.
	Has zombie variant.
-Badlands Village:
	Old american western themed towns that generate on Badlands and Wooded Badlands.
	Has abandoned variant.
-Jungle Village:
	Village containing houses on trees, generates in Jungle.
	Has zombie variant.
-Pillager Town:
	A town full of Illagers in similiar fasion to villages, that can generate in Dark Forest biome.
-Plains Village:
	Now can generate on Sunflower Plains.
	Villagers do not despawn.
-Taiga Village:
	Now can generate on Snowy Taiga.
	Villagers do not despawn.
-Desert Village:
	Villagers do not despawn.
-Savanna Village:
	Villagers do not despawn.
-Snowy Village:
	Villagers do not despawn.
-Pillager Outpost:
	Now can generate on Sunflower Plains, Snowy Taiga, Swamp, Badlands and Wooded Badlands.

Advancements:
-7 Years Bad Omen - Burn an Ominous Banner.
-Fake This - Defeat an Illusioner. Who knows, maybe they kept something magical?
-It is gone! - Destroy an Illusioner's cloned illusion.
-We All Bear Many Different Masks - Encounter every Illusioner's cloak
-The Jungle Book - Find secret jungle village
-Shadow Village - Find a pillager town
-Across the World - Find every village
-Everlasting Fortress - Find a Ghost Town of Bastion Remnants
-Even You Brute? - Find a Guarded Bastion Remnant with The Piglin Emperor
-Long Live the King - Defeat The Piglin Emperor
-The Power of Sound - Discover a special ability of every Goat Horn
-Unlimited POWAAAAAH! (v2) - Find Charged Lapis Lazuli 
-Upgrades, People, Upgrades - Conduct the energy of Charged Lapis to an item
-This isn't even my Final Form! - ???

Configurable menu (CONFIG):
-Config will appear to every eligible player after every reload or after spamming crouch key 5 times.
-To become eligible or to gain root access you have to be present in the world during the first loading of data pack.
-Root access list can not be modified with config settings - rank has to be granted or revoked manually.
-Config offers 6 different tabs of switches controlling various settings for many additions of this pack.
-Cheats permissions (level 2) are needed for player to be able to use config

Illusioner Cloak and Disguises:
	-Cloaks:
		Mushroom Island:
		-Mooshroom (red)
		Jungle exclusive:
		-Ocelot
		-Panda (any variant)
		Plains exclusive:
		-Llama (all skins)
		-Wolf
		Sandy biomes exclusive:
		-Husk
		-Turtle
		Snowy biomes exclusive:
		-Stray
		-Polar Bear
		-Snow Golem
		-Fox (white)
		Taiga exclusive:
		-Wolf
		-Fox (red)
		Common:
		-Vindicator
		-Pillager
		-Evoker
		-Pig
		-Sheep (all natural colors)
		-Cow
		-Chicken
		-Rabbit (skin biome dependent, all natural variants)
		-Cat (all skins except black cat)
		-Goat
		-Ravager
		-Skeleton
		-Spider
		-Cave Spider
		-Slime (random size)
		-Zombie
		-Drowned
		-Zombie Villager (skin biome dependent)
		-Witch
		-Trader Llama
		-Villager (skin biome dependent)
		-Wandering Trader
		-Allay
		Common strong (higher chance when in phase 2 and 3)
		-Cat (all skins except black cat)
		-Rabbit (skin biome dependent)
		-Allay
		-Ravager
		-Evoker
		-Vindicator
		-Slime (random size)
		-Cave Spider
		-Villager (skin biome dependent)
		Accessible but disabled by default:
		-Cat (black skin)
		-Rabbit (killer and toast skin)
		-Sheep (non naturally occuring colors)
		-Mooshroom (brown)
	-Disguises:
		-Pig
		-Cow
		-Sheep
		-Chicken
		-Horse
		-Donkey
		-Villager
		-Wandering Trader
		-Turtle
		-Cat
		-Ocelot
		-Wolf
		-Llama
		-Rabbit
		-Axolotl
		-Iron Golem
		-Spider
		-Cave Spider
		-Zombie
		-Zombie Villager
		-Husk
		-Stray
		-Enderman
		-Goat
		-Panda
		-Polar Bear
		-Creeper
		-Pillager
		-Vindicator
		-Witch
		-Frog