- check_circle Advancements
- check_circle Functions
- check_circle Predicates
Published Feb 10th, 2021, 2/10/21 12:19 pm
- 29,468 views, 17 today
- 9,078 downloads, 2 today
16
Description
This is a very small data pack, with its only feature being that you can now also use leads on villagers.Other implementations
I noticed that AustenFrisch made a data pack with the same features, but a few days earlier than I. To help you choose between which one to install, here is a table of differences in the implementation:Feature | My pack | Austen's pack | Consequences |
Activation | Advancement | Constant NBT and scoreboard tests | Performance-wise, NBT tests are rather expensive and especially so when they are called 80 times per player per second without anything being done. On the other hand, advancements only run commands when the corresponding event triggers, which means that my pack causes no server cost for the time that the player doesn't do anything. This uses the advancement format introduced in 1.16, causing my pack to be incompatible with earlier versions. |
Detection of the villager | Ray casting | Radius search | Ray casting only searches in the player's line of sight, while searching in a radius may select any villager that is close enough, resulting in a far less accurate search. |
Removing a lead item | Shulker box + loot table | /clear command | The /clear command removes the item from anywhere in the inventory, while my method only targets the slot that was actually used. |
TL;DR:
My pack is far more efficient and accurate, but incompatible with 1.15 or earlier.
Also, all the features implemented from 12.02.2021 onwards only exist in my version.
In case you still want to check out Austen's pack, here's the link:
https://www.planetminecraft.com/data-pack/leashable-villagers/
How to uninstall
Removing the data pack from the 'datapacks' folder of your world directly doesn't have any noticeable side-effects, however, not uninstalling it properly first can leave a few bytes of extra storage on your world as well as impact the performance of other commands you may want to act on your world.This can be avoided by running the command '/function tddh_villager_leads:uninstall' without reloading your world before removing the data pack.
Changelog
- 07.12.2021: Added 1.18 compatibility
- 15.07.2021: Added 1.17 compatibility
- 18.02.2021: Minor tweaks to comply with official conventions, including adding the uninstall function and changing the trading GUI to not close anymore when villagers have the 'global.ignore.pos' tag
- 18.02.2021: Fixed bug with multiple villagers being connected at once when in the same position
- 14.02.2021: Fixed bug with trades being regenerated under some circumstances
- 12.02.2021: Fixed bug with gamemode check being inverted
- 12.02.2021: Increased interaction range in creative to 5 blocks
- 12.02.2021: Made the trading GUI close when leashing a villager by resummoning it
- 12.02.2021: Removed activation on interactions where the the lead is intended to be disconnected instead of connected
- 11.02.2021: Made lead items not be consumed when used in creative
- 10.02.2021: Fixed issue with shulker box being attempted to be found in different dimensions, causing leads to sometimes not be consumed
- 10.02.2021: Fixed critical issue in relation to the /loot command
Compatibility | Minecraft 1.16 |
to | Minecraft 1.18 |
Tags |
tools/tracking
4951851
119
villager-leads
Create an account or sign in to comment.
Possible reasons for why it does not work on your end are:
- You are playing on a version that is earlier than 1.16
- You have mods installed that break technical Minecraft features
- You have other data packs installed that break this one. While my pack does claim compatibility, this only means that it is designed in a way that it doesn't break other packs and is not broken by packs that follow the same conventions. It is virtually impossible to make a data pack resilient against every possible misbehaviour that other creators may partake in.
- You may not actually have installed the data pack. A data pack is installed when you can open it while in the '.minecraft/saves/<world>/datapacks' folder, and right after opening it, the 'data' folder and 'pack.mcmeta' files are directly visible.
It's not really possible for me to give any more specific help/instructions unless I'm given more specific information, for example which data packs you're installing alongside mine to make it stop working.