Mojira Archive
MCM-1353

has_equipment filter no longer supports data values

Summary:
has_equipment filter no longer supports data values.

Verification Build:
1.17.0.56

Regression Builds:
1.17.0.54

Impact:
This breaks the behavior of entities in Papercraft 2 and prevents the player from being able to finish the game. This is a general filter that has many uses and this bug is likely to affect other pieces of content.

Repro Steps:

  1. Download 'Papercraft 2: City Project'
  2. start a new world and go into creative mode
  3. `/summon jig:pabc_fire`
  4. `/give @p bucket 1 8`
  5. use the water bucket on the fire

Observed Results:
The interact behavior is not correctly validated, the bucket is not consumed and the fire stays there.

Expected Results:
The bucket should validate that a bucket:8 is in your hand and successfully trigger the event jig:do_doused resulting in the water bucket being consumed and the fire fizzles away.

Notes:
The behavior in question is:

"minecraft:interact": [{
				"on_interact": {
					"filters": {
						"all_of": [{
								"test": "is_family",
								"subject": "other",
								"value": "player"
							},
							{
								"test": "has_equipment",
								"domain": "hand",
								"subject": "other",
								"value": "bucket:8"
							}
						]
					},
					"event": "jig:do_doused",
					"target": "self"
				},
				"use_item": true,
				
				"interact_text": "interact.douse.flame"
			}],

If you change the test to just bucket and give yourself a bucket of 0 data value (empty bucket) it succeeds. It will also fail if you try to use a dye with data value, for example dye:1 (red dye) will fail.

 

Unresolved

jigar frobozz

2021-05-14, 06:55 AM

2021-05-14, 07:36 PM

2

0

Future Release

-