Advertisement
Guest User

Untitled

a guest
Jun 28th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. @Override
  2. public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
  3. if (stack.getItem() == SlurpiesDonglesItems.topaz_helmet) {
  4. this.effectPlayer(player, Potion.getPotionById(16), 0);
  5.  
  6. }
  7. if (stack.getItem() == SlurpiesDonglesItems.topaz_leggings) {
  8. this.effectPlayer(player, Potion.getPotionById(1), 0);
  9.  
  10. }
  11. if (stack.getItem() == SlurpiesDonglesItems.topaz_chestplate) {
  12. this.effectPlayer(player, Potion.getPotionById(12), 0);
  13. }
  14.  
  15. @Override
  16. public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
  17. list.add("Wearing full set gives you flight!");
  18. }
  19.  
  20.  
  21. public void effectPlayer(EntityPlayer player, Potion potion, int amplifier) {
  22.  
  23. if (player.getActivePotionEffect(potion) == null || player.getActivePotionEffect(potion).getDuration() <= 1000) {
  24. player.addPotionEffect(new PotionEffect(potion, 1000, amplifier, true, true));
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement