#i jus started im wanting to learn how to create datapacks
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:1740801129: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
execute as @e[type=arrow, nbt={inGround:1b}] at @s run summon tnt
kill @e[type=arrow,nbt={inGround:1b}]
i want to make this also when the arrow hits an entity
can anyone teach me how
What are you trying to do, exactly?
make it so when you shoot an arrow at an entity it will blow up like using tnt
this makes it so when i shoot the ground it blows up
It'd probably be better to make this as an enchantment because checking for hitting an entity and creating an explosion is far easier
If you want to apply this to all arrows, you can use a function to apply the enchantment to all arrow entities
how can i make custom enchant?
question
are you learning how to make datapacks just to make this or do you want to make more datapacks in the future?
just want this -> ask someone to make it for you, shouldn't be too complicated
want to make more -> learn the foundations of datapacks first, datapack hub has a wiki here
Welcome to the Datapack Wiki, a resource for everything related to Minecraft Datapacks. We've got guides, tutorials, and documentation to help you build your knowledge about data packs.
could i use minecraft:post_attack so after entity is attacked it summons the tnt
i want to learn to make datapakcs in the future
that should work
Dont just run a function and summon tnt, theres an explode effect in the enchantment specificly for that
And one more thing: add a predicate (in that enchantment, as a requirement) that checks if damage is not direct to activate the effect
Else, you could just attack entities with your bow like a sword and they will still explode
This question has been inactive for some time, so it's going to be closed for inactivity. If you still need it, please disregard this message.