How to set the nbt of a placed block?

  • 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.

pepper82

Member
Jan 26, 2017
272
1
18
41
Hi all,

I am trying to set the nbt of a placed block but it won't work. I found this thread but the solution is not working for me (gives me internal error).
I am on 1.12.2.
Any ideas?

code_language.skript:
command /hed [<text>]:
    trigger:
        if arg-1 is "test":
            set targeted block to mob_head_block
            add "{Owner:{Id:""78f0c232-7d83-4987-9e34-e15f421ceef9"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzQ3ZjRmNWE3NGM2NjkxMjgwY2Q4MGU3MTQ4YjQ5YjJjZTE3ZGNmNjRmZDU1MzY4NjI3ZjVkOTJhOTc2YTZhOCJ9fX0=""}]}},Rot:12b,id:""minecraft:skull"",SkullType:3b}" to nbt of targeted block
 
Hi all,

I am trying to set the nbt of a placed block but it won't work. I found this thread but the solution is not working for me (gives me internal error).
I am on 1.12.2.
Any ideas?

code_language.skript:
command /hed [<text>]:
    trigger:
        if arg-1 is "test":
            set targeted block to mob_head_block
            add "{Owner:{Id:""78f0c232-7d83-4987-9e34-e15f421ceef9"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzQ3ZjRmNWE3NGM2NjkxMjgwY2Q4MGU3MTQ4YjQ5YjJjZTE3ZGNmNjRmZDU1MzY4NjI3ZjVkOTJhOTc2YTZhOCJ9fX0=""}]}},Rot:12b,id:""minecraft:skull"",SkullType:3b}" to nbt of targeted block
Can you send the internal error? Also, do you have the working version from here?
 
Well in that case I don't really know the problem, maybe someone else can help you.
 
I have been messing around with the NBT of placed head items using SkStuff too. For to me unknown reasons, i could never get it to work.
 
You could also try setting a variable to the head, then editing the nbt of that variable and placing the head after that
 
Status
Not open for further replies.