Origins: Classes

Origins: Classes

6M Downloads

Cleric Class Enchantments Fully Random

RSpyno opened this issue ยท 7 comments

commented

The Enchantments that Clerics get from the enchantment table are in fact stronger as they should be, but sometimes give entirely random enchants despite what the enchant says before clicking it.

To Reproduce:

  1. As a Cleric try to enchant any item
  2. Keep note of what enchantment you click.
  3. Many times you may not get the enchantment that was read.

Ex. (Try to get Prot IV on any piece of armor, as was read in the tier 3 enchant table slot, result is only Unbreaking III)

commented

I am also having this issue, reproduced the same way as the steps above. In my case it may be because the server has extra enchantments, but it seems that it shouldn't be an issue since non clerics don't have this random enchantment problem, despite the extra enchantments available.

commented

I commented on another open ticket about this but saw this one after. I'm currently running a server with Another Quality Modack 2 for fabric. The enchantments aren't always wrong but the issue seems to be what is considered to be an upgrade. I.e. I was able to enchant a shovel with what showed as efficiency 4 on the table but became efficiency 5 in the shovel. However, I followed that up with enchanting a pickaxe that should have had Fortune 3 however came out with charmed instead.

Currently running
Another Quality Modpack 2 - 1.18.1

Noted mods
Origins-Classes-1.18-1.2.4.jar
1.18/1.18.1: Origins 1.3.1
Incantationem 1.1.3+1.18.1 (the mod the pickaxe enchantment came from)

I'm by no means an expert when it comes to stuff like this but it seems likely that it might be an issue with what is considered an upgrade when you're at a cap of what that enchantment can go up to (can't upgrade fortune 3 to 4). Wanted to try to provide some update to this. I know there are plenty of other enchantment mods in this pack so I'm sure the one mentioned isn't the only one that would produce similar results but its the only one I've noticed during my testing

commented

I did some testing with my own modpack because I was having the same enchantment problem. One culprit I found that isn't on this particular modlist is Iron Chests, and the only way I've found so far to fix the issue to create a new world altogether.

Just keep that in mind for future stuff, it consistently broke the enchantments for me upon each install, at least on 1.16.5, all on fabric.

This jar file specifically - IronChest-1.0+fabric-1.16.5.jar

commented

I just had the same problem in 1.19.2 with the EasyMagic mod, so it seems that this matter is still unresolved.
In case I'm wrong and it happens to be already solved, please discard and/or delete this message.


If it may be of help to some of you, here's how I solved the problem for my singleplayer server/client :

In the EnchantmentScreenHandlerMixin.java mixin file, I replaced the 2nd and 3rd injects by this one :

@Inject(method = "generateEnchantments", at = @At(value = "HEAD"))
private void injectGenEnchant(ItemStack stack, int slot, int level, CallbackInfoReturnable<List<EnchantmentLevelEntry>> cir) {
    OriginsClasses.isClericEnchanting = ClassPowerTypes.BETTER_ENCHANTING.isActive(this.enchanter);
}

So there are only 2 injects lefts : the 1st one (saveEnchanterInHandler) and this new one.

Explanations :

It seemed (don't ask me why, I don't really know either), that the 2nd original inject (saveEnchanterForPreview) was not ever triggered, thus making the preview enchantments still using the basic enchantability values, while the "upgraded" version was still correctly processed in the actual enchanting of the object.

The new code hooks directly on the screen handler's generateEnchantments method itself, instead of the call to it from the 2 lambdas functions, to set up OriginsClasses.isClericEnchanting.

It seems to work correctly now (at least to the extent of what I could manually test).

Hope it can help.

PS : It is useful to note that the 3rd inject could be removed because it became unnecessary, since generateEnchantments is called inside it too.

commented

grafik

I just enchanted a whole inventory worth of items, at different levels, of different tiers, of different item classes - not once did I not get the enchantment that was listed. I see that there are a few people reporting this problem though, so could you share more about which environment this happens in?

For reference, I was using Origins 0.5.1 and Origins: Classes 1.1.1, with Fabric API 0.30.0, and tested this on both a server and in singleplayer.

Are you playing on a server, or on a singleplayer world?
Which versions of Origins and Origins: Classes are you running?
Do you have any other mods installed?

commented

I am playing on a server, using Origins v0.4.7, Origins Classes v1.1.1 and Fabric API 0.30.3 I have plenty of other mods installed, here listed is a list of all the mods I am using. I am not sure what might be causing this error.
image

commented

If you need a download of the modpack I am using, I have a Google Drive link here for all the mods:
https://drive.google.com/file/d/17wqnIapH8bfI_rdmAxCUNFeznbX2rZ2b/view?usp=sharing