跳到正文

Enchant Filter

作者:Mammer

从附魔台、战利品和铁砧中移除被禁用的附魔。可通过 TOML 完全配置——非常适合服务器禁用经验修补等过于强大的附魔。

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Enchant Filter

A lightweight Forge mod for Minecraft 1.20.1 that gives you full control over what enchantments can appear in the game.  
Perfect for servers and packs where certain enchantments (like *Mending* or *Swift Sneak*) break balance.

 

Features

– Enchanting Table Filtering 

 undefined
  – Removes banned enchantments from the table.  
  – If all options are banned, rerolls the pool on lower/higher levels (configurable).  
  – If still no valid options, the slot shows as empty.  

– Loot & Anvil Filtering

 

  – Strips banned enchantments from generated loot tables.  
  – If an item has both allowed and banned enchants, only removes the banned ones.  
  – Works on anvils too — banned books or items won’t keep the disallowed enchantments.

 

Villager Trade Filtering

  – Prevents any villagers from offering banned enchantments as trades.
  – Works dynamically: if you update the banned list and reload configs, villagers will no longer sell those books.
  – If all enchantments a librarian could offer are banned, that trade slot will simply not generate.

– Configurable via TOML  

  – Located in `config/enchant_filter-common.toml`.  
  – Allows you to list banned enchantments as resource locations, e.g.:

[general]
bannedEnchantments = ["minecraft:mending", "minecraft:swift_sneak"]

  – Option to reroll enchantment pool on empty result:

fallbackLowerLevels = true

 

– Debug Logging
  – When enabled, logs filtered enchantments and fallback attempts directly to console.

 


 

🛠️ Installation

 

1. Download the latest Forge 1.20.1.
2. Drop the mod JAR into your `mods/` folder.
3. Launch the game once to generate the default config file.
4. Edit `config/enchant_filter-common.toml` to your liking.

 


⚠ Known Issues & Limitations

 

– Mixin Conflicts:  
  Mods that also inject into `EnchantmentHelper.getAvailableEnchantmentResults` may conflict.  
  If you see missing options or crashes at startup, check mod logs for mixin conflicts.

– Modpacks:  
  Works fine server-side, but clients need the mod too to avoid ghost enchantments in UI.

– UnionLib / Antique Atlas:  
  These mods have been observed to crash unrelated screens in some packs; not caused by Enchant Filter.

– Mappings:
  Built against official (MojMap) mappings for 1.20.1. Will not work on different mappings (e.g., Yarn).

 


 

📝 License

This project is licensed under the MIT License

 


 

💡 Troubleshooting

No enchantments showing in the table  
  → Verify your banned list is not blocking *all* enchantments.  
  → Set `debugLogging = true` and check console to see which enchantments are being removed.

Still seeing banned enchants in loot 
  → Some mods override vanilla loot generation completely. Our global loot modifier may not run in that case.

 


 

🤝 Contributing / Feedback

Found a bug or have a feature request?  
Leave feedback on CurseForge.

常见问题

Enchant Filter 支持哪些 Minecraft 版本?

Enchant Filter 支持 Minecraft Java 版 1.20.1,可用的加载器:Forge。下载时注意选择和你游戏版本一致的文件。

Enchant Filter 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 Forge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分