#Tipped arrow not working\

1 messages · Page 1 of 1 (latest)

candid brook
#

i have made a bow with virtual inv

#

@violet wolf

violet wolf
#

Alright

#

What you mean virtual inv?

candid brook
#
    if name of player's tool contains "&e&lAuto Bow":
        if {arrowMode::%uuid of player%} is not set:
            set {arrowMode::%uuid of player%} to 1
        set {_mode} to {arrowMode::%uuid of player%}
        set {_arrowFound} to false
        if {_mode} is 1:
            set {_start} to 0
            set {_end} to 27
        else if {_mode} is 2:
            set {_start} to 0
            set {_end} to 9
        else if {_mode} is 3:
            set {_start} to 10
            set {_end} to 18
        else if {_mode} is 4:
            set {_start} to 19
            set {_end} to 27
        loop numbers between {_start} and {_end}:
            set {_item} to {arrowINV::%loop-number%}
            set {_nbt} to {arrowNBT::%loop-number%}
            set {_amount} to item amount of {_item}
            if {_item} is arrow or spectral arrow:
                if {_amount} > 0:
                    cancel event
                    make player shoot ("%1 of {_item}%" parsed as entity type) at speed 5
                    remove 1 from {_amount}
                    set item amount of {arrowINV::%loop-number%} to {_amount}
                    set {_arrowFound} to true
                    stop loop
            if {_item} is tipped arrow:
                if {_amount} > 0:
                    cancel event
                    make player shoot an tipped arrow at speed 1
                    broadcast "%{_nbt}%"
                    remove 1 from {_amount}
                    set item amount of {arrowINV::%loop-number%} to {_amount}
                    set {_arrowFound} to true
                    stop loop
        if {_arrowFound} is false:
            send actionbar "&a&lCC &7>> &fNo arrows found in your &eAuto Bow&f!" to player
            play sound "sfx.error" to player
            cancel event```
violet wolf
#

this code is really confusing for me Hahaha

candid brook
#

and it will shoot arrows from there

violet wolf
#

Alright, and how does the bow choose arrows?

#

Just order?

candid brook
#

hotbar 1

#

2

#

3

#

and container mode

#

anyways this isnt problem the main problem is related tipped arrows

#

when they are projected they shoot without effects

violet wolf
#

So the issue is that you can't delete a certain tipped arrow?

#

Oh, shoot it

candid brook
#

yea

violet wolf
#

but everything works?

candid brook
violet wolf
#

just effect missing

violet wolf
candid brook
#

correct

violet wolf
#

alright, give me 1 sec

candid brook
#
            if {_item} is tipped arrow:
                if {_amount} > 0:
                    cancel event
                    make player shoot an tipped arrow at speed 1
                    broadcast "%{_nbt}%"
                    remove 1 from {_amount}
                    set item amount of {arrowINV::%loop-number%} to {_amount}
                    set {_arrowFound} to true
                    stop loop```

this part only
candid brook
violet wolf
candid brook
violet wolf
#

you have 2 approaches here

candid brook
#

ok?

violet wolf
#

the first one that I am still searching that is cheking for actual arrow stored potion effect

#

of give an effect to victim based on player mode on shoot

#

Because I've just found that tipped effect arrows are not at item but a content

#

only tipped arrow item exists

candid brook
#

okay so what can i do

violet wolf
candid brook
#

{DataVersion:3953,components:{"minecraft:potion_contents":{potion:"minecraft:awkward"}},count:64,id:"minecraft:tipped_arrow"}

violet wolf
#

?

candid brook
#

@\

#

isnt there cmd like if {_item} is tipped arrow of strong harming:

violet wolf
#

and probably only skbee supports that

#

But I don't use skbee

candid brook
violet wolf
#

Then I can't help you, but let me try

candid brook
violet wolf
#

Yeah, I don't find anything arrow related

candid brook
#

bruh nvm

#

thanks for helping

violet wolf
#

Keep it open, somebody might know

#

You can always store the effect

candid brook
candid brook
#

but you will need a mod called arikeys

#

its fabric

candid brook
mild pelican
#

you might be able to add to the NBT of an arrow when you shoot it.

#

or maybe just make player shoot tipped arrow of poison or whatever

candid brook
#

ig there are over 50+

#

so this cant be done

mild pelican
#

maybe you could do something like set {_x} to last shot projectile add poison to potion effects of {_x}

candid brook
mild pelican
#

okay

mild pelican
candid brook
#

i did but it didnt worked

candid brook
#

bump

candid brook
#

i tried - broadcast "%{_nbt}%" set {_x} to last shot projectile apply {_nbt} to {_x}

#

broadcast thingy is working well

#

{DataVersion:3953,components:{"minecraft:potion_contents":{potion:"minecraft:strong_harming"}},count:64,id:"minecraft:tipped_arrow"}

#

but isnt shooting actual tipped arrow

#

what if i try to grab potion content and then apply to the arrow

opaque torrent
#

the entity itself is different than the item. use a program like mcstacker.net to see examples of the nbt. I use the site regularly, as it is extremely helpful with this sort of thing

candid brook
#

.

candid brook
opaque torrent
#

a shot tipped arrow is just a normal arrow with potion effects, whereas the item is it's own thing. again, use the site i suggested

candid brook
opaque torrent
#

it does, you just actually need to know what you're doing