Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack stack) {
- if (stack.getItem() == SlurpiesDonglesItems.topaz_helmet) {
- this.effectPlayer(player, Potion.getPotionById(16), 0);
- }
- if (stack.getItem() == SlurpiesDonglesItems.topaz_leggings) {
- this.effectPlayer(player, Potion.getPotionById(1), 0);
- }
- if (stack.getItem() == SlurpiesDonglesItems.topaz_chestplate) {
- this.effectPlayer(player, Potion.getPotionById(12), 0);
- }
- @Override
- public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
- list.add("Wearing full set gives you flight!");
- }
- public void effectPlayer(EntityPlayer player, Potion potion, int amplifier) {
- if (player.getActivePotionEffect(potion) == null || player.getActivePotionEffect(potion).getDuration() <= 1000) {
- player.addPotionEffect(new PotionEffect(potion, 1000, amplifier, true, true));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement