Minecraft Data Packs / Mob

Compressed Mobs

  • check_circle Functions
  • check_circle Loot Tables
  • 1,966 views, 5 today
  • 261 downloads, 0 today
  • 8
  • 7
  • 5
MedClockWork's Avatar MedClockWork
Level 44 : Master Engineer
15
Less Mobs! More Loot!

Compressed Mobs is a datapack that causes nearby mobs to combine into one while preserving their loot.

How it works
Every 10 seconds, a random mob is picked. In a 5-block radius around that mob, all other similar mobs are compressed into it. This removes those mobs from the world while leaving the picked mob compressed. Additionally, compressed mobs can compress into each other. For example, a x5 Witch and a x10 Witch will compress into a x15 Witch. On top of this, there is a random chance that a mob will spawn compressed. The default odds for this is 10% and the default value of the spawn compression is 9.

Compressable Mobs
The following mobs are compressible:
  • Zombie
  • Skeleton
  • Creeper
  • Spider
  • Cave Spider
  • Enderman
  • Guardian
  • Witch
  • Wither Skeleton
  • Zombified Piglin
  • Blaze
  • Drowned
  • Husk
  • Stray
  • Shulker
  • Zoglin
Loot
When encountering mobs, you can tell that it is compressed by the name above its head being "x##", where ## is the number of compressions it contains. If there is no name, then it is a normal mob with no compressions (x1 in a sense). When a compressed mob is killed, it will drop loot appropriate for that amount of mobs. For example, if a x20 zombie is killed, it will drop 20 times the typical amount of loot a zombie drops. Looting still affects this, so keep those Looting III swords sharp!

Effects
When a mob gets compressed enough it becomes tougher than your average mob. This starts occurring at a compression of x25, with the mob beginning to glow. Additionally, at x25 the mob can no longer despawn naturally. This may cause some lag but is made to prevent players from missing major amounts of loot.
Effect Levels and Compression Needed
At x25: Slowness, Resistance, and Strength 1
At x50: Slowness, Resistance, and Strength 2
At x75: Slowness, Resistance, and Strength 3
At x100: Slowness, Resistance, and Strength 4


Configs
There are two variables you can change to modify how this datapack runs, both being editable by in-game functions.
  1. Spawn Compress Chance: The chance that a mob spawns compressed. Accepts values from 0-100. Default Value: 10
  2. Spawn Compress Value: The value that a naturally compressed mob starts with. Accepts values from 1-100. Default Value: 9
To modify these values use the following commands where x is set to the value you want to change it to.
  1. Spawn Compress Chance: /function compressed_mobs:config/set_scc {"val":x}
  2. Spawn Compress Value: /function compressed_mobs:config/set_scv {"val":x}
CompatibilityMinecraft 1.20
Tags

Create an account or sign in to comment.

1
01/26/2024 4:52 am
Level 61 : High Grandmaster Sweetheart
imalittlhigh
imalittlhigh's Avatar
very cool idea!
1
01/25/2024 9:31 pmhistory
Level 3 : Apprentice Network
MoriHui21
MoriHui21's Avatar
Compressed mobs don't seem to attack, I stand in front of them and they just do nothing.
1
01/26/2024 2:00 amhistory
Level 44 : Master Engineer
MedClockWork
MedClockWork's Avatar
Hmm, that's quite odd. Do you mind explaining the issue in a little more detail, specifically the circumstances around which this occurred? Is the mob still moving? Does attacking the mob make it attack you? I've tried to replicate the issue myself on all the mobs at different levels of compression, but cannot get this to occur. Hopefully, I can replicate this bug and then fix it as soon as possible.
2
01/26/2024 6:09 am
Level 3 : Apprentice Network
MoriHui21
MoriHui21's Avatar
It seems that it was a random thing, it hasn't happened since then.
1
01/26/2024 10:02 am
Level 44 : Master Engineer
MedClockWork
MedClockWork's Avatar
Great! Glad to hear it wasn’t a major issue.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome