adibarra / enchant-tweaker

Tweak many enchantment related mechanics while keeping the vanilla minecraft feel.
https://modrinth.com/mod/enchant-tweaker
MIT License
4 stars 0 forks source link

feat: make compat system check Fabrication's enabled tweaks #10

Open FrozenDragon0 opened 1 year ago

FrozenDragon0 commented 1 year ago

What happened?

So whenever I go to enable the not too expensive tweak for anvils it always keeps resetting back to false everytime I restart the game.

What should have happened?

I expect the tweak to remain set to true after turning it on and restarting the game for it to take effect.

How to reproduce?

  1. Go to the mod's config file or use the in-game command config.
  2. Set the Not Too Expensive tweak for anvils to true.
  3. Restart the game and notice the tweak is once again set to false when it's supposed to be set to true.

What is the jar file name?

enchanttweaker-1.4.3+mc1.20-1.20.1

What Minecraft version?

Fabric 1.20.1

Any relevant logs?

N.A

Anything else?

M.A

Before submitting...

adibarra commented 1 year ago

Hello, this can actually happen in a very specific scenario. This tweak is not compatible with the one provided by Fabrication and will disable itself if it detects that it is installed.

That said, I can't tell if this is what is happening or not without any logs. Could you attach your most recent log file?

FrozenDragon0 commented 1 year ago

Hello, this can actually happen in a very specific scenario. This tweak is not compatible with the one provided by Fabrication and will disable itself if it detects that it is installed.

That said, I can't tell if this is what is happening or not without any logs. Could you attach your most recent log file?

Here's the latest log. latest.log

So there's a bit of an issue though as I do use Fabrication in the modpack I'm making as there's some tweaks said mod has I'm using, though having this anvil tweak disable itself if Fabrication is installed definitely causes a problem.

I think it'd be better for the tweak to disable itself only if Fabrication's tweak is enabled.

adibarra commented 1 year ago

Is there a reason that Fabrication's version of the tweak Anvil No Level Limit doesn't work for you? In my understanding they should be very similar.

While Fabrication does not provide an API to check if a specific feature is enabled, in theory it should be possible to detect it by reading Fabrication's config file. However, it would would be pretty hacky and would require a lot of work on eliminating edge cases. I'd rather not introduce unreliable code to the mod if I can help it.

FrozenDragon0 commented 1 year ago

Is there a reason that Fabrication's version of the tweak Anvil No Level Limit doesn't work for you? In my understanding they should be very similar.

While Fabrication does not provide an API to check if a specific feature is enabled, in theory it should be possible to detect it by reading Fabrication's config file. However, it would would be pretty hacky and would require a lot of work on eliminating edge cases. I'd rather not introduce unreliable code to the mod if I can help it.

Ah, fair enough that does make sense, reason why I wanted to use this mod's Not Too expensive tweak was so I could increase the levels required further until the cap is reached, I'm not 100% sure what the cap is for Fabrication's version if there is one.

adibarra commented 1 year ago

Ah, I see. Looks like Fabrication doesn't have that option. I would suggest looking into the Prior Work Cheaper tweak. It can be configured to increase the cost of successive enchantments which can do something similar to a 'soft' max cap. If that doesn't work for you, I'll look into seeing what it would take to getting the original tweak working for your case.

FrozenDragon0 commented 1 year ago

Ah, I see. Looks like Fabrication doesn't have that option. I would suggest looking into the Prior Work Cheaper tweak. It can be configured to increase the cost of successive enchantments which can do something similar to a 'soft' max cap. If that doesn't work for you, I'll look into seeing what it would take to getting the original tweak working for your case.

Ironic about that as I was already using the Prior Work Cheaper tweak which I set the multiplier to 1.50, definitely works atleast.