Solved [Help] Display Custom Skull, skStuff + SkQuery

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Animela

Member
Jul 28, 2017
4
0
0
28
Skript Version: 2.2-dev27
skStuff Version: v1.6.4.1-fork-1.12
SKquery Version: v3.22.1
Minecraft Version: 1.12
---
Full Code:
code_language.skript:
command /skullist [<text=Menu>]:
    executable by: players
    usage: /skulllist
    trigger:
        if arg 1 is "Menu":
            wait 2 ticks
            open chest with 1 rows named "&2Skull List &7- &0Test" to player
            Format slot 0 of player to skull with custom nbt "{display:{Name:""Vegemite""},SkullOwner:{Id:""3fd44f85-9f07-4a4e-9854-ee57476ce1b8"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWU4ODkwODc0YTMwNjZmNDI2ZTY2ZTM3NDM4ZjQ1YWIyOWE1YmYyNTgyZGI3M2NiNGNmZjY5NTRhNTc4ZWYifX19""}]}}}"

Errors on Reload:

code_language.skript:
29.07 13:15:34 [Server] ERROR [Skript] ':{Name:""Vegemite""},SkullOwner:{Id:""3fd44f85-9f07-4a4e-9854-ee57476ce1b8"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWU4ODkwODc0YTMwNjZmNDI2ZTY2ZTM3NDM4ZjQ1YWIyOWE1YmYyNTgyZGI3M2NiNGNmZjY5NTRhNTc4ZWYifX19""}]}}}"' is not a valid item data (skulls.sk, line 8: Format slot 0 of player to skull with custom nbt "{display:{Name:""Vegemite""},SkullOwner:{Id:""3fd44f85-9f07-4a4e-9854-ee57476ce1b8"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWU4ODkwODc0YTMwNjZmNDI2ZTY2ZTM3NDM4ZjQ1YWIyOWE1YmYyNTgyZGI3M2NiNGNmZjY5NTRhNTc4ZWYifX19""}]}}}"')

Other Useful Info:
When using the give command for this, this exact item NBT works(Without the extra "'s as normal) however it doesn't appear to be a valid Item Data for some reason when it comes to the skStuff fork.
At this point I'm just trying to open a Chest using a Custom Skull with that Exact NBT Data in slot 0
I"m wondering if somehow the NBT data format is different from what it's normally supposed to be.

This is a note at the bottom of the code so I don't forget where I got it from.
#/give @p skull 1 3 {display:{Name:"Vegemite"},SkullOwner:{Id:"3fd44f85-9f07-4a4e-9854-ee57476ce1b8",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWU4ODkwODc0YTMwNjZmNDI2ZTY2ZTM3NDM4ZjQ1YWIyOWE1YmYyNTgyZGI3M2NiNGNmZjY5NTRhNTc4ZWYifX19"}]}}}

Have you tried searching the docs? Yes. Doc doesn't have an exact example of NBT Use if it was changed at all.
Have you tried searching the forums? No.
 
code_language.skript:
command /skullist [<text=Menu>]:
    executable by: players
    usage: /skulllist
    trigger:
        if arg 1 is "Menu":
            open chest with 1 rows named "&2Skull List &7- &0Test" to player
            set slot 0 of player's current inventory to player head with nbt "{SkullOwner:{Id:""3fd44f85-9f07-4a4e-9854-ee57476ce1b8"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYWU4ODkwODc0YTMwNjZmNDI2ZTY2ZTM3NDM4ZjQ1YWIyOWE1YmYyNTgyZGI3M2NiNGNmZjY5NTRhNTc4ZWYifX19""}]}}}" with name "Vegemite"

I wasn't able to use format, but I rarely ever use format and I suggest not using it unless it is absolutely needed, I also moved the name outside of the NBT idk, its just what i do makes it seem a bit nicer in my mind
 
It wasn't really necessary to move the name. That's just the direct pull from the Item from Fresh Coal Heads.
I've been trying different methods of NBT Data and nothing seems to pull up at valid, period.
One Attempt was
Code:
            format slot 0 of player with player's skull named "§5Test" with nbt "{ench:[{id:16,lvl:4}]}"
Which is basically sharpness 4.
Changing it to Stone yields the same "item data invalid" error.

The problem is I'm trying to make an alternative GUI For an Outside Sourced Pets Plugin that uses Custom Heads. Typically when I dislike I gui's set up I'll create a custom one so that I can reorganize it better or in this case, I'm creating a Gui with better Organization so that a couple different Cosmetic Plugins can be accessed under the same command.
I can get the values for said heads or create similar ones but I need to be able to input that data into the code so I can get it to display. The main reason for downloading skStuff was specifally for its NBT Usage.

I //could// just use regular items to "Represent" the Pets but I'd rather show a Preview Head instead.

When trying new formats I use a testing base code that can be inserted into bigger projects after it's been fully debugged since copy-pasting a fully debugged format usually works.
I think it might just be a problem with the skStuff fork itself.
 
Last edited by a moderator:
I am facepalming so hard right now.

I thought for a moment you were just telling me to make it unstealable because GUI and I was thinking to myself "But.. I already know it needs to be unstealable, I need to run a command when clicked. I was going to add that when I found the right item format"

So I added "to close" so that it would "close" the Gui just because "Do what they say, say it didn't work when it gets no results"

Thank you Lmao, the problem was that it needed to know what that item was supposed to be doing in the Gui before it could validate the NBT data. It's odd because it didn't seem to work that way before but at least we know why.
Gosh I feel so stupid. I've written so much stuff on my own and help a few friends consistently with theirs.
This simplification of format for bringing the two together just eluded me so effortlessly.
I'm going to go make food and then bang my head on the table until I feel like finishing this project again.
 
Status
Not open for further replies.