Skip to content

This mod adds a discernment enchantment, effect, and portions that prevents a living entity (including a player) from hurting any peaceful living entities (also including players) while sneaking.

License

Notifications You must be signed in to change notification settings

Phylogeny/Discernment

Repository files navigation

Discernment

This mod adds a discernment enchantment and mob effect that prevents a living entity (including a player) from damaging the following types of other living entities (with configs to disable any/all of them):
  1. Entities that do not have a custom name (such as given via a name tag) that matches a config-defined regular expression blacklist (default behavior matches any name that contains the word "unprotected" -- case-independent) AND:
  2. Entities that have a custom name that matches a config-defined regular expression whitelist (default behavior matches any name that contains the word "protected" -- case-independent) OR:
  3. Ownable entities that are owned by the entity with discernment OR:
  4. Peaceful non-player entities OR:
  5. Players
This protection only applies while the following conditions are met:
  1. The attacking entity either:
    1. Has the discernment mob effect
    2. Is wearing an item as armor, or holding an item in their main or offhand, that has the discernment enchantment on it
  2. The attacking entity is not sneaking

About

This mod adds a discernment enchantment, effect, and portions that prevents a living entity (including a player) from hurting any peaceful living entities (also including players) while sneaking.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages