nbt tags of blocks (skBee

  • 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 community!

    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.

MrPannkaka

Member
Apr 19, 2017
3
0
1
In 1.18 i wrote some code that would replace a player wall-mounted head with a normal player head if it had a certain name, but keep the nbt data such as SkullOwner and so on.
It looks like this:

Code:
on place:
    if player's held item is player head:
        if {_item_name} is "Copper Wire":
            set blockstate tag "rotation" of event-block to 0
            set {_nbt} to nbt of event-block
            if event-block is a player wall-mounted head:
                set event-block to player head
                set nbt of event-block to {_nbt}


With the new 1.19 updates to skript and skbee this doesn't work anymore. I have tried endless combinations of nbt, nbt-compound and such but nothing works. What should I do? I almost always get the error
"an nbt compound cant be set to anything".

Help
 
Have you tried setting a variable to event-block, setting the nbt of that variable to {_nbt}, and setting event-block to that variable? Not sure if it'd work.
 
Status
Not open for further replies.