Hello, I am trying to make custom crafting in a custom GUI, but whenever I seem to put in the recipe the final result seems to flicker?
Code:
You can check the code for yourself and you can see that the item that the crafting menu is supposed to give you just flickers a lot. (By flickering I mean that it appears and dissapears)
And whenever I take out 16 wheat of one of the slots, the flickering dissapears.
Any help? Thanks in advance.
[doublepost=1631022983,1630965409][/doublepost]bump
Code:
Code:
on right click:
if event-block is piston:
cancel event
open chest with 3 rows named "Farm Crafter" to player
wait 4.5 tick
set slot 0 of player's current inventory to stained glass pane named " "
set slot 1 of player's current inventory to stained glass pane named " "
set slot 2 of player's current inventory to stained glass pane named " "
#format slot 3 of player with white stained glass pane named " " to be unstealable
#format slot 5 of player with white stained glass pane named " " to be unstealable
set slot 6 of player's current inventory to stained glass pane named " "
set slot 7 of player's current inventory to stained glass pane named " "
set slot 8 of player's current inventory to stained glass pane named " "
set slot 9 of player's current inventory to stained glass pane named " "
set slot 10 of player's current inventory to stained glass pane named " "
set slot 11 of player's current inventory to stained glass pane named " "
#format slot 12 of player with white stained glass pane named " " to be unstealable
#format slot 14 of player with white stained glass pane named " " to be unstealable
set slot 15 of player's current inventory to stained glass pane named " "
#format slot 16 of player with white stained glass pane named " " to be unstealable
set slot 17 of player's current inventory to stained glass pane named " "
set slot 18 of player's current inventory to stained glass pane named " "
set slot 19 of player's current inventory to stained glass pane named " "
set slot 20 of player's current inventory to stained glass pane named " "
#format slot 21 of player with white stained glass pane named " " to be unstealable
#format slot 22 of player with white stained glass pane named " " to be unstealable
#format slot 23 of player with white stained glass pane named " " to be unstealable
set slot 24 of player's current inventory to stained glass pane named " "
set slot 25 of player's current inventory to stained glass pane named " "
set slot 26 of player's current inventory to stained glass pane named " "
on inventory click:
if inventory name of player's current inventory is "Farm Crafter":
if clicked slot is 0:
cancel event
if clicked slot is 1:
cancel event
if clicked slot is 2:
cancel event
if clicked slot is 6:
cancel event
if clicked slot is 7:
cancel event
if clicked slot is 8:
cancel event
if clicked slot is 9:
cancel event
if clicked slot is 10:
cancel event
if clicked slot is 11:
cancel event
if clicked slot is 15:
cancel event
if clicked slot is 17:
cancel event
if clicked slot is 18:
cancel event
if clicked slot is 19:
cancel event
if clicked slot is 20:
cancel event
if clicked slot is 24:
cancel event
if clicked slot is 25:
cancel event
if clicked slot is 26:
cancel event
every 4.5 tick:
loop all players:
loop all items in loop-player's inventory:
if inventory name of loop-player's current inventory is "Farm Crafter":
if slot 3 of loop-player's current inventory is 16 wheat:
if slot 4 of loop-player's current inventory is 16 wheat:
if slot 5 of loop-player's current inventory is 16 wheat:
if slot 12 of loop-player's current inventory is 16 wheat:
if slot 13 of loop-player's current inventory is 16 wheat:
if slot 14 of loop-player's current inventory is 16 wheat:
if slot 21 of loop-player's current inventory is 16 wheat:
if slot 22 of loop-player's current inventory is 16 wheat:
if slot 23 of loop-player's current inventory is 16 wheat:
# wait 4.5 tick
set slot 16 of loop-player's current inventory to {@enchantedwheat}
You can check the code for yourself and you can see that the item that the crafting menu is supposed to give you just flickers a lot. (By flickering I mean that it appears and dissapears)
And whenever I take out 16 wheat of one of the slots, the flickering dissapears.
Any help? Thanks in advance.
[doublepost=1631022983,1630965409][/doublepost]bump