Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-187400

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.21.31 Hotfix
    • Unconfirmed
    • Windows

      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

            Hangekisobu_231 Hangekisobu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: