Fuzss / universalenchants

Better enchantments! Use them on all tools and weapons. Infinity crossbow, or looting trident anyone?
https://www.curseforge.com/minecraft/mc-mods/universal-enchants-forge
Mozilla Public License 2.0
3 stars 3 forks source link

[Bug]: Incompatibility with Tetra Modular items #39

Open Gaz-tec opened 1 year ago

Gaz-tec commented 1 year ago

Mod Loader (Required)

Forge

Minecraft Version (Required)

1.19.2

Mod Version (Required)

4.2.14

Notes (Required)

Current Behaviour: Once made modular by Tetra, Tools and Weapons are no longer able to be enchanted. Levels are taken but enchanting books are refunded and no enchants are applied.

Steps to reproduce:

  1. Take a Bow and modify it using Tetras Workbench to make it Modular.
  2. Attempt to enchant the now-modular Bow with Power enchantment from an Enchanting Book using an Anvil or Tetras' own Enchant button.

Expected: Following reproduction steps, the bow should gain the Power enchant, levels should be taken and the enchant book should be consumed.

latest.log (Optional)

No response

Treeways commented 1 year ago

Same issue here. All enchantments that were once listed here in the Holosphere, for any material, are now non-existent:

image

Compared to without Universal Enchants installed:

image

studkid commented 1 year ago

I did some experimenting and found a workaround that would allow similar functionality of this mod by using a datapack. To do so, you will need to create a directory for [datapack name]/data/tetra/tags/enchantment/additions in your datapack folder and make a new json file structured as:

{
    "replace": false,
    "values": [
        "[enchantment id]",
        "[enchantment id]"
    ]
}

where enchantment id is replaced with the id of the enchantment (if you wanted to add looting to a bow for example, you would use minecraft:looting).

Save the json file with one of the following names corresponding to the tool type you want to add said enchant too (to continue the bow example, you would use bow.json)

armor_feet.json
armor_head.json
armor_legs.json
block_breaker.json
blunt_weapon.json
bow.json
breakable.json
crossbow.json
edged_weapon.json
pointy_weapon.json
throwable.json
vanishable.json
wearable.json

I don't believe the armor files do anything atm, and I'm unsure about vanishable or wearable.

Some final notes, you would not need to specify every enchant that said tool can already have. Some tools do have some set values for this too (notably blunt_weapon.json has knockback added and edged_weapon.json has sharp, fire aspect and knockback added) which you would want need to add those too if you were to replace them. Additionally you can remove enchants by putting the json in [datapack name]/data/tetra/tags/enchantment/exclusions instead.

Finally, if you are planning to do this while keeping the mod installed, you would need to add every single enchant to the json file for each weapon manually.