#spawning datapack items

1 messages · Page 1 of 1 (latest)

faint sand
#

I may just be stupid but Ive been trying to figure out how to spawn items from a datapack and cant find any answers

astral cliff
#

It should work, like in any other case, just note the context the function is run in.

Unless specified (using execute as), the command will run from the server, so @s pretty much won't work at all and,
Unless specified (using execute at/positioned), the commands run at worldspawn, so when summoning an item at ~ ~ ~ you probably won't find it around you.

cobalt comet
faint sand
#

Is that /give but for data pack items?

astral cliff
#

summon makes the item appear in the world like someone dropped it

#

give gives it directly into the players inventory

faint sand
#

Ik but when I do those I can’t spawn items from a data pack

astral cliff
#

what is the command you use? and how is that function (the datapack file) executed?

faint sand
#

I use /give @s But items from the installed data pack don’t autofill

astral cliff
#

try using @p and see if that works

#

if it does i can explain to you why and we may be able to find a better permanent solution

cobalt comet
#

Depending on the specific datapack you installed, there may be a function for it

#

What datapack are you using?

faint sand
#

The nyctocosm

cobalt comet
#

/function items:scythe/give and /function items:wyrmsliver/give

astral cliff
#

some spells (or spell items?) are also items, you can get those using
/function spells:<SPELL NAME>/give
Where <SPELL NAME> is the name of the spell, like ring or bottle

faint sand
#

It works

#

Thanks

cobalt comet
#

honestly this datapack is very confusing and there's no specific way to get items without knowing what the functions are already :P