Solved Remove Armour Protection NBT

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

Veraid

Member
Feb 8, 2017
25
8
3
28
I'm making my own custom armour protection values but I want to remove the vanilla armour protection (preferably through NBT) I'm using skstuff and I need to know the nbt tag for armour so I can remove it

Example:
code_language.skript:
command /test:
    trigger:
        add "{armor:0}" to nbt of tool of player

Please help me find the correct NBT Tag! Thanks! Also if your solution isn't related to NBT and instead about canceling the damage event I'd prefer not to do it that way I want to keep it as vanilla as possible
 
The easiest way to do it is use TuSKe and its damage modifier expression:
code_language.skript:
on damage:
    #checks for see if it's the custom armor
    clear damage armor

#the damage modifiers are:
#absorption - This represents the damage reduction caused by the absorption potion effect.

#armor - This represents the damage reduction caused by wearing armor.

#base - This represents the amount of damage being done.

#blocking - This represents the damage reduction caused by blocking, only present for Players.

#hard hat - This represents the damage reduced by a wearing a helmet when hit by a falling block.

#magic - This represents the damage reduction caused by the combination of: Armor enchantments Witch's potion resistance

#resistance - This represents the damage reduction caused by the Resistance potion effect.
But if you want to do it via the NBT it should be:
code_language.skript:
add "{AttributeModifiers:[{AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:1,UUIDMost:1}]}" to your armor item's nbt
That should work.
 
Last edited by a moderator:
The easiest way to do it is use TuSKe and its damage modifier expression:
code_language.skript:
on damage:
    #checks for see if it's the custom armor
    clear damage armor

#the damage modifiers are:
#absorption - This represents the damage reduction caused by the absorption potion effect.

#armor - This represents the damage reduction caused by wearing armor.

#base - This represents the amount of damage being done.

#blocking - This represents the damage reduction caused by blocking, only present for Players.

#hard hat - This represents the damage reduced by a wearing a helmet when hit by a falling block.

#magic - This represents the damage reduction caused by the combination of: Armor enchantments Witch's potion resistance

#resistance - This represents the damage reduction caused by the Resistance potion effect.
But if you want to do it via the NBT it should be:
code_language.skript:
add " {AttributeModifiers:[{AttributeName:""generic.armor"",Name:""armor"",Amount:0,Operation:0,UUIDLeast:1,UUIDMost:1}]}" to your armor item's nbt
That should work.

And now you are 2 for 2 :emoji_slight_smile: thanks! I was trying the TuSKe stuff you recommended but it was throwing this in console https://puu.sh/uvYaF/ab197faf10.png when attempting to use it also clear damage armor didn't work I had to put it as reset damage armor, anyway the NBT you gave me is working just as I wanted it so thanks!
 
Status
Not open for further replies.