#Ninja Stars broke again and load functions not working.
1 messages · Page 1 of 1 (latest)
<@&1201956957406109788>
💬 While you wait, take this time to provide more context and details.
🙇 If nobody has answered you by <t:1724432202: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
Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D
Open question: #1276258315512447097
We don't just rewrite your code for you
We'll guide you through the process of rewriting it yourself
I'm also aggrovated that my load functions don't work???????
Show us the contents of your load function and we can help
Why do you need 7?
so one in each pack
Now the creature one works?
Uhm
ok
lets start 1 by 1
Okay first is the structures core datapack
"values": [
"safehaven_builds:install"
]
}
``` this is located in the minecraft name space:
then in the function name space I have ```scoreboard objectives add DMS dummy```
and that isn't added upon world load
And that scoreboard command is in a function located at data/safehaven_builds/function/install?
yes
function safehaven_builds:install
Question, do the tag files need to be in the function name space?
like instead of minecraft ?
No, they have to be in Minecraft
Ok
Is that the only datapack you have in the world?
Disable all other datapacks, because one bad load function can corrupt the lot
now its loaded
actually let me back up
show you mu datapacks before that
this is the first of the list, a little datapack called nasty traps: ```{
"values": [
"dungeon_traps:install"
]
}
It's meant to do ```tellraw @s ["",{"text":"Prisms ","bold":true,"color":"aqua"},{"text":"Nasty Traps ","color":"green"},{"text":"has been installed for MC Version 1.20.4.","color":"blue"},"\n",{"text":"For latest version click here: ","color":"light_purple"},{"text":"Prisms MC Channel","underlined":true,"color":"dark_blue","clickEvent":{"action":"open_url","value":"https://www.youtube.com/channel/UCHg2ttKLFKRSmqPLdCCEoAQ"}}]
playsound minecraft:entity.creeper.primed master @s ~ ~ ~ 1 0.5
but wont
even when I reload with just the dungeon core and traps enabled
Question @loud shuttle could I just send my entire datapacks library from this world here?
then you can read each file 1 by 1 and see my system and tell me oh it's this pack
because otherwise this will take a few hours, or I can just dm them
I don't have time to do that, sorry
I suggest you go through one by one, and figure out which is causing the issue
Just put something like say Loaded in each load function, and see which loads
But only enable one at a time
To add a little context to gears' request, if there is a syntax error in any load function, it actually prevents all other load functions from running, because of the way tags work. So none of your load functions are running, but the problem may only be in one of them. If you only enable one data pack at a time to test it, then you'll be able to identify which one(s) doesn't run on its own
That's the function tag
playsound minecraft:entity.creeper.primed master @s ~ ~ ~ 1 0.5
say loaded_traps```
And to confirm, try running that function in chat in-game
(while that's the only data pack enabled, of course)
You are able to run it in chat?
yes
That sounds like you have some sort of path issue then
?
The file path of one of the files is wrong
This function is not named what the load tag is looking for
Or the load tag is in the wrong place
Okay now it works
Oh true
That's because this is the load function, there is no @s
Yep
@s means "the thing executing this command", which for the load function, is the server
Very likely. But you'll probably want to go through this process for the rest of the packs anyway to be safe
Now enable each pack 1 by 1 yes?
Yep
ye
hey while I do that, kanokaroo
can you please see why the heck ninja stars wont even work
🦘
if I send that one file as a .zip (file of folders with functions of corse)
No, that's not what we're here for, as Gears already explained
I just want to be done with it ugh. fine
I'm happy to help you troubleshoot it
(though let's make sure it wasn't because of the load functions issue first)
ye
ok next pack the base
works\
blocks works!
Oh I found a culprait
the entire creatures pack is not working
Ok, let's dig into that then
works for the core structures pack
alright all working load wise
Now Ninja Stars still don't work and I have there functions setup properly
first fixing some big red datapack errors
Okay I am ready to do Ninja Star rewrites @void sorrel @loud shuttle '
Ok, so what is the expected behavior vs what is currently happening?
What is meant to happen is you right click, it summons an armor stand, that armor stand either kills itself and drops a item if it can't find a hostile mob within a block radius of sixteen, or it teleports towards an entity and kills the mob. It's doing neither.
It spawns in, makes sound and particle, kills itself without a trace.
my tick function for throwable items has this
execute as @e[type=snowball,nbt={Item:{id:"minecraft:snowball",Count:1b,tag:{CustomModelData:2}}}] at @s run function sh2_items:throwables/ninja_star/tick
execute as @e[tag=ninjaStar] at @s run function sh2_items:throwables/ninja_star/star_tick
Obviously I've checked the functions work in game, but like it won't do anything
its almost as if it's being killed off too quickly?
here's the star tick function which is what the entity does when existing:
#Author: Prism_Skywalker
#Date: August 22nd 2024
#Description: Summons Ninja Star throwing entity.
######################################################
tp @s ^ ^ ^.5 facing entity @e[type=!#sh2_creatures:cant_spawn,distance=..16,limit=1,sort=nearest]
particle minecraft:crit ~ ~-1 ~ 0 0 0 0.1 100
scoreboard players add @s starLife 1
execute at @s[scores={starLife=150}] at @s run function sh2_items:throwables/ninja_star/kill_off
execute at @s unless entity @e[type=!#sh2_creatures:cant_spawn,distance=..16] run function sh2_items:throwables/ninja_star/kill_off
execute at @s if entity @e[type=!#sh2_creatures:cant_spawn,distance=..1] run function sh2_items:throwables/ninja_star/dmg_star```
the entity tag for cant spawn does exist, I've checked.
Check the logs for errors. If there's an issue in any of these function, it could be causing a chain effect
Oh I see
I checked in game and they work?
What work?
they work in the chat when using /function
Is my command order off?