Mojira Archive
MCPE-187400

playerInteractWithBlock event doesn't detect when you rotate an item within an item frame

Summary:
The playerInteractWithBlock event doesn't detect if you rotate an item within an item frame.

Code Sample:

import { world } from "@minecraft/server";

world.beforeEvents.playerInteractWithBlock.subscribe((ev) => {
    const block = ev.block;
    if (block.typeId.includes === "frame" && !block.typeId.includes === "end_") {
        ev.cancel = true;
    }
})

Steps to Reproduce:

  1. Import the attached pack and apply it in your world
  2. Place an item frame and put an item in it
  3. Rotate the item

Expected Results:
The rotation is canceled

Observed Results:
The item is rotated

Cannot Reproduce

Hangekisobu

2024-10-12, 03:56 PM

2024-10-12, 06:00 PM

2024-10-12, 06:00 PM

0

2

Unconfirmed

item-frame, scripting-api

1.21.31 Hotfix

-