Anon's Enchantment Banner

Quick rating

Anon's Enchantment Banner

No reviews yet

Very jankily removes enchantments from natural loot pools.

World Gen Improvements
Mod Loaders
Forge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Where It Runs
Server Only

Runs entirely on the server. Also works in singleplayer.

About

Project Details

Type
Mod
License
MIT License
Latest Version
1.0.0
Authors

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.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

Source Issues Wiki Discord

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

This project has no gallery images yet.

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

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Downloads
Last Updated
CurseForge
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works