Minecraft Data Packs / Other

Custom Loot [Datapack|1.14.x]

  • check_circle Functions
  • 31,649 views, 2 today
  • 4,001 downloads, 0 today
  • 13
  • 9
  • 10
unnamedDE's Avatar unnamedDE
Level 49 : Master Technomancer
27
This datapack adds the ability to add loot to entities without replacing the default loot or replacing loot from other datapacks.


There are two function tags for every living entity:
/data/custom_loot/tags/functions/killed/<ENTITY ID>
/data/custom_loot/tags/functions/killed


These functions are executed as/at the entity with the given ID on death while it is living (so you can test for tags/NBT)
If no ID is given, the function gets executed as/at every living entity on death

/data/custom_loot/tags/functions/killer/<ENTITY ID>
/data/custom_loot/tags/functions/killer


These functions are executed as/at the player who killed the entity with the given ID
If no ID is given, the function gets executed as/at the player who killed a living entity
(The entity killed can be checked with @e[​tag=cl_dead,limit=1,sort=nearest,distance=..128] )

In these functions, you can add commands you want to get executed when an entity is killed.



more detailed examples can be found on the wiki


Changelog:
V1.3:
  • fixed horses
  • separated wolves/dogs (dog is broken because of a bug in Minecraft but when the bug gets fixed will work automatically)
  • Tested in 1.14.4
V1.2:
  • added function tag that gets executed as/at every living entity upon death
  • added function tag that gets executed as/at every player who killed a living entity
V1.1:
  • added missing tag



Known Bugs:
  • If you kill an entity with a weapon that deals more than 1023 damage, the custom loot system won't work (This can't be fixed)


If you've found any other bugs or have ideas, contact me via discord.

You can find all supported entity types here
CreditCreated with MCscript by Stevertus
CompatibilityMinecraft 1.14
toMinecraft 1.15
Tags

Create an account or sign in to comment.

1
11/23/2019 9:14 pm
Level 42 : Master Explorer
Chesterhung3218
Chesterhung3218's Avatar
May I use it to create this template to make my own loot datapack then upload it to planet minecraft?
1
11/28/2019 11:22 am
Level 49 : Master Technomancer
unnamedDE
unnamedDE's Avatar
The original idea was to install Custom Loot separately to the content packs that want loot, but if you want to, feel free to do it and please credit me.

When you publish your pack, please send me a PM. I'd really like to see what you came up with ;)
2
10/15/2019 10:21 pm
Level 1 : New Miner
TyTheGuy105
TyTheGuy105's Avatar
This does not seem to be working for 1.14.4 is that valid info or am I doing something wrong? I've verified my code through a JSON code verification tool and it still isn't working. I notice a lot of the mcfunction coding says it was generated by minecraft script for 1.13 does this script still work or does it need fixed?
1
10/22/2019 12:55 pm
Level 49 : Master Technomancer
unnamedDE
unnamedDE's Avatar
Just uploaded a new version which is tested in 1.14.4.

Try your code in this version and if this doesn't work you can join my discord and send me your code.
2
07/08/2019 7:38 am
Level 1 : New Explorer
JaimieeBoo
JaimieeBoo's Avatar
The example sadly makes no sense and is greatly lacking detail.
The instructions almost made sense but stopped short of being helpful and turned into a turn table of descriptions and instructions where it just goes back and forth but doesn't go long enough for either to be useful other than that they get the point across that the datapack is totally AWESOME.

for example: instructions should explain how to do stuff and then have an example of doing it, like in tutorial videos. Lots of descriptions of what the data pack does is cool but if the description and instructions are all mixed up its like a cheese cake with pumpkin on top, u cant eat the cake cause it has bits of pumpkin in it and tastes weird and u cant eat the pumpkin cause it squashed the cake and that makes it a traitor. maybe that metaphor makes less sense than the instructions but I reckon point is made.
and the example shown doesn't have the same stuff in it as in the .json files in the zip it cant make sense if it's only part of the table, like a coffee table with no legs to hold it up or wooden legs without a coffee table on top either wouldn't work to hold a cup of coffee, the loot table is bout the same I think in that if only part of it is shown as an example it can't be used or useful since its like half a coffee table.

I would really love to use this data pack but without clear instruction nothing makes sense and what little that does make sense makes me more confused.

Hopefully me pointing out what is confusing about the instructions and examples might help you to make it more clear to understand, not just for me but also for other people.

Thanks for all your hard work and awesomeness I greatly appreciate all the stuff ya'll geniuses come up with :D
1
07/13/2019 12:23 pm
Level 49 : Master Technomancer
unnamedDE
unnamedDE's Avatar
You can find the wiki here
1
07/12/2019 7:59 am
Level 49 : Master Technomancer
unnamedDE
unnamedDE's Avatar
I'm working currently on a wiki page
1
06/28/2019 5:35 pm
Level 1 : New Crafter
Ezero2
Ezero2's Avatar
Can you give a detailed tutorial for amateurs to know how to start editing this please?
1
07/01/2019 12:45 pm
Level 49 : Master Technomancer
unnamedDE
unnamedDE's Avatar
Look at the example (click on it to expand)
1
06/26/2019 9:32 am
Level 49 : Master Technomancer
unnamedDE
unnamedDE's Avatar
If you've found any other bugs or have ideas, contact me via discord or DM me.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome