mojira.dev
MCPE-235720

Cancelling beforeEvents.itemUse when equipping gear from hotbar shows the newly equipped gear flicker on the character before being rolled back

Repro Steps:

  1. Set up API to cancel item usage

    world.beforeEvents.itemUse.subscribe(evt => {
      evt.cancel=true;
    }
  2. Wear leather chestplate

  3. Select diamond chestplate in the hotbar, and attempt to use it

Expected:

Since this is a beforeEvent, diamond chestplate isn’t equipped, and there is no indication to the attempt being made. Everything about the item usage is cancelled before it can happen.

Actual:

Diamond chestplate is equipped for a split second and is visible on the character, before being undone.

Comments 0

No comments.

Max Brushchenko

(Unassigned)

Unconfirmed

Multiple

Windows 11

1.21.132 Hotfix

Retrieved