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:
Import the attached pack and apply it in your world
Place an item frame and put an item in it
Rotate the item
Expected Results:
The rotation is canceled
Observed Results:
The item is rotated
Attachments
Comments 8

[media]
Resolving as Cannot Reproduce since the issue was the missing namespace in the code.
You can use the feedback site to request allowing it to work without the namespace.