Infinity and Mending Unnerf Version 1.2.1

A very simple plugin that allows infinity and mending to be together once again!

  1. WolfLeader116
    Native Minecraft Version:
    1.13
    Tested Minecraft Versions:
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    Source Code:
    https://github.com/PseudoResonance/InfinityMendingUnnerf
    Contributors:
    PseudoResonance (WolfLeader116)
    This is an extremely simple plugin with no commands or permissions that uses bytecode manipulation through ByteBuddy to modify the Minecraft Server source code to unnerf the infinity and mending enchantments!

    I was developing this for my own server as part of another plugin with more various features, however I thought people may find this useful, so I quickly threw together a standalone plugin only containing this feature.

    I have tested this plugin on 1.11 to 1.15, and it has worked on all versions. If something changes in the future, I will update this plugin to support that, however I doubt it will break anytime soon. Enjoy!

    IMPORTANT: While the plugin will make an attempt at running on JRE Version 8, it will likely fail. Please use Java 9 and above, or JDK 8 to run this plugin, as bytecode manipulation depends on tools.jar and attach.dll/attach.so which are only present in Java 9 and above, or JDK 8.

    NOTE: Because of the nature of this plugin, the server MUST restart in order for it to be removed. Using other plugins like PlugMan to remove this plugin may break things.

    The way this plugin works, is it uses reflection to find the NMS class "net.minecraft.server.VERSION.EnchantmentInfiniteArrows", then uses ByteBuddy, an ASM wrapper, to do some bytecode manipulation and replace the method "a" (in 1.14.3) that takes Enchantment as an argument, and it replaces it with a call to the superclass (Enchantment)'s method.

    This method is designed as a test for compatibility of two enchantments when Minecraft is determining if an enchantment is valid. For example, when putting an item in an anvil, Minecraft will iterate through the list of enchantments on one item, and check them against the enchantments on the other item by using this method. In most cases, the method simply returns true if the two enchantments are different, and false if they are the same. However, for infinity, it will also return false if the second enchantment is mending, in order to keep the two exclusive.

    By removing this unique method and simply calling the superclass, infinity and mending are no longer exclusive and the enchantments can be mixed as if nothing had ever changed!
    soik likes this.

Recent Updates

  1. Output Debug Messages
  2. Fixed Error Messages - Added bStats
  3. Version 1.1

Recent Reviews

  1. Gustavo_Player
    Gustavo_Player
    5/5,
    Version: Version 1.2.1
    Good plugin. =)
  2. Consoleman
    Consoleman
    4/5,
    Version: Version 1.2.1
    This seems like a great plugin, sadly it doesn't work for 1.16. Could you maybe update if you have time?
    1. WolfLeader116
      Author's Response
      The plugin should work on 1.16. Please open an issue on GitHub or PM me with server logs as well as whether or not the plugin worked on 1.15 if you are having trouble getting it to work!
  3. Popboy11
    Popboy11
    5/5,
    Version: Version 1.2.1
    The plugin works perfectly, glad that it fits with the vanilla theme of just using an anvil to get two enchantments that shouldn't be exclusive in the vanilla game in the first place. It doesn't work with JRE but other than that it's great. The dev was very helpful. 10/10
  4. SumiiRing
    SumiiRing
    4/5,
    Version: Version 1.1
    It works really well!
    But there's one more thing:
    Does this plugin also exist for armour Especially Frost Walker and Depht Strider on shoes)?
    1. WolfLeader116
      Author's Response
      Sorry, I've got a test tomorrow, but I'll take a look at making that an option as soon as possible.