Skip to content

Comments

Enchanter Blacklisting System#822

Open
Shibva wants to merge 4 commits intoDaFuqs:1.20.1-aria-for-paintersfrom
Shibva:Enchanter-Blacklisting-take-II
Open

Enchanter Blacklisting System#822
Shibva wants to merge 4 commits intoDaFuqs:1.20.1-aria-for-paintersfrom
Shibva:Enchanter-Blacklisting-take-II

Conversation

@Shibva
Copy link
Contributor

@Shibva Shibva commented Feb 22, 2026

see #821

- Added a new Enchantment tag and blacklist check for the Enchanter; Enchantment ids in the `enchanter_blacklisted_enchantments` tag will now be skipped for both enchanting processes. Will still work if the enchantment is on the central item already though. This will enable modpack makers and developers to restrict enchantments that are acquired though other means exclusively to their method.
- Duplicated `collectHighestEnchantments` with original functionality and refitted the second one to accept a `blacklist` arg to act as a exclusion filter.

- Adjusted Enchanter to use the filterable version of `collectHighestEnchantments` with the `ENCHANTER_BLACKLIST` tag

- Renamed the actual data tag from `blacklisted_enchantments` to `enchanter_copying_and_applying_blacklisted` as requested

- add in a blank tag under Enchantment `enchanter_copying_and_applying_blacklisted` as requested by Daf, it will be empty but there to suggest its existence to those who crawl through mods looking for ways to configure stuff lol

- Made a suggested adjustment by IDEA to simplify a part (see line 27 in SpectrumEnchantmentTags.java)

- Client tested the workspace for the desired functionality after changes were made
- Did the same thing but with items now, only difference it only for the copying while the applying still works if its on the central item
   - The purpose of this is to restrict items that may come pre-enchanted if a modpack developer decides to restrict them (I figured id do this too while I was at it)

 - Copied and retooled the `isIn()` method in `SpectrumEnchantmentTags` for `SpectrumItemTags` (and it worked!)

 - Created a new blank tag named `enchanter_copying_and_applying_item_blacklisted`, empty by default
 - Tested it again

 EXTRA: Moved `Malum` Compat back under the connector restricted check due to differences throwing NoSuchField errors (thanks Farbicators of Create Porting Lib >:L )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant