Myrmex

Myrmex are cantankerous arthropods that dwell in underground hives and maintain an elaborate caste system.

Appearance
Although Myrmex differ in body plan depending on what caste they are, they all resemble giant insects (more specifically, ants) with hard, chitinous armor, 3 pairs of walking legs, a moderate-sized thorax, a moderate-sized head with large, yellow eyes and large mandibles, and a large, bulbous abdomen ending in a sharp stinger. As eusocial arthropods, the Myrmex are quite diverse in body plan, and come in 5 different castes, with most castes having many unique features:
 * Workers have the standard Myrmex body plan, with 3 pairs of walking legs, a body held parallel to the ground, and a bulbous abdomen.
 * Soldiers resemble the Workers, but are slightly larger in size, have a slightly darker body pattern, and have larger mandibles.
 * Sentinels differ the most from the standard Myrmex body plan; their first pair of walking legs have been modified into raptorial forelegs, their abdomen has been modified into a long, curved, scorpion-like tail, and they stand upright, much like a praying mantis.
 * Royals resemble the Workers, but are much larger in size, have a slightly lighter body pattern, and boast 2 pairs of wings that they can fly around with.
 * The Queen is the largest of the Myrmex castes, and bears a resemblance to the Worker, but with a pair of horns on top of her head, and with a long, pulsating, sac-like abdomen.

Myrmex come in 2 colors, depending on where they are found; desert Myrmex are brown in color, while jungle Myrmex are cyan in color.

Myrmex larvae are white in color, and lack limbs and mandibles, making them resemble small worms. Myrmex pupae are also white in color, although their body plan resembles their adult forms far more than the larvae.

Spawning
Myrmex can be located in Myrmex Hives, vast, labyrinthine, underground nests that are made of resin and bioluminescence, and can be found in Desert and Jungle biomes.

Drops
Upon death, Myrmex drop Myrmex Chitin (corresponding to the Myrmex variant), Myrmex Resin Chunks (also corresponding to the Myrmex variant), and Myrmex Stingers. How many of each drop a Myrmex yields depends on what caste it is in:
 * Workers drop 0-2 pieces of chitin, 0-1 resin chunks, and 0-1 stingers.
 * Soldiers drop 0-3 pieces of chitin, 0-3 resin chunks, and 0-1 stingers.
 * Sentinels drop 0-4 pieces of chitin, 1-4 resin chunks, and 0-1 stingers.
 * Royals drop 0-5 pieces of chitin, 1-6 resin chunks, and 0-1 stingers.
 * Queens drop 5-12 pieces of chitin, 5-12 resin chunks, and 0-1 stingers.

Behavior
All Myrmex castes are naturally hostile to players and villagers as well as Myrmex not from the same hive, but certain castes, such as soldiers and sentinels, will attack anything that comes nearby. All Myrmex will attack intruders by biting them and poisoning them with their stingers; however, each Myrmex caste behaves differently from one another, and carries out different tasks.

Myrmex larvae and pupae are completely passive, and will simply wiggle around in place.

Castes
Myrmex come in 5 different castes, each with its own unique behavior:

Workers
Workers are the laborers of the hive, and will often leave the hive to forage for food and other resources, right before bringing it back to the hive and storing it in cocoons found in the food rooms. As well as this, they will sometimes carry eggs, larvae, and pupae from the Queen's residence to the nursery rooms. They are the weakest out of all the Myrmex castes, as their bite only does 1.5 hearts (3 HP) of damage, and their sting only inflicts Poison II for 2 seconds.

Soldiers
Soldiers serve as the Workers' bodyguards, following them around and protecting them from nearby threats as well as helping them find food by subduing prey in their vicinity. As such, they are stronger than their protégé; although their bite deals 3 hearts (6 HP) of damage, their sting is even more dangerous, inflicting Poison III for 9 seconds.

Sentinels
Sentinels serve as the hive's covert operations units, and are the deadliest of all the Myrmex castes. They will stay near the entrance of the hive, assuming an ambush posture and camouflaging with the block that makes up their environment (sand for the desert variant and leaves for the jungle variant); once a prey item or intruder gets near, it will spring into action and relentlessly attack its target. Sentinels are lethal due to a combination of incredible attack damage and fast, multi-hitting attacks; they can hit targets 3 times in a row with their foreleg slashes (dealing 4.5 hearts (9 HP) of damage with each slash), they can sting twice in a row (inflicting Poison IV for 4 seconds with each sting), and, finally, they are capable of snagging targets with their forelegs, right before proceeding to damage them over time by taking bites out of them with their mandibles.

