Project MMO

Project MMO

11M Downloads

Scripting bug with setting multiple damage type awards.

Silvertide7 opened this issue ยท 1 comments

commented

Describe the bug
When setting an xp award for an item doing damage for 2 different types of damage via scripting, the datapack reload crashes. Here is the code I'm using. Commenting either of these out works and they work as intended. Having both does not.

item(minecraft:trident).deal_damage(minecraft:player_attack).award(sentinel_group, 10);

item(minecraft:trident).deal_damage(minecraft:trident).award(sentinel_group, 10);

Here is the gist of the error:
https://gist.github.com/Silvertide7/56ef44e38bee7aa5d45a4e3074c61a8d

Expected behavior
Be able to set multiple damage type rewards for a single item.

Versions:

  • Minecraft: 1.21.1
  • Loader: NeoForge 21.1.203
  • PMMO: 1.21.1-2.7.34
commented

note to self Remap this to a .getOrDefault(...).putAll(...) so the scripts are not an overwrite pattern.