Anon's Enchantment Banner
No reviews yet
Very jankily removes enchantments from natural loot pools.
General improvements to world generation, such as bug fixes, aesthetic overhauls, or misc additions.
Forge is a popular mod loader for versions 1.1+ of Minecraft.
Community voices
Reviews
Click once to include, again to exclude, again to clear
No reviews yet. Be the first to review this project!
Get it on
Available Platforms
Compatibility
Supported Environments
Runs entirely on the server. Also works in singleplayer.
About
Project Details
For authors
Embed Badge
If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.
Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.
Identifiers
Platform IDs
Resources
External Links
About
Description
Since nothing like this seems to exist for Forge 1.20.1, I decided to hack something together quickly for personal use, then upload it in case others needed it.
Basically, this mod will make it so that if a piece of naturally generated loot uses the enchant_randomly or enchant_with_levels functions, it will reroll any enchanted items that hit an enchant from the list in the config. The list in the config is made of description ids, since those are easiest to get, so things like "enchantment.minecraft.sharpness". If you want to know what a given enchantment's ID is, check the lang files for the mod that contains it.
So, for example, if your config looks like this:
bannedEnchantIds = ["enchantment.spartanweaponry.propel", "enchantment.spartanweaponry.razors_edge", "enchantment.spartanweaponry.incendiary", "enchantment.spartanweaponry.lucky_throw", "enchantment.spartanweaponry.hydrodynamic", "enchantment.spartanweaponry.supercharge", "enchantment.spartanweaponry.expanse", "enchantment.spartanweaponry.sharpshooter", "enchantment.spartanweaponry.collectorang"]
and you roll a loot table that drops enchanted gear using enchant_randomly or enchant_with_levels, if anything in that table rolls one of those enchantments it will reroll itself continually with the same settings until it no longer has one of those enchantments. In my case, I have essentially removed the extra enchantments from Spartan Weaponry using the config above.
This mod does not affect the enchanting table, to do that you'll need something like Enchantato, which you can find over on Curseforge. It might in the future if I want to add that feature but right now it's just for loot.
NOTICE: This mod uses mixins, in fact it's basically just two mixins and two mixin interfaces. Specifically, I am mixing in to EnchantRandomlyFunction and EnchantWithLevelsFunction at TAIL on both to adjust the return values, and with some accessors and invokers to get at their non-public code. If, for some reason, you have another mod that also mixes in to those areas there may be weirdness or broken behavior.
WARNING: Hypothetically, if you try to ban every enchant, you will cause some lag. There is a hardcoded reroll limit of 100 times per item (after which it just gives you what it rolls, banned or not) to prevent infinite loops but this isn't exactly "free" computation. Still, for normal use you probably won't notice any hitching or anything. If you enter a bad value in the config (or remove a mod but forget to update the config), it simply won't do anything since it won't match an ID, near-zero cost or negative end-user effect besides a few string checks.
Other than that, I tested it and it works for me. You'll see some INFO log emits whenever it rerolls something, which will tell you it's working.
As for the license, this mod is provided with essentially zero support or guarantees of bugfixing/features, but also zero restrictions with what you do with it. I'm not uploading it to github but feel free to decompile, copy, put it on your own work, whatever. No credits necessary, but I can't stop you if you want to give them. I filed it under MIT since that's the most permissive license available.
Screenshots
Gallery
Versions
Files
Relations
Project Relations
More like this
Similar Mods
Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.
On ModDex
Community snapshot
By the numbers
Statistics
Want to reach Minecraft players?
We're looking for a server hosting partner to feature here and other parts of the site. Interested? Send us a message!
Get in touchGet it on
Available Platforms
On ModDex
Community snapshot
By the numbers
Statistics
Resources