Guest User

Untitled

a guest
Sep 1st, 2016
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. package top.mod.armor;
  2.  
  3. import net.minecraft.entity.EntityLivingBase;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraft.init.MobEffects;
  6. import net.minecraft.inventory.EntityEquipmentSlot;
  7. import net.minecraft.item.ItemArmor;
  8. import net.minecraft.item.ItemStack;
  9. import net.minecraft.potion.PotionEffect;
  10. import net.minecraft.world.World;
  11.  
  12. public class SuperArmor extends ItemArmor
  13.  
  14. {
  15. public SuperArmor(ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) {
  16. super(materialIn, renderIndexIn, equipmentSlotIn);
  17. this.setMaxStackSize(1);
  18. }
  19.  
  20. public void onArmorTick(World world, EntityPlayer entity, ItemStack itemStack) {
  21. int i = (int) entity.posX;
  22. int j = (int) entity.posY;
  23. int k = (int) entity.posZ;
  24.  
  25. if (true) {
  26. if (entity instanceof EntityLivingBase)
  27. ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 200, 2));
  28. }
  29.  
  30. if (true) {
  31. if (entity instanceof EntityLivingBase)
  32. ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 200, 2));
  33. }
  34.  
  35. if (true) {
  36. if (entity instanceof EntityLivingBase)
  37. ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 200, 2));
  38. }
  39.  
  40. if (true) {
  41. if (entity instanceof EntityLivingBase)
  42. ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 200, 2));
  43. }
  44.  
  45. if (true) {
  46. if (entity instanceof EntityLivingBase)
  47. ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.JUMP_BOOST, 200, 2));
  48. }
  49.  
  50. if (true) {
  51. if (entity instanceof EntityLivingBase)
  52. ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.SATURATION, 2, 200));
  53. }
  54.  
  55. if (true) {
  56. if (entity instanceof EntityLivingBase)
  57. ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.SPEED, 200, 2));
  58. }
  59.  
  60. if (true) {
  61. if (entity instanceof EntityLivingBase)
  62. ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 200, 2));
  63. }
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment