Add API method for protection amount on IArmorApiarist (#122)

This commit is contained in:
FourIsTheNumber authored and GitHub committed 2026-06-15 01:19:34 -04:00
1 parent bbb374cd5e
commit 974e44f5cd
2 files changed
+18 -13

No files matched your search

@@ -25,6 +25,19 @@ public interface IArmorApiarist {
*/
boolean protectEntity(EntityLivingBase entity, ItemStack armor, String cause, boolean doProtect);
/**
* Called to determine how many pieces an armor "counts for". For instance, if this returns 4, the single piece will
* act as full protection.
*
* @param entity Entity being attacked
* @param armor Armor item
* @param cause Optional cause of attack, such as a bee effect identifier
* @return Amount of effective protected slots
*/
default int getProtectionCount(EntityLivingBase entity, ItemStack armor, String cause) {
return 1;
}
/**
* Called when the apiarist's armor acts as protection against an attack.
*