nbt vanilla access value

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

ButtersStotch

Member
Dec 18, 2017
18
1
0
27
Hey, I want to modify the effect.digSpeed attribute but I do not know how to access it. I tried it with setting a nbt value like effect.digSpeed: 1 but it wa snot working. How exactly do I get access to that value?
 
As far as I know, the effect.digSpeed property has a fixed value of 0.1

Can this help you?
code_language.skript:
replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:0.01d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in nbt of entity

- About UUIDMost and UUIDLeast
+ I don't know anything about it, i just take for example when i check my nbt

Change "Amount" to change the value of the attribute and it uses the following formula:
{Base of attributes} * (1 + {Amount of modifiers}

See more here
 
As far as I know, the effect.digSpeed property has a fixed value of 0.1

Can this help you?
code_language.skript:
replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:0.01d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in nbt of entity

- About UUIDMost and UUIDLeast
+ I don't know anything about it, i just take for example when i check my nbt

Change "Amount" to change the value of the attribute and it uses the following formula:
{Base of attributes} * (1 + {Amount of modifiers}

See more here

Going to test it today...thanks already for the healp.
 
  • Like
Reactions: HackerOTVW
You need SkStuff
Well...maybe am i using it wrong but as far as I tried it with:
Code:
command /testnbt <text>:
    trigger:
        if player's name is "Butters":
            set {_nbt} to player's nbt
            if arg-1 is "1":
                replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:-1.0d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in {_nbt}
            if arg-1 is "2":
                replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:0.001d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in {_nbt}
            if arg-1 is "3":
                replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:0.1d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in {_nbt}

it was not working. It had no effect on the digspeed.
 
Well...maybe am i using it wrong but as far as I tried it with:
Code:
command /testnbt <text>:
    trigger:
        if player's name is "Butters":
            set {_nbt} to player's nbt
            if arg-1 is "1":
                replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:-1.0d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in {_nbt}
            if arg-1 is "2":
                replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:0.001d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in {_nbt}
            if arg-1 is "3":
                replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:0.1d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in {_nbt}

it was not working. It had no effect on the digspeed.
Can you post the error and why you do not use Skellett's "Apply Better Potion"
[doublepost=1521467600,1521467156][/doublepost]I think you need to use
code_language.skript:
replace every "..." with "..." in nbt of player
because
replace every "Name:""generic.attackSpeed""" with "Modifiers:[0:{UUIDMost:-5797418877589107702L,UUIDLeast:-6181652684028920077L,Amount:-1.0d,Operation:2,Name:""effect.digSpeed 0""}],Name:""generic.attackSpeed""" in {_nbt}
replaces only in {_nbt}.
 
Can you post the error and why you do not use Skellett's "Apply Better Potion"
[doublepost=1521467600,1521467156][/doublepost]I think you need to use
code_language.skript:
replace every "..." with "..." in nbt of player
because

replaces only in {_nbt}.

I am getting with this way errors: "the nbt of the player is not a text..."
SKStuff ist installed
 
Have you tried:
code_language.skript:
replace every "..." with "..." in nbt of player parsed as text
 
Status
Not open for further replies.