Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-189909

player_interacted_with_entity does not trigger if there is only one item and the item gets consumed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 20w27a
    • 1.16 Pre-release 6, 1.16 Pre-release 7, 1.16 Pre-release 8, 1.16 Release Candidate 1, 1.16, 1.16.1
    • None
    • Confirmed
    • Data Packs
    • Normal

      (Original below)
      The minecraft:player_interacted_with_entity advancement trigger does not trigger if a player is holding only one item and that item gets consumed. This also affects the "Oh Shiny" advancement.

      Steps to reproduce: (again, original below)
      1. Find a piglin
      2. Go into adventure/survival mode
      3. Hold 1 gold ingot
      4. Give the piglin the gold ingot
      5. The item gets consumed (it's given to the piglin) but the "Oh Shiny" advancement is not granted

       

       

      Original:
      (original name: "player_interacted_with_entity on armour stand does not succeed if the item is specified and the selected item is only one item")

      The minecraft:player_interacted_with_entity advancement trigger does not trigger if the selected entity is an armour stand, if there is an item specified, and if you are in adventure/survival mode while holding only one item. It most likely changes the inventory first before checking the conditions, because if you take the item off it does trigger.

      Steps to reproduce:
      1. Add the following advancement

      {
      	"criteria": {
      		"test": {
      			"trigger": "minecraft:player_interacted_with_entity",
      			"conditions": {
      				"item": {
      					"item": "minecraft:stone"
      				},
      				"entity": {
      					"type": "minecraft:armor_stand"
      				}
      			}
      		}
      	}
      }
      

      2. summon an armour stand with ShowArms: 1b

      /summon armor_stand ~ ~ ~ {ShowArms: 1b}

      3. Give yourself one stone
      4. Go in either adventure mode or survival mode
      5. Give the armour stand the stone by right clicking it
      6. It does not trigger the advancement (it does work in creative mode or if you have multiple of the same item selected)

            cojomax99 [Mojang] Cory Scheviak
            ErrorCraft ErrorCraft
            Votes:
            11 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: