Grind Enchantments

Grind Enchantments

3M Downloads

Deny interaction with cursed items

notIkibo opened this issue · 13 comments

commented

Hihi,

I actually don't know how to present it to you, but I can deperate an enchantment and a curse even though "allow_removing_curses" is false.

Kinda a weird situation ngl

commented

I think prohibiting any interaction with cursed items is more balanced since it's not possible for you to benefit from it.

In the new release for 1.20.5, it is now possible configure the mod this way, by changing "cursed_enchantments": "ignore" to "cursed_enchantments": "deny" in the config.

commented

I assume the config error has gone away? I'll try to reproduce this issue then, now.

commented

Yes it did go away though Ill try to also deal with it tomorrow. You're such a great dev. Trying to reproduce it immediately for a somewhat older version. I know some that wouldn't be bothered with that. Though I guess it is strange indeed

commented

Usually nothing crashes so no logs can be given though I should at least tell you that it's on version 2.0.0 1.19.2

If there is any information I can provide, I'll happily supply since this is a dealbreaker for me. It did work, but now doesn't? I mean like in a different modpack some time ago. Maybe it's an update that caused this

found something in the logs:
[15:57:38] [Render thread/ERROR]: [Grind Enchantments] Error decoding config: No key cost_function in MapLike[{"enabled":true,"cost_config":{"count_mode":{"delegate":{"normal_factor":2.0,"treasure_factor":2.0,"type":"grindenchantments:count_levels"},"type":"grindenchantments:first_enchantment"},"cost_factor":0.2,"cost_offset":0.2}}]; No key cost_function in MapLike[{"enabled":true,"consume_enchanted_item":false,"cost_config":{"count_mode":{"type":"grindenchantments:count_min_power"},"cost_factor":0.05,"cost_offset":1.0}}]

commented

found something in the logs:

[15:57:38] [Render thread/ERROR]: [Grind Enchantments] Error decoding config: No key cost_function in MapLike[{"enabled":true,"cost_config":{"count_mode":{"delegate":{"normal_factor":2.0,"treasure_factor":2.0,"type":"grindenchantments:count_levels"},"type":"grindenchantments:first_enchantment"},"cost_factor":0.2,"cost_offset":0.2}}]; No key cost_function in MapLike[{"enabled":true,"consume_enchanted_item":false,"cost_config":{"count_mode":{"type":"grindenchantments:count_min_power"},"cost_factor":0.05,"cost_offset":1.0}}]

It looks like you've got an outdated config (from version 1.x). This should make the mod use the default values for all of the options, where allow_removing_curses is false – so it still shouldn't do this.

Luckily, there were not that many changes other than renames, so updating the config should be relatively simple.

Updated config for disenchant_to_book:

{
  "enabled": true,
  "consume_enchanted_item": false,
  "cost_function": {
    "function": {
      "type": "grindenchantments:count_min_power"
    },
    "cost_factor": 0.05,
    "cost_offset": 1.0,
    "type": "grindenchantments:transform"
  }
}

Updated config for move_enchantments:

{
  "enabled": true
  "cost_function": {
    "function": {
      "function": {
        "normal_factor": 2.0,
        "treasure_factor": 2.0,
        "type": "grindenchantments:count_levels"
      },
      "type": "grindenchantments:first_enchantment"
    },
    "factor": 0.2,
    "offset": 0.2,
    "type": "grindenchantments:transform"
  }
}

If it still happens after doing this, there must be some kind of bug. You could also try using the new 3.0.0 version for 1.19.4, but there hasn't actually been any changes to this part of the code, so I doubt that would change anything.

commented

Damn, it didn't fix it sadly. And I'd like to stick to 1.19.2 since I have mods that haven't been updated yet

commented

You're such a great dev. Trying to reproduce it immediately for a somewhat older version.

Well... there was someone who had a relatively simple issue that I forgot about for about two months, so, well...


Anyway, I just tried this in 1.19.2, but I unfortunately couldn't reproduce the issue.

