Farmer's Delight

Farmer's Delight

97M Downloads

Sweeping Edge can be applied to both Knives and Skillets despite not working at all

MiziraGamez opened this issue ยท 3 comments

commented

Minecraft version

1.21.1

Farmer's Delight version

1.2.5

NeoForge version

21.1.79

Description

In recent 1.21 versions of the mod, all knives and the skillet item can receive the Sweeping Edge enchantment, despite the enchantment having no effect on anything except for a sword.

This is likely occurring due to tagging the items within the minecraft:enchantable/sword tag, which in vanilla is used for Looting, Knockback, and for Sweeping Edge. Attempting this bug on versions prior to 1.21 (tested with 1.2.5 of Farmer's Delight but on 1.20.1 of NeoForge) results in the items being flagged as incompatible with Sweeping Edge, further proving the tags being the issue.

The easiest solution would be to simply remove the items from the sword tag, but this method would also remove Looting and Knockback from being able to be applicable to them. Unfortunately, one would have to edit the compatibility of Looting and Knockback directly (via editing the enchantment json) into a new tag in order for it to be allowed on Swords, Skillets, and Knives, which could cause some trouble for other mods/datapacks' compatibility down the line.

Steps to reproduce

  1. Load into a 1.21 NeoForge world with Farmers Delight.
  2. Obtain any knife and a skillet
  3. With commands enabled, use the command /enchant (target selector: self) minecraft:sweeping_edge 3 when holding the knife and when holding the skillet (If testing on versions prior to 1.21, use the enchantment idea of minecraft:sweeping)
  4. Both items should now receive the enchantment.
  5. Spawn a group of mobs to attack with the enchanted items
  6. Observe that the sweeping effect does not occur at all, as the enchantment only modifies the base effect from swords, not applying the sweeping attack itself to the item.

Mod list

Farmer's Delight

Logs

No response

Minimal instance

  • I have tested this on a minimal instance

Performance and shader mods

  • I am using performance or shader mods
commented

This was a compromise I settled for during the initial port to 1.21, as the Anvil (which I assume is what you're using) doesn't check the same method for enchantment compatibility.

Now, NeoForge seems to have a supportsEnchantment method, which I can use to exclude Sweeping Edge from the anvil as well. I'll take a look at that.

commented

Fixed on commit 1cbd20b.

commented

This was a compromise I settled for during the initial port to 1.21, as the Anvil (which I assume is what you're using) doesn't check the same method for enchantment compatibility.

Now, NeoForge seems to have a supportsEnchantment method, which I can use to exclude Sweeping Edge from the anvil as well. I'll take a look at that.

I was using the /enchant command actually, but this Anvil NeoForge method should do the trick for survival playthroughs!