Mojira Archive
MCM-1729

Unable to cancel Lectern GUI open event via PlayerInteractWithBlockBeforeEvent in ScriptAPI

Partner Rank: 2 - Important
 
Verification Builds: Stable 1.20.51 & Preview 1.20.60.23
 
Regression Builds: Unknown/None
 
Summary: Unable to cancel Lectern GUI open event via PlayerInteractWithBlockBeforeEvent in ScriptAPI
 
Affects currently Live Content: No
 
Impact: A core mechanic of our redstone-based game relies on invisible lecterns. Not being able to cancel the GUI open event has an impact on gameplay, and we could not release the feature/product in this state
 
Repro Steps:

  1. Download repro world below (which includes the following script)
    MCM-1729 - Lectern Cancel Event World Download
world.beforeEvents.playerInteractWithBlock.subscribe(e => {
    world.sendMessage(e.block.typeId) // Send event message
    e.cancel = true // Cancel open event
})  
  1. Load into the imported world (Beta APIs enabled)
  2. Attempt to right-click Lectern, notice the GUI opens regardless.
  3. Right-click a Furnace, Crafting Table or Chest & notice the event is cancelled as expected.

Repro Rate: 100%
 
Observed Results: Upon right-clicking the Lectern, the pages GUI opens.
 
Expected Results: Upon right-clicking the Lectern, the pages GUI should not open.
 
Screenshots/Videos attached: Yes, sent to Greg Walls via Compass.

Notes: None

Unresolved

MSpaceDev

2023-12-25, 08:41 PM

2024-07-13, 11:37 AM

0

0

Future Release

-