Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shield Enchant compatibility with Basic Shields Mod #15

Open
BioMasterZap opened this issue Feb 23, 2024 · 1 comment
Open

Shield Enchant compatibility with Basic Shields Mod #15

BioMasterZap opened this issue Feb 23, 2024 · 1 comment

Comments

@BioMasterZap
Copy link

I am not sure which end the issue is on but for Qu Enchantments v1.3.8 on Fabric 1.20.4 I am unable to get Bashing and Reflections on modded shields, only the vanilla shields. The shield mod I am using is Basic Shields v1.4.1 (this is a 1.20.2 release that works for 1.20.4), which requires Fabric Shield Lib (v1.7.2).

Either Basic Shields or Fabric Shield Lib does allow for shields to be enchanted and they can get Unbreaking, but they cannot get Bashing or Reflection through enchantment table or books and anvil. They are tagged as #fabric:shields and I used Crafttweaker to add #c:shields but that did not seem to fix it. If there is anything else I can do on my end through Crafttweaker or Datapacks to get the modded shields working with the enchants or if it is clearly an issue with the other mod, let me know.

@Quplet
Copy link
Owner

Quplet commented Feb 24, 2024

Unfortunately, whether something can be enchanted with certain enchantments is not controlled by tags at this point. It must be hard-coded into the logic. Specifically an enum in EnchantmentTarget.java. My logic added to this enum (https://github.com/Quplet/Qu-Enchantments/blob/1.20.X/src/main/java/qu/quEnchantments/asm/Shield.java) specifically targets ShieldItem for its enchantment ability. Meaning any mod that adds a shield to the game that extends from the base Shield item will work. Unfortunately looking at Fabric Shield Lib source, they make their own shield item from scratch, ignoring the in-game one. Unfortunately, I can't exactly allow for their shields to work without hardcoding in support for that specific library, which I'm not particularly fond of doing. Seeing that this library is officially supported by Fabric I might consider making an exception. I'll see.

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

No branches or pull requests

2 participants