Royals
Royals are the hive's means of reproduction. Upon leaving the hive, they will take to the skies and start flying around in search of a mate. They will not go after any nearby players unless aggravated. Once two royals find each other, they will start emitting heart particles, and will proceed quickly fly into each other, fall down to the ground, and start mating. Once this process is over, one of the Royals immediately dies, while the other becomes a Queen and digs into the ground, spawning a new colony.

Queen
The Queen is the matriarch of the hive, as well as its sole reproductive member. She will usually walk around in the single giant room she inhabits, constantly laying eggs that hatch into larvae. However, despite being the reproductive unit of the hive, she is still capable of defending herself very well; her bite does 5 hearts (10 HP) of damage, and although her sting only inflicts Poison III for 9 seconds, it inflicts incredibly heavy knockback upon her foes.

Usually, there will be only one Queen in a hive, and without her, reproduction will stop, and the other members of the hive will stop working as efficiently as they usually do, leaving them vulnerable to predation; thus, if you kill the Queen, the entire colony crumbles.

Reputation
Reputation is arguably very important when dealing with Myrmex; as Myrmex are incredibly complex creatures, forming a bond with them is somewhat important. Since Myrmex are hostile at first, the only action a player can take to raise their reputation within a Myrmex hive is to throw resin chunks (corresponding to the Myrmex type) near a Worker; if the Worker does not already have an item in her mandibles, she will collect the resin and bring it back to the hive, raising the player's reputation by 5. The minimum reputation one can have is always 0, and the maximum reputation one can get themselves to is 100.

A good strategy to raise one's reputation within a hive is to throw resin all around the entrance of the hive. If there are many Workers present, they will rush to and fro, collecting the resin and bringing it back to the hive; this will quickly raise the player's reputation.

However, one should exercise caution when trying to raise their reputation within a Myrmex hive, as attacking and/or killing Myrmex will damage your reputation with the hive; attacking certain castes will damage one's reputation more than others.

An important thing to note about reputation is that it is not shared by all players in a server; throwing resin will only change the reputation of the player that threw it.

Values coming soon...

Neutrality
If a player manages to reach a reputation of 25, all Myrmex castes in the hive will turn neutral towards them. Should the player go below a reputation of 25, all Myrmex castes will turn hostile towards them again.

Trading
If a player manages to reach a reputation of 50, all Myrmex castes in the hive will become willing to trade with them. Trading with a Myrmex works much like trading with a villager, as you must give them a certain item to get another in return; however, unlike villagers, which use emeralds as currency, Myrmex use resin corresponding to their environment as currency. Each caste of Myrmex has varying trades that will be unlocked similarly to how villagers unlocked trades prior to 1.14. Trades can vary slightly in quality, with some individuals requesting or returning more or less than others. Prices may not be exact, and have been determined using brief multi-Myrmex tests.

A successful trade with a Myrmex will raise a player's reputation by 2, and the following regeneration that takes place will raise the player's reputation by 1, amounting to a total of 3 reputation points gained during the process.

Should the player go below a reputation of 50, their trading privileges will be revoked.

Hive Control
See also: Myrmex Staff

If a player manages to reach a reputation of 75, they will be able to control the hive using a Myrmex Staff corresponding to their environment. In order to activate the staff, one must interact with a Myrmex with the staff in their hand. From there on, one can use it to delete certain rooms within the hive, as well as to disable the Queen's reproductive abilities; by sneaking and using the staff, one can also add new rooms to the hive at their current position. To add a new room, simply sneak and right-click with the staff while inside the hive to open up a GUI that shows a list of rooms the player can add.

Should the player go below a reputation of 75, their hive-controlling privileges will be revoked.

Hatching
If a Myrmex Queen is hatched from an egg, she will bond with the player closest to her, and that player will have a permanent reputation of 100 within the hive she later creates.

Any other Myrmex egg placed by the player will hatch into a rogue Myrmex. Myrmex colonies may spawn near underground structures like mineshafts