Skip to content

Merchant menu can resolve the wrong offer #13695

@neyti444

Description

@neyti444

Expected behavior

When a player selects a specific villager trade, the output slot should only show the result of that selected offer if the current input items satisfy that offer.

If the selected offer does not match the current inputs, the output slot should remain empty. The server should not fall back to another matching offer.

Observed/Actual behavior

A librarian had both of these offers available at the same time:

emerald + book -> enchanted book
emerald -> lantern

If I selected the enchanted book trade and placed only emerald(s) into the payment slot while leaving the second required slot empty, the output slot showed a lantern instead of remaining empty.

So the selected trade was not respected and another matching offer was resolved instead.

Image

Steps/models to reproduce

  1. Start a clean Paper server on the latest build for your Minecraft version, with no plugins and no datapacks.
  2. Get a librarian that has both of these offers available:
    emerald + book -> enchanted book
    emerald -> lantern
  3. Open the merchant UI.
  4. Select the enchanted book trade.
  5. Put only emerald(s) into the first payment slot and leave the second slot empty.
  6. Observe that the output slot shows a lantern instead of staying empty.

This appears to happen when the selected offer is the first recipe in the merchant offer list.

Plugin and Datapack List

Plugins: None
Datapacks: None

Paper version

This server is running Paper version 1.21.11-127-main@bd74bf6 (2026-03-10T02:55:23Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.11-35-9ce7072 (MC: 1.21.11)

Other

mb fix
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions