Skip to content

xX-Alberto-Xx/simple-random-drops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Simple Random Drops

Trying to beat Minecraft with randomized loot drops has been a trend since it was invented by SethBling back in July 2019. Now you can even try this challenge with a client-side mod or on a server with a custom plugin, but installing and setting up either of them can be a bit of a hassle, so the simplest way you can play it on your own is with a datapack that shuffles the loot tables around, because you just have to import it during world creation and it'll work out of the box.

This is how SethBling originally randomized the drops: he wrote a Python script that took Minecraft 1.14's loot table files, shuffled them around with a seed and finally compressed them into a datapack zip file. But the main issue with his approach was that the script was bundled in a zip with a copy of 1.14's loot tables, that it used to generate the randomized datapack, so with each new Minecraft version, making it work required updating that set of loot tables to match the new version's, which is a somewhat tedious process, mostly because it requires continuous maintenance on every Minecraft update.

This is proven by the fact that all online generators I've found of random drops datapacks have been updated for a while, but stopped at a certain point. For example, Fasguy's Loot-Table Randomizer covers a lot of versions, but doesn't go past 1.20.3 for some reason, so if you want to play on 1.21 or newer versions, you have to resort to mods or server plugins...

Unless you use this script! I've designed it in a way that stays true to SethBling's original approach, but is universal and can work with any Minecraft version where it's possible (1.14's snapshot 18w43a or later), so it's always going to be immediately available for use in the foreseeable future.

So how do I use it?

It's simple! Here are the steps:

  1. Download the script;
  2. Install a somewhat recent Python version if you don't have it (when it's installed, the script file should have a Python icon and not a generic one);
  3. Double-click the script (or run it in a terminal if you want to be fancy);
  4. Follow the instructions it gives you;
  5. Enjoy!

The script will first check if there are versions you've already played with the official Minecraft launcher, because:

  • it's likely that you want to try random drops on a Minecraft version you've already played, instead of one you're less familiar with;
  • use of the official launcher is quite common;
  • the official launcher stores the played versions in a predictable location, so the script can take a shortcut: there's no need to download them, because they're already available!

If it finds any, it'll ask you to pick one of them (or, if only one is found, to confirm it), but you can always choose to decline and generate a datapack for a different version. In that case (or if no version is found, either because the official launcher is not installed or because it is but you've never actually used it), you'll be asked what version you want and the script will automatically download it in a temporary location to create the datapack from it!

The actual generation works exactly the same as how SethBling's script used to do it, even though it's coded in a slightly more compact way: the loot tables are simply shuffled around, no matter how many they are (and this is another reason why the script is universal). In addition, to make the game beatable, all entities' loot tables are edited to remove the minecraft:killed_by_player condition: this way if, for example, the blaze's loot has been assigned to a block (which is very likely), you can still get your blaze rods from it, because there won't be an unsatisfiable condition stopping you. (You can't "kill a block"!)1

Even with this fix, though, it's still possible that you get unlucky and the game becomes hard to beat or even impossible. This is why, if you ever get stuck and don't know what to try, you can open the datapack zip file and inside it you'll find a cheatsheet.txt, where you'll be able to see, for each loot table, which other one it's been assigned to. This way you can trace back each step by searching around in the file, hopefully stumbling upon something you can easily obtain.

If you get really unlucky and still can't figure it out, you can simply roll another datapack and reset; no one will blame you for it!

Footnotes

  1. SethBling's original generator fixed this in the bundled assets, not in the script: he manually edited the blaze loot table to remove the condition, but didn't touch the rest of the files. This script instead modifies on-the-fly all the loot tables that need the fix, so it's going to work with all entities' drops (like ender pearls from endermen), even if new ones are added in the future!

About

A Python script that allows you to easily create a "random drops" datapack for any version of Minecraft where it's possible.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages