AS_Amulet_Holder NBT tag interfers with AdvancedPeripheral's getHashItem command
Iris-xii opened this issue ยท 2 comments
Modpack Version
Enigmatica 6 0.5.16
Describe your issue.
First off I understand if this isn't worth looking into, it's a bit of an obscure one.
Something (Astral Sorcery, presumably) is adding an NBT tag to items such as flint and steel, construction wand... when they're held. (AS_Amulet_Holder tag).
Additionally, the advanced peripherals command "/advancedperipherals getHashItem" is required to be able to use some advanced peripherals stuff (unless there's an alternate way to get that hash that I'm unaware of), and you can't use the command without holding an item in your main hand.
The issue is that holding some items in your main hand adds the AS_Amulet_Holder tag to them, which makes the hash it spits out different. Since the tag gets added for as long as you're holding the item, there's no way to get the hash of the NBT the item usually has.
Crash Report
N/A
Latest Log
N/A
Have you modified the modpack?
No
User Modifications
No response
Did the issue happen in singleplayer or on a server?
Singleplayer
A quick search on their discord show you can use the non-hashed nbt as well.
I searched gethashitem
and it brought up this discussion https://discord.com/channels/734726882058174486/779400553813377074/836868166537576470
Looks like you can get the item.nbt data off the item through code. I'd assume by reading a list of items from a chest where that nbt would be missing. I'm no expert (not even a novice with this thing, honestly) but it would seem like you'd have some options here. Your best bet is going to be to ask in their discord, however, as I'm sure Astral isn't adding that NBT without good reason.
Discord link: https://discord.com/invite/QuF3hWDtWC
I have tried the non-hashed nbt in both regular minecraft json format and lua format and I just couldn't get it to work
Thankfully it seems that if you wrap a vanilla chest and getItemDetail it spits out the same kind of hashed nbt Adv Peripherals requires, which I didn't realize could be done. So basically, yeah that works just fine!
Alas I continue my trend of half of my reports being my fault, should've thought about checking their discord - I checked their issues and there was nothing about it so I went 'well I guess there's nothing'