mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 12:59:44 +00:00
Add API method for protection amount on IArmorApiarist (#122)
This commit is contained in:
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.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user