Project MMO

Project MMO

10M Downloads

NBT-Based XP Values Overwrite Normal Ones

SomewhatDamaged opened this issue ยท 1 comments

commented

Describe the bug
Having a conditional based on NBT data will stop any non-NBT set values from working, even if it's only a REPLACE block.

Ex:
Having one datapack with these values

{
	"xp_values": {
		"CRAFT": {
            "crafting": 1200,
            "magic": 300
        }
	},
	"override": true,
	"isTagFor": ["minecraft:leather_boots", "minecraft:leather_helmet", "minecraft:leather_chestplate", "minecraft:leather_leggings"]
}

Will get ignored if the following is added to another (or the same) datapack

{
	"nbt_xp_values": {
		"CRAFT": [{
				"behavior_to_previous": "REPLACE",
				"should_cases_add": false,
				"cases": [{
						"paths": ["display{}.color"],
						"criteria": [{
								"operator": "EXISTS",
								"value": {
									"crafting": 100,
									"magic": 0
								}
							}
						]
					}
				]
			}
		]
	},
	"override": true,
	"isTagFor": ["minecraft:leather_boots", "minecraft:leather_helmet", "minecraft:leather_chestplate", "minecraft:leather_leggings"]
}

image
image

Expected behavior
Existing XP values should be used unless the NBT triggers happen.

To Reproduce
Steps to reproduce the behavior:

  1. Make two datapacks, add the above JSON as files to one and the other
  2. Load game
  3. See a basic piece of leather armor has XP values set by autvalues
  4. Dyed value, however, is working right

Versions:
Probably affects any rework that uses the same data-loading

  • Minecraft: 1.19.2
  • Loader: Forge-43.2.21
  • PMMO: 1.19.2-3.2.4
commented

NBT value overrides are the intended behavior. if a fallback value is desired, it should be factored into the the NBT configuration (see leather armor as an example). the systems are intentionally mutually exclusive.