#Why is it not working?

1 messages · Page 1 of 1 (latest)

robust basalt
#

scoreboard players remove @s[tag=shoot] ammo_stats 1

execute at @s[tag=shoot] run summon chest_minecart ~ ~ ~ {Tags:[ammo_copy]}

execute at @s[tag=shoot] run item replace entity @e[sort=nearest,tag=ammo_copy] container.0 from entity @s[tag=shoot] weapon.mainhand

execute store result entity @e[type=chest_minecart,sort=nearest,limit=1,tag=ammo_copy] Items[0].nbt.ammo double 1 run scoreboard players get @s[tag=shoot] ammo_stats

item replace entity @s[tag=shoot] weapon.mainhand from entity @e[type=chest_minecart,sort=nearest,limit=1,tag=ammo_copy] container.0

execute as @s[tag=shoot] run say test

execute if entity @s[tag=shoot] run function gun:shoot/start

(item in chest_minecart still has the same ammo) 😦

spark nexusBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1723400705:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

mortal sable
#

what sould it do?

#

is this function ran as the player?

#

oh and also, change double to int

#

and kill the minecart when not needed

robust basalt
robust basalt
mortal sable
#

then make sure ther's only one minecart

robust basalt
#

its not working even if there is one minecart

#

i have been tyring to do this for last 2 weeks and i cant

mortal sable
#

in this command execute at @s[tag=shoot] run item replace entity @e[sort=nearest,tag=ammo_copy] container.0 from entity @s[tag=shoot] weapon.mainhand replace @e[sort=nearest,tag=ammo_copy] with @e[sort=nearest,tag=ammo_copy,sort=nearest,limit=1]

mortal sable
robust basalt
#

yes

mortal sable
#

does the say work?

robust basalt
#

yes

mortal sable
robust basalt
#

item in chest_minecart still has the tag amount

#

so there is problem i guess but i dont kown how to fix it

mortal sable
#

oh lol

robust basalt
robust basalt
mortal sable
#

in this command execute store result entity @e[type=chest_minecart,sort=nearest,limit=1,tag=ammo_copy] Items[0].nbt.ammo double 1 run scoreboard players get @s[tag=shoot] ammo_stats change nbt to tag

robust basalt
#

ok

mortal sable
#

It's a mistake I made in the last help post :p It has been so long since I worked with the nbt, I got too used to the new components stuff

mortal sable
robust basalt
#

{id: "minecraft:ender_eye", Count:1b, tag:{cooldown:10,ammo:3242, semi:0, recoil:2}}

mortal sable
#

did you do that

robust basalt
#

yes i changed

mortal sable
#

ah ok does it work now?

robust basalt
#

Yes

#

Thank you

mortal sable
#

aah noice

#

glad I could help you :)

robust basalt
#

one question

#

how can i kill minecarts

#

becouse they drop items

mortal sable
#

um with this:

keen rivetBOT
#
data remove @e[type=minecart,limit=1,sort=nearest] Items
kill @e[type=minecart,limit=1,sort=nearest]
robust basalt
#

ok thank you