set {_item} to {_i} named "<reset>%{_n}%" with lore "<dark gray><bold>---------------" and "<##00A9FF>Value: <green>$<lime>%{_v}%" and "<##00A9FF>Type: <##D1E2FB><bold>COMMON" and "<dark gray><bold>---------------"
set {items::%{_n}%::1} to {_item}
if {items::*} is not set:
broadcast "ERROR"
if {_c1} is set:
set {items::%{_n}%::2} to {_ac1} of {_c1}
return {_item}
command /craft:
aliases: /cr
trigger:
play sound "minecraft:block.chest.open" at volume 2 at pitch 1 to player
open chest with 6 rows named "<black>Crafting Menu" to player
loop 60 times:
set slot (loop-value - 1) of player's current inventory to light blue stained glass pane named "<white>"
loop 28 times:
set slot {slots::%loop-value%} of player's current inventory to air
loop indices of {items::*}:
loop {items::%loop-value%::*}:
set slot {slots::%loop-index-1%} of player's current inventory to {%loop-value-2%::1}```
This is my code, I want to create a list called Items that contains lists of item names, and in those lists I want to store the item and its ingredients.
Then I want to display every item in the /craft gui in specific slots (the {slots} list is defined elsewhere). The problem I have right now is that I'm probably looping through the lists incorrectly, so nothing is being displayed.
#Need help with looping through a list in a list
1 messages · Page 1 of 1 (latest)