Minecraft Data Packs / Other

Slime Remover [but its not all of them]

  • check_circle Functions
  • check_circle Predicates
  • 2,348 views, 1 today
  • 256 downloads, 0 today
  • 5
  • 0
Aeases's Avatar Aeases
Level 11 : Journeyman Miner
0
A Datapack that removes most of the slimes from your world, while keeping a small amount of them to ensure they don't go extinct.

(the scoreboard isn't constantly on the sidebar unless you manually enable it)


Technical Explanation (how it works):
When the datapack is loaded it creates a dummy scoreboard called "slimeamount",

Every Tick 2 Functions are constantly repeated;


- The first one is the main one, it will execute a command as every slime on the map and increment (increase) the scoreboard by 1 for every slime loaded, since this happens every tick (with resets so it doesn't just go up forever) it will store how many slimes are alive currently. After this that function will check how many slimes are currently alive, if its under 10 it will give every slime alive at the time the "goodslime" tag, these come up later, if it is above 10 this command is not executed, the next command in line checks if the score is above 10, if it is it will call upon the kill function which kills all slimes that Don't have the goodslime tag,
- The Second function is really simple, it just stores how many slimes there are with the goodslime tag and keeps updating it, ok back to function 1

- After brutal murder, function 1 checks how many slimes are alive with the goodslime tag if it is less than 4 it will spawn 1 slime with the goodslime tag on every slime that has the goodslime tag 15 blocks away from it, this is necessary since sometimes you get unlucky and slimes spawn in too fast preventing most of them from getting the goodslime tag, leaving you with no slimes

- And finally if there is no slimes with the Goodslime tag it will spawn a single slime with the tag ~15 away from any entity that isn't a minecart, chest minecart, furnace minecart, item frame, item, arrow, or player
CreditBoas - I Stole his teleporting the slimes under the void to avoid constant slimeball drops idea
CompatibilityMinecraft 1.18
toMinecraft 1.19
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome