Solved Colored Firework Star

  • 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.
I need the Firework Star to be colored white in the GUI, however putting "firework star colored white" just results in a normal firework star (no errors).

Any suggestions on how to fix it?

Also would it be possible to remove the description "Small Ball" and "White" (if colored) from the firework star that minecraft normally adds onto it?

Thanks for any help!

Skript Version

2.2-dev37c

Addons

skDragon
SkQuery
SkMorkaz
Skillet
TuSKe
SkStuff (Not working for some reason)

-----------------------------------------------------------

Section of code where the issue is
↓ ↓ ↓

code_language.skript:
command enchants:common:
    trigger:
        wait 1 tick
        command "/playsound mob.bat.takeoff %player% ~ ~ ~ 1 1 1"
        open chest with 1 row named "           &lCOMMON ENCHANTS" to player
        wait 2 tick
        format slot 0 of player with firework star colored white named "&f&lNONE" with lore "&7No &f&nCOMMON&7 enchants added yet" to be unstealable
        format slot 8 of player with arrow named "&cBack" with lore "&7Click to go back to the enchants menu" to run [make player execute command "/enchants:sort:rarity"]
 
Last edited:
Things like Firework stars use stored NBT values to deal with colors.
Your best bet, is to craft one in game, and use a command to store it as a saved variable, and call upon that variable in your GUI
 
It seemed to work

code_language.skript:
command savenbt [<text>]:
    permission: Staff.enchants
    trigger:
        arg-1 is "common":
            send "&aSuccessfully saved NBT of &6SLOT_0&7 of menu &6COMMON_ENCHANTS&7 to NBT of &6PLAYERS_TOOL"
            set {fwswhiteGUI} to player's tool
            stop
        else:
            send "&e&lUsage: &e/savenbt [<enchant rarity>]"
            send "&7Saves NBT of player's tool to enchant GUI"
            stop

code_language.skript:
command enchants:common:
    trigger:
        wait 1 tick
        command "/playsound mob.bat.takeoff %player% ~ ~ ~ 1 1 1"
        open chest with 1 row named "           &lCOMMON ENCHANTS" to player
        wait 2 tick
        format slot 0 of player with {fwswhiteGUI} named "&f&lNONE" with lore "&7No &f&nCOMMON&7 enchants added yet" to be unstealable
        format slot 8 of player with arrow named "&cBack" with lore "&7Click to go back to the enchants menu" to run [make player execute command "/enchants:sort:rarity"]

Thank you!
 
It seemed to work

code_language.skript:
command savenbt [<text>]:
    permission: Staff.enchants
    trigger:
        arg-1 is "common":
            send "&aSuccessfully saved NBT of &6SLOT_0&7 of menu &6COMMON_ENCHANTS&7 to NBT of &6PLAYERS_TOOL"
            set {fwswhiteGUI} to player's tool
            stop
        else:
            send "&e&lUsage: &e/savenbt [<enchant rarity>]"
            send "&7Saves NBT of player's tool to enchant GUI"
            stop

code_language.skript:
command enchants:common:
    trigger:
        wait 1 tick
        command "/playsound mob.bat.takeoff %player% ~ ~ ~ 1 1 1"
        open chest with 1 row named "           &lCOMMON ENCHANTS" to player
        wait 2 tick
        format slot 0 of player with {fwswhiteGUI} named "&f&lNONE" with lore "&7No &f&nCOMMON&7 enchants added yet" to be unstealable
        format slot 8 of player with arrow named "&cBack" with lore "&7Click to go back to the enchants menu" to run [make player execute command "/enchants:sort:rarity"]

Thank you!
WAHOO!!! You are welcome!
I had this same issue with a Tipped Arrow, and I was not about to write a whack-a-doodle worth of code to set the NBT for the arrow. I tried this and it worked.... Glad this advice helped you as well!
 
Status
Not open for further replies.