How to make an item spawn in GUI

Started by AppleMod on

Topic category: Help with modding (Java Edition)

Last seen on 05:32, 20. May 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an item spawn in GUI

So I have created a GUI with 1 slot in it, and a block that opens the GUI when right clicked. How do I attach a loottable or item to spawn in the slot?

Last seen on 05:32, 20. May 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This helps, but I'm trying…
Fri, 10/29/2021 - 01:17

This helps, but I'm trying to make the item that spawns in the block randomized. I'm assuming I need to make a variable? How would I go about doing that?

Last seen on 15:08, 8. May 2022
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If random 0-1= X= item 1 If…
Fri, 10/29/2021 - 04:52

If random 0-1= X= item 1

If random 0-1 = Z= item 2

Etc.

Last seen on 15:08, 8. May 2022
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I would like to clarify this…
Fri, 10/29/2021 - 04:52

I would like to clarify this should probably be else blocks not just a ton of ifs

Last seen on 15:08, 8. May 2022
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I would like to clarify this…
Fri, 10/29/2021 - 04:53

I would like to clarify this should probably be else blocks not just a ton of ifs

Last seen on 05:32, 20. May 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, I don't know if I'm…
Tue, 11/02/2021 - 23:43

Sorry, I don't know if I'm understanding this right. I tried putting the Random [0,1] block in the Set 1 blank in slot 0 of gui...

What am I doing wrong?

Last seen on 15:08, 8. May 2022
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here's the complete code for…
Wed, 11/03/2021 - 04:30

Here's the complete code for 2 items

If | Random 0,1 | > | 0.5

Set item in slot 1 to (item)

Else

Set item in slot 1 to (item2)

That should give you the idea

Last seen on 05:32, 20. May 2023
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So I see the little gear on…
Sat, 11/06/2021 - 15:06

So I see the little gear on the if block, when I click it, else shows up. I can't drag else onto the desktop or click it? I'm sorry how do I make an else block?

Last seen on 15:08, 8. May 2022
Joined Aug 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You drag else onto the if…
Fri, 11/12/2021 - 17:38

You drag else onto the if block WITHIN the little gear