Project MMO

Project MMO

11M Downloads

PMMO Scripts are not correctly modifying configs in some areas.

Silvertide7 opened this issue ยท 0 comments

commented

Describe the bug
When trying convert my 1.20.1 datapacks to 1.21.1 pmmo scripts I am seeing some things that aren't working.
Example 1: item(iron_sword) is getting the wrong vein_charge and no deal_damage is registering.
I have a weapons.pmmo file that looks like this:

item(iron_sword)
    .vein_charge(1.5)
    .vein_capacity(30)
    .deal_damage(minecraft:player_attack)
    .award(combat,10);

This is straight from the wiki for modifying items. I notice that the vein_charge on the iron sword is 3.0/s instead of 1.5/s, and the deal_damage is not granting any XP.

Example 2: In my perks.pmmo file I am not getting any perks to apply:
The file looks like this:

WITH config(perks)
    set(clear_all); // Clears all previous perks.
    
    set().event(SKILL_UP)
        .skill(constitution)
        .perk("pmmo:attribute")
        .attribute("minecraft:generic.max_health")
        .per_level(1.0)
        .max_boost(5.0)
END

When I level up my constitution I see no health increases. I have tried with and without the quotation marks around the strings with : in them. Neither seem to work.

Example 3: In my accessory_req.pmmo file I put:

WITH req(WEAR)
    item(minecraft:iron_leggings).require(strength,9)
END

It doesn't add any requirements to the item. I also tried item(minecraft:iron_helmet).req(WEAR).require(strength,9) but no luck there either. I did this on a fresh modpack with only PMMO installed and autovalues disabled + no default pmmo datapack, so it should be a pretty fresh test.
I then generated a new datapack withOverride and withDefaults and I set iron_leggings WEAR requirement to strength 9 and it works as expected.

Expected behavior
These settings would update correctly

Versions:

  • Minecraft: 1.21.1
  • Loader: NeoForge 21.1.145
  • PMMO: 1.21.1-2.6.29