Git Product home page Git Product logo

Comments (5)

xpvtryanx avatar xpvtryanx commented on August 17, 2024

I am having this same issue!

from mcmmo.

Geekerandy avatar Geekerandy commented on August 17, 2024

After checking the discord, there were discussions that the issue may not occur with regular Spigot, and only occurs with Paper.
I have tested it with 1.21 Spigot, and Super Breaker works just fine. This points the issue towards Paper.

from mcmmo.

MC-MrBirdy avatar MC-MrBirdy commented on August 17, 2024

Could this issue be because Paper now by default is Mojang mapped?
I have solved the issue by changing the functions like initEfficiency()

Instead of having the for loop:

for (Enchantment enchantment : Registry.ENCHANTMENT) {
    if (enchantment.getKey().getKey().equalsIgnoreCase("EFFICIENCY")
            || enchantment.getKey().getKey().equalsIgnoreCase("DIG_SPEED")
            || enchantment.getName().equalsIgnoreCase("EFFICIENCY")
            || enchantment.getName().equalsIgnoreCase("DIG_SPEED")) {
        return enchantment;
    }
}

I replaced it with the following:

if (Registry.ENCHANTMENT.get(NamespacedKey.minecraft("efficiency")) != null)
{
	return Registry.ENCHANTMENT.get(NamespacedKey.minecraft("efficiency"));
}

from mcmmo.

nossr50 avatar nossr50 commented on August 17, 2024

I don't think Paper being Mojang mapped has anything in particular to do with this, but I'm not certain of it either. In mcMMO we don't really use any NMS, so the mappings shouldn't affect us. I'm looking into this issue, which may be a Paper bug, or may be something I need to change on my end.

from mcmmo.

nossr50 avatar nossr50 commented on August 17, 2024

Could this issue be because Paper now by default is Mojang mapped? I have solved the issue by changing the functions like initEfficiency()

Instead of having the for loop:

for (Enchantment enchantment : Registry.ENCHANTMENT) {
    if (enchantment.getKey().getKey().equalsIgnoreCase("EFFICIENCY")
            || enchantment.getKey().getKey().equalsIgnoreCase("DIG_SPEED")
            || enchantment.getName().equalsIgnoreCase("EFFICIENCY")
            || enchantment.getName().equalsIgnoreCase("DIG_SPEED")) {
        return enchantment;
    }
}

I replaced it with the following:

if (Registry.ENCHANTMENT.get(NamespacedKey.minecraft("efficiency")) != null)
{
	return Registry.ENCHANTMENT.get(NamespacedKey.minecraft("efficiency"));
}

Thanks for this info, I was able to come up with a workaround

from mcmmo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.