Block Placed When Opening GUI

Started by stalarys on

Topic category: Help with modding (Java Edition)

Last seen on 15:13, 6. Mar 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Block Placed When Opening GUI
Sat, 02/10/2024 - 20:11 (edited)

Hello, hello! Very much a rookie and only picked up this yesterday, but I'm quite delighted to only have had one issue I couldn't solve when making my first lil gizmo :]

 

I'm working on adding an new GUI to the vanilla Fletching Table; the GUI opens upon right-clicking a block that's checked to be a Fletching Table. Everything past that works fine; however, upon opening the interface, the right-clicking action performs the act of a placing a block before opening the GUI.

I presume that the issue is within the shown procedure; because it's a vanilla block, I had to find a workaround to associating the block with the given GUI. Is there a function to be added before the if-check?

 

Thanks!

 

EDIT: Additional notes after poking around some more: 
-When crouching and placing a block on one of its sides intentionally, the GUI still opens when the block is placed, contrary to how other interface blocks (such as Crafting Tables) do not open the GUI. I presume this can be a simple if-statement checking whether or not the player is crouched, and not call the 'open GUI' function. However, that still doesn't provide a solution for the block placing when standing normally. 

Edited by stalarys on Sat, 02/10/2024 - 20:11
Last seen on 15:13, 6. Mar 2024
Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
^ ^ sorry for the bump!…
Wed, 02/14/2024 - 14:26

^ ^ sorry for the bump! still trying to find a solution to the block placement issue