Minecraft / Data Packs

Custom Loot [Datapack|1.14.x]

  • 2
  • 1
  • comment
  • playlist_add
  • share
  • more_horiz
avatar unnamedDE
Level 10 : Journeyman Robot
0
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> (Don't exists for the wither and enderdragon)

These functions are executed on the specific entity while it is living (so you can test for tags/NBT)

/data/custom_loot/tags/functions/killer/<ENTITY ID> (Exists for the wither and enderdragon)

These functions are executed as the player who killed the specific 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 a entity is killed.



Example




Changelog:V1.1:
  • added missing tag



Known Bugs:
  • If you kill a 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.

Supported entity types:
  • bat
  • blaze
  • cat
  • cave_spider
  • chicken
  • cod
  • cow
  • creeper
  • dolphin
  • donkey
  • drowned
  • elder_guardian
  • enderman
  • endermite
  • evoker
  • fox
  • ghast
  • giant
  • guardian
  • horse
  • husk
  • illusioner
  • iron_golem
  • llama
  • magma_cube
  • mooshroom
  • mule
  • ocelot
  • panda
  • parrot
  • phantom
  • pig
  • pillager
  • polar_bear
  • pufferfish
  • rabbit
  • ravager
  • salmon
  • shulker
  • silverfish
  • skeleton
  • skeleton_horse
  • slime
  • snow_golem
  • spider
  • squid
  • stray
  • trader_llama
  • tropical_fish
  • turtle
  • vex
  • villager
  • vindicator
  • wandering_trader
  • witch
  • wither_skeleton
  • wolf
  • zombie
  • zombie_horse
  • zombie_pigman
  • zombie_villager
Progress95% complete
Game VersionMinecraft 1.14
Tags

0 replies

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome