Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onWornTick(ItemStack itemstack, EntityLivingBase player)
- {
- if(player.isPotionActive(MobEffects.POISON) || player.isPotionActive(MobEffects.WITHER))
- {
- player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 1, 20 * 15, true, true));
- player.removePotionEffect(MobEffects.POISON);
- player.removePotionEffect(MobEffects.WITHER);
- }
- if(player.isPotionActive(MobEffects.BLINDNESS))
- {
- player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 1, 20 * 15, true, true));
- player.removePotionEffect(MobEffects.BLINDNESS);
- }
- if(player.isPotionActive(MobEffects.HUNGER))
- {
- player.addPotionEffect(new PotionEffect(MobEffects.SATURATION, 1, 20 * 15, true, true));
- player.removePotionEffect(MobEffects.HUNGER);
- }
- if(player.isPotionActive(MobEffects.MINING_FATIGUE))
- {
- player.addPotionEffect(new PotionEffect(MobEffects.HASTE, 1, 20 * 15, true, true));
- player.removePotionEffect(MobEffects.MINING_FATIGUE);
- }
- if(player.isPotionActive(MobEffects.SLOWNESS))
- {
- player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 1, 20 * 15, true, true));
- player.removePotionEffect(MobEffects.SLOWNESS);
- }
- if(player.isPotionActive(MobEffects.UNLUCK))
- {
- player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 1, 20 * 15, true, true));
- player.removePotionEffect(MobEffects.UNLUCK);
- }
- if(player.isPotionActive(MobEffects.WEAKNESS))
- {
- player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 1, 20 * 15, true, true));
- player.removePotionEffect(MobEffects.WEAKNESS);
- }
- if(player.isPotionActive(MobEffects.NAUSEA))
- {
- player.removePotionEffect(MobEffects.NAUSEA);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment