Guest User

Submission Effect

a guest
Dec 11th, 2015
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1.     public void submissiveHurt(LivingHurtEvent event)
  2.     {
  3.         if (TragicConfig.allowSubmission && event.entityLiving.isPotionActive(TragicPotion.Submission))
  4.         {
  5.             double x = (event.entityLiving.getActivePotionEffect(TragicPotion.Submission).getAmplifier() + 2) / 3;
  6.  
  7.             if (x <= 0)
  8.             {
  9.                 x = 0.1;
  10.             }
  11.             if (x > 3.0)
  12.             {
  13.                 x = 3.0;
  14.             }
  15.  
  16.             float f = (float) (event.ammount * x);
  17.             event.ammount += f;
  18.         ...
  19.         }
  20.     ...
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment