problem with my skript

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

saad3mad

Member
Mar 29, 2023
3
0
1
18
hey, i'm trying to make the note block useless i want it like a regular block,
the main idea is to make new blocks out of note block, now there is a cool thing if u edit the blockstates of note block in the resourse pack you could add a texture to the note block for example:

Code:
"variants": {
        "instrument=hat,note=1": { "model": "block/CustomBlock" },

now with every instrument and note i could add a new block texture
the problem is with coding it with skript i wrote a skript but does have a lot of problem i will point to it
here is the skript:

Code:
on break of note block:
    if event-block is note_block[instrument=hat,note=1]:
        set {_nbt} to nbt compound of event-block
        set {_block} to tag "block" of {_nbt}
        drop event-block named "Bobz" #prob1

on place of note block:
    set event-block to note_block[instrument=hat,note=1] #prob2
        

on rightclick on note block: #the big prob3
    if player is not holding air:
        if player is holding blocks:
            set {_B} to player's tool
            set {_B} to location of targeted block
            cancel event
    else:
    if player is holding air:
        cancel event

  • the first problem: i wanted to link the block with a tag but i didn't know how the idea behind that is to be able to call the block in any skript without relying on the name of it
  • the second problem: the problem here is that i can't make it
  • Code:
    on place of note block:
    [*]    if player is holding note block named "Bobz":
    [*]        set event-block to note_block[instrument=hat,note=1]
  • the big problem: here is where all the fun end the idea here is when the player rightclick the noteblock it changes the note and sometimes if there is a grass underneath it, it turns into dirt and the instrument changes to i tried to cancel the event when clicking on it but i had another problem, the problem is i want the player to be able to build with note blocks like a regular blocks so i tried to make it when player rightclick on it with a block the skript detects the block they hold and place a block facing the player or in the targeting block the player wants the block to be
thats all :]


 
Status
Not open for further replies.