Remove indesirable 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.

Mikioul

New Member
Mar 20, 2017
7
0
0
25
Hello, i have a command to get a command block to spawn a custom entity

code_language.skript:
execute player command "/setblock ~ ~ ~ command_block 0 replace {Command:/summon armor_stand ~ ~ ~ %nbt of {ast.edit.%player%}%}"

In "%nbt of {ast.edit.%player%}%" there should be the nbt of the armorstand.. But i have indesirable nbt and they corrupt the command of command block.

I obtain this :
code_language.skript:
/summon armor_stand ~ ~ ~ {NoGravity:1b,HurtByTimestamp:0,Attributes:[0:{Base:20.0d,Name:"generic.maxHealth"},1:{Base:0.0d,Name:"generic.knockbackResistance"},2:{Base:0.699999988079071d,Name:"generic.movementSpeed"},3:{Base:0.0d,Name:"generic.armor"},4:{Base:0.0d,Name:"generic.armorToughness"}],Invulnerable:1b,FallFlying:0b,ShowArms:1b,PortalCooldown:0,AbsorptionAmount:0.0f,FallDistance:0.0f,DisabledSlots:2039583,DeathTime:0s,WorldUUIDMost:-493357334771317504L,Pose:{Body:[0:90.0f,1:0.0f,2:0.0f]},Spigot.ticksLived:2827,Invisible:0b,Motion:[0:0.0d,1:0.0d,2:0.0d],Small:0b,UUIDLeast:-6871749258629594985L,Health:20.0f,Bukkit.updateLevel:2,Air:300s,OnGround:0b,Dimension:0,Rotation:[0:78.95984f,1:58.950047f],HandItems:[0:{},1:{}],UUIDMost:-1053057301535371936L,CustomName:"§bMikioul §3Sneak & Click !",Pos:[0:134.81801293439545d,1:75.0d,2:61.650674383556805d],Fire:-1s,ArmorItems:[0:{},1:{},2:{},3:{}],NoBasePlate:1b,HurtTime:0s,WorldUUIDLeast:-5765563831788868621L,CustomNameVisible:1b}

I want to remove this for work my command :
code_language.skript:
            remove "HurtByTimestamp" from nbt of targeted entity
            remove "FallFlying" from nbt of targeted entity
            remove "AbsorptionAmount" from nbt of targeted entity
            remove "FallDistance" from nbt of targeted entity
            remove "DeathTime" from nbt of targeted entity
            remove "Spigot.ticksLived" from nbt of targeted entity
            remove "Bukkit.updateLevel" from nbt of targeted entity
            remove "Air" from nbt of targeted entity
            remove "OnGround" from nbt of targeted entity
            remove "Dimension" from nbt of targeted entity
            remove "HurtTime" from nbt of targeted entity


Thank's for your help :emoji_grinning:

ps: If I remove the indesirable nbt manually the work ..
 
Status
Not open for further replies.