Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AuraPotionEventHook
- {
- @SubscribeEvent
- public void onEntityUpdate(LivingUpdateEvent event)
- {
- if (event.getEntityLiving().isPotionActive(Main.auraPotion))
- {
- if (event.getEntity().worldObj.rand.nextInt(20) == 0)
- {
- event.getEntityLiving().addPotionEffect(new PotionEffect(Potion.getPotionById(1), 30 * 20, 1));
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment