How to get an item GUI to open when looking at a specific block?

Started by Pineapples_1403 on

Topic category: Help with modding (Java Edition)

Last seen on 03:57, 24. Feb 2024
Joined Jan 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to get an item GUI to open when looking at a specific block?

Heya it's my first post so I'm sorry if I'm not familiar with proper forum etiquette.

Anyways onto my dilemma, I have been trying to make a block that has two separate GUI's essentially. The first one opens just fine (I haven't done the programing on it yet), but to access the second one I wanted to use an item that would "override" the first GUI and open the second one. I've been trying to figure it out on my own, but I'm very new to this and programing/coding in general.

If context to what I'm specifically trying to make helps, I'm trying to make a wind chime that you can add and take away chimes from (that's what the first GUI will control), the second GUI would be opened using a tuning fork and that's how the player could change the Key signature and pitches of each specific "chime". Maybe this is way too complicated for a second project after figuring out the absolute basics, but I'm really passionate about it and would love to know how this could be done, if at all. Any help is greatly appreciated and I hope ya'lls are having a wonderful day!

Last seen on 15:20, 23. Apr 2024
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
on player tick update if…
Sun, 02/18/2024 - 00:59

on player tick update

if target entity has specific item

if block exists at x y z (Use raytrace distance)

then open gui for target entity