I'm trying to make a block that will generate items infinitely in the output slots, but I'm having trouble. FIXED

Started by akqle on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm trying to make a block that will generate items infinitely in the output slots, but I'm having trouble. FIXED
Fri, 07/29/2022 - 01:46 (edited)

As the title says, I want the block to generate items inside the slots, I could'nt find any way to simply add items so i did this: but it just crashes my game.

repeat infinite times

do

     wait 20 ticks on server-side

     do 

          set 0+1 [item] in slot 0 of the currently open gui of event/target entity

          set 0+1 [item] in slot 1 of the currently open gui of event/target entity

          set 0+1 [item] in slot 2 of the currently open gui of event/target entity

and i have it set to right click because it wouldnt let me put it under client display random tick or anything else really.

EDIT: FIXED IT

Edited by akqle on Fri, 07/29/2022 - 01:46