Easy Anvils [Forge & Fabric]

Easy Anvils [Forge & Fabric]

4M Downloads

[Bug]: Easy Anvils requires more levels than Vanilla when using books

Xavom opened this issue ยท 1 comments

commented

Mod Loader (Required)

Fabric

Minecraft Version(s) (Required)

1.20.1

Mod Version(s) (Required)

v8.0.2

Other Mods Involved (Required)

No

Notes (Required)

Anvil enchanting unmodified tools, weapons, armor using books either from a villager or the creative menu, always results in a higher level cost than in vanilla.

After many attempts, I finally tested this in a new install with the default configuration which yields the same results. Maybe this is a configuration setting, but that file states the settings are the same as vanilla. Maybe there is something I need to change.

Contents of the mods folder:
EasyAnvils-v8.0.2-1.20.1-Fabric.jar
PuzzlesLib-v8.1.18-1.20.1-Fabric.jar
ForgeConfigAPIPort-v8.0.0-1.20.1-Fabric.jar
fabric-api-0.92.1+1.20.1.jar

Steps to reproduce:

  1. Start a new creative world.
  2. Issue the command /experience set @p 100 levels
  3. Place an anvil.
  4. Get a chestplate along with thorns 3, protection 4, unbreaking 3, and mending books.
  5. Change to survival mode and enchant the chestplate in as I did below.

Method 1
Source of information: Minecraft Anvil Calculator v1.0 (https://virb3.github.io/anvil-calc/)

Vanilla:
chestplate + thorns 3 = 12
protection 4 + mending = 2
[chestplate, thorns 3] + unbreaking 3 = 4
[chestplate, thorns 3, unbreaking 3] + [protection, mending] = 10
Total = 28

Easy Anvils:
chestplate + thorns 3 = 12
protection 4 + mending = 2
[chestplate, thorns 3] + unbreaking 3 = 7
[chestplate, thorns 3, unbreaking 3] + [protection, mending] = 14
Total = 35

Method 2
Source of information: Optimal MC Enchant Order for Anvils (BKraker, Deego)

Vanilla:
chestplate + thorns 3 = 12
unbreaking 3 + mending = 2
[chestplate, thorns 3] + [unbreaking 3, mending] = 7
[chestplate, thorns 3, unbreaking 3, mending] + protection 4 = 7
Total = 28

Easy Anvils:
chestplate + thorns 3 = 12
unbreaking 3 + mending = 2
[chestplate, thorns 3] + [unbreaking 3, mending] = 9
[chestplate, thorns 3, unbreaking 3, mending] + protection 4 = 12
Total = 35

latest.log (Required)

https://pastebin.com/e3rHFU8c

commented

Thanks for reporting. The behavior is different due to the prior work penalty mechanic (=additional levels added to working an item in an anvil for how many times it has already been worked on before).

In vanilla the penalty doubles every time and 1 is added. So for the first time an item is worked in an anvil it is 0, for the second time 1, then 3, 7, 15, 31. When this reaches beyond 39 (31*2+1=63) the item becomes too expensive to work on.

With Easy Anvils the penalty increases by a constant amount every time which is 4 by default. So for the first time an item is worked in an anvil it is 0, for the second time 4, then 8, 12, 16, 20, ... When this reaches beyond 39 it just keeps on going as the too expensive limit is removed by Easy Anvils.

The fixed value approach is great in the long term after multiple repairs, but I can see that it can be frustrating for new items when the costs are higher than vanilla. I've now implemented a combined approach in v20.4.5, where the vanilla method is used, but the increase is capped at 4. This has an effect after the 4. time an item is worked on as you can see below.

Operation:              1,  2,  3,  4,  5,  6,  7, ...
Vanilla:                0,  1,  3,  7, 15, 31, (63)
Easy Anvils (v20.4.4):  0,  4,  8, 12, 16, 20, 24, ...
Easy Anvils (v20.4.5):  0,  1,  3,  7, 11, 15, 19, ...

The comment about all default values representing the vanilla state only applies to the costs config, not to the prior_work_penalty config where this mismatch in behavior is caused. I can see how the layout of the file is misleading in regard to this comment though.