• Hey! Register here to create your account, engage with the community, and talk about what is new!

Tags of a shulker box: Sorting memory effectively

JustImagineIt

New member
Joined
Apr 18, 2023
Messages
18
Reaction score
0
Read-only memory is extremely useful for making systematic puzzles. In DiamondFire is kind of hard to create. I can put a bunch of unregulated "create dictionary" or "create list" together, but I want to be smarter than just chaining. I'm getting lost in my current setup of two lists.

If I put a shulker box in a list/variable, how can I get its contents? I tried to use getallitemtags, but that returns an empty dictionary.
 
Solution
Unfortunately you can't get an item's NBT, however, if you want to make a Dictionary the compact way, you can use Item Tags
Simple hold and item and do /i tag set <key> <value> , and then you can use the GetAllItemTags to get a Dictionary of them! Unfortunately tho, this only supports text/numbers but you can save a location by setting 3 tags (x, y, and z) and then create a location with the numbers.

ARMcPro

Forum adept
Overlord
Joined
Oct 20, 2020
Messages
1,243
Reaction score
349
Unfortunately you can't get an item's NBT, however, if you want to make a Dictionary the compact way, you can use Item Tags
Simple hold and item and do /i tag set <key> <value> , and then you can use the GetAllItemTags to get a Dictionary of them! Unfortunately tho, this only supports text/numbers but you can save a location by setting 3 tags (x, y, and z) and then create a location with the numbers.
 
Solution

JustImagineIt

New member
Joined
Apr 18, 2023
Messages
18
Reaction score
0
...if you want to make a Dictionary the compact way, you can use Item Tags...
Not a bad idea for simple dictionaries!
Unfortunately the point of shulker boxes was so I could see everything at once in simple categories. Currently I am using the locations as the keys, not the data.

(...how do headhunt games do it?)
 

RetroWolf

Forum adept
Joined
Jul 24, 2022
Messages
112
Reaction score
15
Not a bad idea for simple dictionaries!
Unfortunately the point of shulker boxes was so I could see everything at once in simple categories. Currently I am using the locations as the keys, not the data.

(...how do headhunt games do it?)
by headhunt games do you mean the ones where u have a gui that can tell u every head u found?
 

JustImagineIt

New member
Joined
Apr 18, 2023
Messages
18
Reaction score
0
by headhunt games do you mean the ones where u have a gui that can tell u every head u found?
Yes, exactly that! I'd figure they have a list or dictionary with keys composed of the type of head or the location of the head. The idea I had was to pack those keys/indicies into shulker boxes first.
 

RetroWolf

Forum adept
Joined
Jul 24, 2022
Messages
112
Reaction score
15
Yes, exactly that! I'd figure they have a list or dictionary with keys composed of the type of head or the location of the head. The idea I had was to pack those keys/indicies into shulker boxes first.
for what i recall is that you need to have a chest of some sort placed in a certain spot: IE x0 y5 z0 lets say its a singular chest with a block of mmm redstone...

U need to get the location of that block which i think is like you get the chest location via player action and yeah
 
Top Bottom