oneofthem999

AuraPotionEventHook

Jun 11th, 2016
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class AuraPotionEventHook
  2. {
  3. @SubscribeEvent
  4. public void onEntityUpdate(LivingUpdateEvent event)
  5. {
  6. if (event.getEntityLiving().isPotionActive(Main.auraPotion))
  7. {
  8. if (event.getEntity().worldObj.rand.nextInt(20) == 0)
  9. {
  10. event.getEntityLiving().addPotionEffect(new PotionEffect(Potion.getPotionById(1), 30 * 20, 1));
  11. }
  12. }
  13. }
  14. }
Add Comment
Please, Sign In to add comment