It may also be that this was because I just backported the 3.0.0 version (which didn't have any changes here that could really cause this). Just in case that is it, you could try using this version, which should be a ZIP file containg the mod.
Make sure to add "version": 2 to the end of your config when doing this.

commented

This mod test doesn't seem to work? I disabled the normal grind enchantments mod beforehand. Either me not knowing exactly where to put ""version": 2" (I think it should be behind the last curly bracket though I'm not sure)
But even then: Shouldn't it just put up an error decoding config? cause this is also missing. QwQ
I guess, I'll try deleting the config and then rebooting mc again. It should download the necessary configs automatically. And if it doesn't create any configs, I'll be waiting for your response :3
image
Actually maybe not necessary. I just saw that my number of mods decreased by 1 (took out 2.0.0 1.19.2) so it didn't recognize the mod test as a mod? Even though at least ATLauncher did list it

commented

Ohhh, I think I misinterpreted this "allow_removing_curses"

Thing is: In the mod called "Biome Makeover" There is a thing called "Altar" where you can put up any enchanted equipment. It improves one random enchantment. So it can even get from Fire Aspect II to Fire Aspect III. But the sword also gets a curse.

But with this mod, you can technically get a sword with Fire Aspect III and any curses (this mod expands the curse list), but just seperate the beautiful Enchantment with the curse and just let the gold sword or whatever rot (since you can't remove it from the throw-away weapon). Now you have something like Fire Aspect III, give it to another weapon, make it IV with another curse. Turn the weapon enchantment to an enchanted book and you can do this indefinitely.

Wb a setting that disallows any mod operation when it has a curse in general. Because you can benefit from a cursed item by just taking it's good enchantments and putting them into a book for better use

commented

Ah, I thought you meant that it would remove the curse alongside the other enchantments even if allow_removing_curses is set to false.

Wb a setting that disallows any mod operation when it has a curse in general. Because you can benefit from a cursed item by just taking it's good enchantments and putting them into a book for better use

This isn't possible right now, but it's definitely a setting that I could add.

commented

Yeah, I was also confused by myself and I'm sorry for making you "reproduce the issue" though yeah. I mean usually, if a cursed item has a curse. You can just take everything it has and put it on another item. Sure, it costs experience though I think that's not a big price to play

commented

The default behaviour of leaving the curse on the item comes from the vanilla functionality, where you don't get the enchantment. Disenchanting an item there only leaves you with its curses.

Whether the mod should do that too is not an easy decision. It comes down to whether the player wants to keep using either the item or the enchantment book – the one the player wants to keep should get the curse.
However, I simply kept allow_disenchanting_curses disabled by the default, for consistency with vanilla.

I guess setting it to true would solve your problem here, as the altar couldn't be abused anymore.

commented

I think prohibiting any interaction with cursed items is more balanced since it's not possible for you to benefit from it. The minecraft mechanic is that you can just take away all enchantments. You don't really benefit from it since everything is lost except the everlasting curse. But disallowing any mod interaction wouldn't hurt (may it be set to false by default). Say you find a cursed item with mending. Take out mending and part your way with the cursed item. You already won. Lets say it has more than one enchantment. You take out blast protection next to the curse and it leaves the rest untouched for you to take out and/or use. Both things are not optimal for abuse. Well thing is: In vanilla you rarely interact with curses, but the mentioned mod does it for me. Maybe that's the reason I'm worried about abuse. There are so many unbalanced things and I was considering it to be the case too. I mean, you can find any Mending tool/weapon/equipment in a treasure chest and take it out for the low-low price of experience. But the usual way would be to find a any villagers, make them all librarians and get mending from there, but being forced to do go that route is not good game design. That's such a weird cheese. Cheesing the system late game is fine, but you can do that with relative ease. Anyway, there are so many op mods (that bore me) and I'm just thinking that maybe I'd have to take out the altar for it to stay balanced. Thankfully it's not generated anywhere and I can just disable the recipe.
(I'm creating a modpack)