Changing NBT on A Spawn Egg

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

BeerHuntor

Member
Apr 15, 2017
2
0
0
Hello, I am trying to change an NBT tag on a spawn egg, to allow me to use multiple spawn eggs for the same function. I have tried custom name but it doesn't seem to work.

Code:
On rightclick holding spawn egg:
    if "%name of tool of player%" contains "&dThrowable Egg 1":
        cancel event
        make the player shoot a egg at speed 1
        execute console command "/execute %shooter% ~ ~ ~ /entitydata @e[type=Egg,r=2] {xTile:5546}"

On projectile hit:
    broadcast "Test: %nbt of event-entity%"

If any one is able to help. Im new to skript and console commands, but have java knowledge, So any response if it could be explained to suit would be much appreciated. Thanks.
 
Just add it to the last shot projectile:
code_language.skript:
add "{xTile:5546}" to shot projectile's nbt
 
how would i go about doing that, sorry as i said, new to skript :emoji_slight_smile:
 
Status
Not open for further replies.