
[Bug]: Compatibility with Impaled, a Trident focused mod
allanonmage opened this issue · 5 comments
Mod Loader (Required)
Fabric
Minecraft Version (Required)
1.19.2
Mod Version (Required)
4.2.9
Notes (Required)
There is some overlap in functionality between Impaled (https://modrinth.com/mod/impaled) and your mod. I think they can be made to work together and keep the Impaled lore, but I've ran into some strange phenomenon, which is probably the order in which the mods are applied to the game, or the fact that this is the first time I've tinkered with mods in Minecraft.
Impaled has a new specific trident that can accept sword enchants, and adds 4 new total kinds of tridents. They seem to extend minecraft:trident, so the universal enchants mode is allowing them all to have sword enchants, not just the special one from Impaled (called impaled:atlan).
In trying to restore that functionality(restriction?), I found that Universal Enchants could not resolve impaled:atlan in either of two scenarios:
- When adding the item to the items list.
- When disallowing minecraft:trident, and allowing impaled:atlan
I found that removing the .json config file for an enchantment allowed the Impaled mod's enchantments to work the way it intends. I discovered this by accident trying to revert the file. When there is no enchantment file, I think it goes back to vanilla behavior. The file is not recreated unless the folder (with all the .json files) is removed.
Scenario 1:
sharpness.json
{
"id": "minecraft:sharpness",
"items": [
"$minecraft:weapon",
"$universalenchants:axe",
"$impaled:atlan"
],
"incompatible": []
}
Scenario 2:
smite.json
{
"id": "minecraft:smite",
"items": [
"$minecraft:weapon",
"$universalenchants:axe",
"$impaled:atlan"
{
"id": "minecraft:trident",
"exclude": true
}
],
"incompatible": [
"minecraft:impaling",
"minecraft:bane_of_arthropods"
]
}
I found the relevant errors in my log after removing impaling and sharpness to try to get them regenerated:
[13:37:46] [Render thread/WARN]: Failed to deserialize universalenchants enchantment config entry $impaled:atlan: com.google.gson.JsonSyntaxException: No category with name impaled:atlan found
[13:37:46] [Render thread/ERROR]: Failed to read smite.json in config directory: com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated array at line 7 column 3 path $.items[3]
[13:37:46] [Render thread/WARN]: Failed to deserialize universalenchants enchantment config entry $impaled:atlan: com.google.gson.JsonSyntaxException: No category with name impaled:atlan found
Sweeping Edge
{
"id": "minecraft:sweeping",
"items": [
"$minecraft:weapon",
"$universalenchants:axe",
"$impaled:atlan"
],
"incompatible": []
}
So, I guess I'm doing it wrong, but based on the docs, I'm not sure what else I might need to do. I'm using NotePad++ on windows to edit the json files. I may just be running into json syntax errors for all I know.
I don't have Discord because Discord refuses to let me use their service, so I posted this here. I have never used Discord either; couldn't get set up because they're being intrusive and want details I don't want them to have.
latest.log (Optional)
No response
Don‘t use $ in front of atlan. $ is not for items, it‘s for the built-in categories. Apart from that the first approach seems correct. The other one has syntax errors.
$minecraft:trident and minecraft:trident use almost the same name unfortunately, they are very different things though.
Sweet, that got it! I was hoping it was something silly like that. I should be able to recreate the rules from Impaled in your enchantment json files.
Where can I go read up on things like the difference between $minecraft:trident and minecraft:trident? I don't think Minecraft is open source, so I'm confused how mod developers like yourself know all the inner workings to make the game bend to your will.
I deleted the \config\universalenchants\ folder, and it recreated the json files. I also added a line and "allow_mod_item_support = true" to universalenchants-server.toml, but that was removed after starting the game. I wasn't sure what to do with that, or if it had been deprecated. This time, I changed sharpness from minecraft:trident to impaled:atlan. In the game if I use a command, it's all lower case, if that matters.
sharpness.json
{
"id": "minecraft:sharpness",
"items": [
"$minecraft:weapon",
"$universalenchants:axe",
"$impaled:atlan"
],
"incompatible": []
}
I still see the item not resolving in the log:
[13:57:15] [Render thread/WARN]: Failed to deserialize universalenchants enchantment config entry $impaled:atlan: com.google.gson.JsonSyntaxException: No category with name impaled:atlan found
These are all the enchantments Universal Enchants adds to tridents: Sharpness, Smite, Bane of Arthropods, Knockback, Fire Aspect, Looting, Sweeping Edge, Quick Charge, Piercing
Just go through the files and replace $minecraft:trident
with impaled:atlan
everywhere.
The $
is specifically made for Universal Enchants, it does not exist in vanilla. And you do have access to the full Minecraft source when modding.