# block:custom/wizarding_table/set_state
# called by: block:custom/wizarding_table/place

## OFF
$execute if data block ~ ~ ~ {components:{"minecraft:custom_model_data":{flags:[0b]}}} run return run setblock ~ ~ ~ brown_shulker_box{Items:[                                                           {Slot:0b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:1b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:2b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:3b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:4b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:5b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:6b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:7b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:8b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:9b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                             {Slot:10b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:11b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:12b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:13b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:14b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:15b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:16b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:17b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:18b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:19b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:20b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:21b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:22b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:23b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:24b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:25b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}},                                                                            {Slot:26b,id:"stick",components:{"minecraft:custom_data":{magical_addons:{gui:1}}}}],                                                                           CustomName:{"translate":"item.magical_addons.wizarding_table"},                                                          lock:{components:{item_name:"§maddons.wizarding_table"}},components:$(components)}

## ON
$execute if data block ~ ~ ~ {components:{"minecraft:custom_model_data":{flags:[1b]}}} run setblock ~ ~ ~ barrel{CustomName:{"translate":"item.magical_addons.wizarding_table"},components:$(components)}