Project MMO

Project MMO

10M Downloads

Enchantment Requirements Not Enforced

SomewhatDamaged opened this issue ยท 1 comments

commented

Describe the bug
Making Enchantments impose restrictions on weapons doesn't cause any negatives to the player and doesn't stop them using the item, even if not met.

Expected behavior
Having an unmet Enchantment requirement should impose negative effects (of the item) when you hold/wear it.

To Reproduce
Data:
Make a disabler pack and turn off autovalues.
items/iron_sword.json

{
    "negative_effect": {
        "minecraft:slowness": 0,
        "minecraft:mining_fatigue": 1
    },
    "requirements": {
        "WEAPON": {
            "combat": 6
        }
    }
}

enchantments/sharpness.json

{
    "override": false,
    "levels": [
        {
            "combat": 3
        },
        {
            "combat": 7
        },
        {
            "combat": 11
        },
        {
            "combat": 15
        },
        {
            "combat": 19
        }
    ]
}

Steps to reproduce the behavior:

  1. Make an iron sword with Sharpness III on it.
  2. Give yourself 6 levels in combat.
  3. Find something to smack with your sword.
  4. Smack it successfully.

Versions:

  • Minecraft: 1.20.1
  • Loader: Forge-47.1.3
  • PMMO: 1.20.1-1.2.15

Additional context

Pipp-Phone.mp4
commented

Perhaps add a negative_effect section to enchantments?