Minecraft / Data Packs

Looter

  • 6
  • 6
  • comment2
  • playlist_add
  • share
  • more_horiz
avatar Tetrajak
Level 50 : Grandmaster Modder
63
This data pack is a utility, to be used by other data packs; it does nothing tangible on its own.

The main function of this data pack is to allow loot to be added to entities without replacing MC loot tables, thus avoiding conflict with other data packs that add loot to the same entities.

To add loot to an entity type using Looter, add the desired function to the function tag of the same name as the entity type, in the name space "looter" (e.g. to have a function run every time a bat is killed, add the function to the tag "#looter:bat"). The tagged function will run as, and at, the entity that was just killed. It is recommended that you use loot tables you create within your own namespace, and use the loot function added in 1.14 to spawn the items in. All conditions and functions of loot tables operate normally in this scenario (e.g. the player kill condition will correctly detect whether the entity was killed by the player, etc.).

Note that Looter does not differentiate between different entity sub-types (e.g. cat colours), but you can do so with the aforementioned custom loot tables, or within the tagged function itself, since it will be running as the recently deceased entity.

If you've made a data pack, and want to exclude a custom mob (that uses a regular mob as the underlying entity; e.g. an invisible zombie wearing enchanted chain mail armor to make a ghost) you've made from being affected by Looter, you can make Looter ignore it by adding the tag "looter.exclude" to your custom mob. Looter also ignores Invulnerable entities, and entities with No AI.

If you have any questions, or would like help utilising this data pack utility with your own data pack, feel free to leave a comment or message me directly, and I'll be happy to help! Some examples of the use of Looter can be found in the 1.14+ versions of my other data packs; Dreamcatcher, and nFlight Beacons.

More information about data packs and how to use them can be found on the official Minecraft Wiki.
Progress100% complete
Game VersionMinecraft 1.14
Tags

Comments : 2

star Login or register to post a comment.

Show Comments

1 - 2 of 2

I am more of a visual learner and what is described in the text doesn't entirely make sense to me is there a video I can reference?
  • Tetrajak
  • Level 50
  • Grandmaster Modder
  • April 29, 2019, 4:24 pm
There is no video, sorry.

1 - 2 of 2

Show Comments

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome