Jump to content

[1.12.2] Add effects if full armor is equipped[SOLVED]


supreme marshal

Recommended Posts

So I have no idea why this is not working when it should. I just want to add Resistance III when full dragon armor is equipped.

 

package com.SupremeMarshal.MoreToolsTierMod.objects.armor;

import com.SupremeMarshal.MoreToolsTierMod.Main;
import com.SupremeMarshal.MoreToolsTierMod.init.ModItems;
import com.SupremeMarshal.MoreToolsTierMod.util.interfaces.IHasModel;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;


public class DragonArmorBase extends ItemArmor implements IHasModel
{

	public DragonArmorBase(String name, ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) {
		super(materialIn, renderIndexIn, equipmentSlotIn);
		setUnlocalizedName(name);
		setRegistryName(name);
		setCreativeTab(CreativeTabs.COMBAT);
		

		
		ModItems.ITEMS.add(this);
	}
	@Override
	public void registerModels() 
	{
		Main.proxy.registerItemRenderer(this, 0, "inventory");
	}
	///add potion effect to full set of armor
	@Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack item)
	{
		if(player.inventory.armorItemInSlot(0) != null &&
			player.inventory.armorItemInSlot(1) != null && 
			player.inventory.armorItemInSlot(2) != null &&
			player.inventory.armorItemInSlot(3) != null)
		{
			if(player.inventory.armorItemInSlot(0).getItem() == ModItems.DRAGON_BODY &&
				player.inventory.armorItemInSlot(1).getItem() == ModItems.DRAGON_LEGS && 
				player.inventory.armorItemInSlot(2).getItem() == ModItems.DRAGON_BOOTS &&
				player.inventory.armorItemInSlot(3).getItem() == ModItems.DRAGON_HELM)
			{
				player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 2, 0));
			}
		}
	}
	

}

 

I had also a problem about giving health and regeneration when full armor set is equipped but now it's all solved.

 

Here is my final codes:

package com.SupremeMarshal.MoreToolsTierMod.objects.armor;

import java.util.UUID;

import com.SupremeMarshal.MoreToolsTierMod.Main;
import com.SupremeMarshal.MoreToolsTierMod.init.ItemInit;
import com.SupremeMarshal.MoreToolsTierMod.util.interfaces.IHasModel;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.BaseAttribute;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.potion.PotionType;
import net.minecraft.world.World;


public class DragonArmorBase extends ItemArmor implements IHasModel
{

	public DragonArmorBase(String name, ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) {
		super(materialIn, renderIndexIn, equipmentSlotIn);
		setUnlocalizedName(name);
		setRegistryName(name);
		setCreativeTab(CreativeTabs.COMBAT);
		

		
		ItemInit.ITEMS.add(this);
	}
	@Override
	public void registerModels() 
	{
		Main.proxy.registerItemRenderer(this, 0, "inventory");
	}
	
//////UUID//////
	//DRAGON ARMOR//
		//HEALTH// -- Total = 40 Health
	protected static final UUID MAX_HEALTH_DFULL_UUID = UUID.fromString("fdd721e0-bcb0-4963-9c03-ace14c6ceae4");
	private static final AttributeModifier HEALTH_BOOST_DFULL = new AttributeModifier (MAX_HEALTH_DFULL_UUID, "MAX_HEALTH_DFULL_UUID", 10, 0); 
	
	protected static final UUID MAX_HEALTH_DHELM_UUID = UUID.fromString("cfb80931-3fc9-4e5a-9760-213aee2dce98");
	private static final AttributeModifier HEALTH_BOOST_DHELM = new AttributeModifier (MAX_HEALTH_DHELM_UUID, "MAX_HEALTH_DHELM_UUID", 5, 0);
	
	protected static final UUID MAX_HEALTH_DBODY_UUID = UUID.fromString("122785ee-9867-4ace-af8b-745932039e73");
	private static final AttributeModifier HEALTH_BOOST_DBODY = new AttributeModifier (MAX_HEALTH_DBODY_UUID, "MAX_HEALTH_DBODY_UUID", 10, 0);
	
	protected static final UUID MAX_HEALTH_DLEGS_UUID = UUID.fromString("a5c77a84-5a15-4752-9f07-599a3a2e4c9f");
	private static final AttributeModifier HEALTH_BOOST_DLEGS = new AttributeModifier (MAX_HEALTH_DLEGS_UUID, "MAX_HEALTH_DLEGS_UUID", 10, 0);
	
	protected static final UUID MAX_HEALTH_DBOOTS_UUID = UUID.fromString("f3fb329d-4923-4aa1-bef8-d0728f4b7abd");
	private static final AttributeModifier HEALTH_BOOST_DBOOTS = new AttributeModifier (MAX_HEALTH_DBOOTS_UUID, "MAX_HEALTH_DBOOTS_UUID", 5, 0);
	
		//KNOCKBACK RESISTANCE -- Total = 80%
	protected static final UUID KNOCKBACK_RESISTANCE_DFULL_UUID = UUID.fromString("a5f4ce17-c5b7-4791-979c-b55018c2e89c");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DFULL = new AttributeModifier (KNOCKBACK_RESISTANCE_DFULL_UUID, "KNOCKBACK_RESISTANCE_DFULL_UUID", 20, 0); 
	
	protected static final UUID KNOCKBACK_RESISTANCE_DHELM_UUID = UUID.fromString("5619ab81-25e6-43e1-85e8-0a11be2b0bcd");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DHELM = new AttributeModifier (KNOCKBACK_RESISTANCE_DHELM_UUID, "KNOCKBACK_RESISTANCE_DHELM_UUID", 10, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_DBODY_UUID = UUID.fromString("ecec32f1-c5b5-4921-98ba-e1717a3befa4");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DBODY = new AttributeModifier (KNOCKBACK_RESISTANCE_DBODY_UUID, "KNOCKBACK_RESISTANCE_DBODY_UUID", 20, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_DLEGS_UUID = UUID.fromString("1726437a-2fba-42b9-a3f7-56a777740037");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DLEGS = new AttributeModifier (KNOCKBACK_RESISTANCE_DLEGS_UUID, "KNOCKBACK_RESISTANCE_DLEGS_UUID", 20, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_DBOOTS_UUID = UUID.fromString("7ffe2d12-c540-407b-8df6-101450ab8a5b");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DBOOTS = new AttributeModifier (KNOCKBACK_RESISTANCE_DBOOTS_UUID, "KNOCKBACK_RESISTANCE_DBOOTS_UUID", 10, 0);
	
	//RUNE ARMOR//
		//HEALTH// == Total = 30 Health
	protected static final UUID MAX_HEALTH_RFULL_UUID = UUID.fromString("a0e262b5-076c-44c8-bb79-f78a6d534f91");
	private static final AttributeModifier HEALTH_BOOST_RFULL = new AttributeModifier (MAX_HEALTH_RFULL_UUID, "MAX_HEALTH_RFULL_UUID", 7, 0); 
	
	protected static final UUID MAX_HEALTH_RHELM_UUID = UUID.fromString("0a1676a7-3214-4f76-8c4e-7534c8f13941");
	private static final AttributeModifier HEALTH_BOOST_RHELM = new AttributeModifier (MAX_HEALTH_RHELM_UUID, "MAX_HEALTH_RHELM_UUID", 4, 0);
	
	protected static final UUID MAX_HEALTH_RBODY_UUID = UUID.fromString("55d9df5c-62e7-4723-906f-fb1a71082ffa");
	private static final AttributeModifier HEALTH_BOOST_RBODY = new AttributeModifier (MAX_HEALTH_RBODY_UUID, "MAX_HEALTH_RBODY_UUID", 8, 0);
	
	protected static final UUID MAX_HEALTH_RLEGS_UUID = UUID.fromString("fac0ccb6-401a-4a81-b32d-697e63c60635");
	private static final AttributeModifier HEALTH_BOOST_RLEGS = new AttributeModifier (MAX_HEALTH_RLEGS_UUID, "MAX_HEALTH_RLEGS_UUID", 7, 0);
	
	protected static final UUID MAX_HEALTH_RBOOTS_UUID = UUID.fromString("6a92e0f4-900f-45c8-811c-2f9331a988ae");
	private static final AttributeModifier HEALTH_BOOST_RBOOTS = new AttributeModifier (MAX_HEALTH_RBOOTS_UUID, "MAX_HEALTH_RBOOTS_UUID", 4, 0);
	
		//KNOCKBACK RESISTANCE -- Total = 60%
	protected static final UUID KNOCKBACK_RESISTANCE_RFULL_UUID = UUID.fromString("f8c6fea8-0722-4995-ab3a-dac616080b0b");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_RFULL = new AttributeModifier (KNOCKBACK_RESISTANCE_RFULL_UUID, "KNOCKBACK_RESISTANCE_RFULL_UUID", 15, 0); 
	
	protected static final UUID KNOCKBACK_RESISTANCE_RHELM_UUID = UUID.fromString("f8215f0e-c22a-4c66-af66-94d50b8ed73c");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_RHELM = new AttributeModifier (KNOCKBACK_RESISTANCE_RHELM_UUID, "KNOCKBACK_RESISTANCE_RHELM_UUID", 8, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_RBODY_UUID = UUID.fromString("743d9294-493d-4741-85b0-b469cbd7f5fa");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_RBODY = new AttributeModifier (KNOCKBACK_RESISTANCE_RBODY_UUID, "KNOCKBACK_RESISTANCE_RBODY_UUID", 15, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_RLEGS_UUID = UUID.fromString("448ac581-0bf5-41ac-99ff-152a173cb66c");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_RLEGS = new AttributeModifier (KNOCKBACK_RESISTANCE_RLEGS_UUID, "KNOCKBACK_RESISTANCE_RLEGS_UUID", 14, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_RBOOTS_UUID = UUID.fromString("d084a93a-1d56-4460-92e4-2982ecc0070a");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_RBOOTS = new AttributeModifier (KNOCKBACK_RESISTANCE_RBOOTS_UUID, "KNOCKBACK_RESISTANCE_RBOOTS_UUID", 8, 0);
	
	//ADAMANT ARMOR//
		//HEALTH// == Total = 20 Health
	protected static final UUID MAX_HEALTH_AFULL_UUID = UUID.fromString("d06e64c4-2828-4fde-bef2-7165b566fbe5");
	private static final AttributeModifier HEALTH_BOOST_AFULL = new AttributeModifier (MAX_HEALTH_AFULL_UUID, "MAX_HEALTH_AFULL_UUID", 5, 0); 
	
	protected static final UUID MAX_HEALTH_AHELM_UUID = UUID.fromString("911368e8-e5bd-46ff-a3d3-13685d1493da");
	private static final AttributeModifier HEALTH_BOOST_AHELM = new AttributeModifier (MAX_HEALTH_AHELM_UUID, "MAX_HEALTH_AHELM_UUID", 3, 0);
	
	protected static final UUID MAX_HEALTH_ABODY_UUID = UUID.fromString("8addf34c-882f-4c94-88aa-04e5c78ff2f3");
	private static final AttributeModifier HEALTH_BOOST_ABODY = new AttributeModifier (MAX_HEALTH_ABODY_UUID, "MAX_HEALTH_ABODY_UUID", 5, 0);
	
	protected static final UUID MAX_HEALTH_ALEGS_UUID = UUID.fromString("0a16b40e-aa4a-4be3-abb9-3ea38d7c8c35");
	private static final AttributeModifier HEALTH_BOOST_ALEGS = new AttributeModifier (MAX_HEALTH_ALEGS_UUID, "MAX_HEALTH_ALEGS_UUID", 4, 0);
	
	protected static final UUID MAX_HEALTH_ABOOTS_UUID = UUID.fromString("c3a3b300-d7ad-4bc4-87b6-8cd788975261");
	private static final AttributeModifier HEALTH_BOOST_ABOOTS = new AttributeModifier (MAX_HEALTH_ABOOTS_UUID, "MAX_HEALTH_ABOOTS_UUID", 3, 0);
		
		//KNOCKBACK RESISTANCE -- Total = 40%
	protected static final UUID KNOCKBACK_RESISTANCE_AFULL_UUID = UUID.fromString("772d851e-71cf-4021-9f99-17ae650a230f");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_AFULL = new AttributeModifier (KNOCKBACK_RESISTANCE_AFULL_UUID, "KNOCKBACK_RESISTANCE_AFULL_UUID", 9, 0); 
	
	protected static final UUID KNOCKBACK_RESISTANCE_AHELM_UUID = UUID.fromString("6ffbd625-2a36-49b8-b752-b3c267f63577");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_AHELM = new AttributeModifier (KNOCKBACK_RESISTANCE_AHELM_UUID, "KNOCKBACK_RESISTANCE_AHELM_UUID", 6, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_ABODY_UUID = UUID.fromString("08a7a3d4-456b-482b-ae5c-e832d8749eb0");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_ABODY = new AttributeModifier (KNOCKBACK_RESISTANCE_ABODY_UUID, "KNOCKBACK_RESISTANCE_ABODY_UUID", 10, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_ALEGS_UUID = UUID.fromString("d10b9e4b-0712-4d07-9000-89896b9c8b9d");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_ALEGS = new AttributeModifier (KNOCKBACK_RESISTANCE_ALEGS_UUID, "KNOCKBACK_RESISTANCE_ALEGS_UUID", 9, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_ABOOTS_UUID = UUID.fromString("385650fc-a5c6-4223-8338-ef04ebbfcdd0");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_ABOOTS = new AttributeModifier (KNOCKBACK_RESISTANCE_ABOOTS_UUID, "KNOCKBACK_RESISTANCE_ABOOTS_UUID", 6, 0);
	
	//MITHRIL ARMOR//
		//HEALTH// == Total = 10 Health
	protected static final UUID MAX_HEALTH_MFULL_UUID = UUID.fromString("c089b172-9445-4a3f-b1a9-72ead6d595bb");
	private static final AttributeModifier HEALTH_BOOST_MFULL = new AttributeModifier (MAX_HEALTH_MFULL_UUID, "MAX_HEALTH_MFULL_UUID", 3, 0); 
	
	protected static final UUID MAX_HEALTH_MHELM_UUID = UUID.fromString("fede80f4-36f0-4d6b-aa9b-f19a14562e1f");
	private static final AttributeModifier HEALTH_BOOST_MHELM = new AttributeModifier (MAX_HEALTH_MHELM_UUID, "MAX_HEALTH_MHELM_UUID", 1, 0);
	
	protected static final UUID MAX_HEALTH_MBODY_UUID = UUID.fromString("6e0a9314-c2ea-43af-a186-275001c96c6c");
	private static final AttributeModifier HEALTH_BOOST_MBODY = new AttributeModifier (MAX_HEALTH_MBODY_UUID, "MAX_HEALTH_MBODY_UUID", 3, 0);
	
	protected static final UUID MAX_HEALTH_MLEGS_UUID = UUID.fromString("e65314f2-5b22-4906-8f6e-78e537e63fa6");
	private static final AttributeModifier HEALTH_BOOST_MLEGS = new AttributeModifier (MAX_HEALTH_MLEGS_UUID, "MAX_HEALTH_MLEGS_UUID", 2, 0);
	
	protected static final UUID MAX_HEALTH_MBOOTS_UUID = UUID.fromString("c74f0334-f073-41f2-bfbe-381a8e778278");
	private static final AttributeModifier HEALTH_BOOST_MBOOTS = new AttributeModifier (MAX_HEALTH_MBOOTS_UUID, "MAX_HEALTH_MBOOTS_UUID", 1, 0);
		//KNOCKBACK RESISTANCE -- Total = 20%
	protected static final UUID KNOCKBACK_RESISTANCE_MFULL_UUID = UUID.fromString("8a374b9a-cd6b-4945-8e1b-1e7654ea3205");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_MFULL = new AttributeModifier (KNOCKBACK_RESISTANCE_MFULL_UUID, "KNOCKBACK_RESISTANCE_MFULL_UUID", 5, 0); 
	
	protected static final UUID KNOCKBACK_RESISTANCE_MHELM_UUID = UUID.fromString("551c19fb-99ed-4bfd-88dc-b627f83fe3fa");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_MHELM = new AttributeModifier (KNOCKBACK_RESISTANCE_MHELM_UUID, "KNOCKBACK_RESISTANCE_MHELM_UUID", 3, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_MBODY_UUID = UUID.fromString("8b86e5c0-94ba-44ec-9a60-637e7e8380e0");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_MBODY = new AttributeModifier (KNOCKBACK_RESISTANCE_MBODY_UUID, "KNOCKBACK_RESISTANCE_MBODY_UUID", 5, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_MLEGS_UUID = UUID.fromString("807f3922-1511-40ed-a458-f3b6c57d2718");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_MLEGS = new AttributeModifier (KNOCKBACK_RESISTANCE_MLEGS_UUID, "KNOCKBACK_RESISTANCE_MLEGS_UUID", 4, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_MBOOTS_UUID = UUID.fromString("7a19419a-9c07-4b9b-947c-e87a9a93a627");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_MBOOTS = new AttributeModifier (KNOCKBACK_RESISTANCE_MBOOTS_UUID, "KNOCKBACK_RESISTANCE_MBOOTS_UUID", 3, 0);
	
	//THIRD AGE ARMOR//
		//HEALTH// == Total = 80 Health
	protected static final UUID MAX_HEALTH_3FULL_UUID = UUID.fromString("c089b172-9445-4a3f-b1a9-72ead6d595bb");
	private static final AttributeModifier HEALTH_BOOST_3FULL = new AttributeModifier (MAX_HEALTH_3FULL_UUID, "MAX_HEALTH_3FULL_UUID", 20, 0); 
	
	protected static final UUID MAX_HEALTH_3HELM_UUID = UUID.fromString("fede80f4-36f0-4d6b-aa9b-f19a14562e1f");
	private static final AttributeModifier HEALTH_BOOST_3HELM = new AttributeModifier (MAX_HEALTH_3HELM_UUID, "MAX_HEALTH_3HELM_UUID", 10, 0);
	
	protected static final UUID MAX_HEALTH_3BODY_UUID = UUID.fromString("6e0a9314-c2ea-43af-a186-275001c96c6c");
	private static final AttributeModifier HEALTH_BOOST_3BODY = new AttributeModifier (MAX_HEALTH_3BODY_UUID, "MAX_HEALTH_3BODY_UUID", 20, 0);
	
	protected static final UUID MAX_HEALTH_3LEGS_UUID = UUID.fromString("e65314f2-5b22-4906-8f6e-78e537e63fa6");
	private static final AttributeModifier HEALTH_BOOST_3LEGS = new AttributeModifier (MAX_HEALTH_3LEGS_UUID, "MAX_HEALTH_3LEGS_UUID", 20, 0);
	
	protected static final UUID MAX_HEALTH_3BOOTS_UUID = UUID.fromString("c74f0334-f073-41f2-bfbe-381a8e778278");
	private static final AttributeModifier HEALTH_BOOST_3BOOTS = new AttributeModifier (MAX_HEALTH_3BOOTS_UUID, "MAX_HEALTH_3BOOTS_UUID", 10, 0);
				
		//KNOCKBACK RESISTANCE -- Total = 90%
	protected static final UUID KNOCKBACK_RESISTANCE_3FULL_UUID = UUID.fromString("8a374b9a-cd6b-4945-8e1b-1e7654ea3205");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_3FULL = new AttributeModifier (KNOCKBACK_RESISTANCE_3FULL_UUID, "KNOCKBACK_RESISTANCE_3FULL_UUID", 21, 0); 
	
	protected static final UUID KNOCKBACK_RESISTANCE_3HELM_UUID = UUID.fromString("551c19fb-99ed-4bfd-88dc-b627f83fe3fa");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_3HELM = new AttributeModifier (KNOCKBACK_RESISTANCE_3HELM_UUID, "KNOCKBACK_RESISTANCE_3HELM_UUID", 13, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_3BODY_UUID = UUID.fromString("8b86e5c0-94ba-44ec-9a60-637e7e8380e0");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_3BODY = new AttributeModifier (KNOCKBACK_RESISTANCE_3BODY_UUID, "KNOCKBACK_RESISTANCE_3BODY_UUID", 22, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_3LEGS_UUID = UUID.fromString("807f3922-1511-40ed-a458-f3b6c57d2718");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_3LEGS = new AttributeModifier (KNOCKBACK_RESISTANCE_3LEGS_UUID, "KNOCKBACK_RESISTANCE_3LEGS_UUID", 22, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_3BOOTS_UUID = UUID.fromString("7a19419a-9c07-4b9b-947c-e87a9a93a627");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_3BOOTS = new AttributeModifier (KNOCKBACK_RESISTANCE_3BOOTS_UUID, "KNOCKBACK_RESISTANCE_3BOOTS_UUID", 12, 0);
	
	public static String playerKey(EntityPlayer player)
	{
		return player.getGameProfile().getName() + ":" + player.world.isRemote;
	}
	
	///add effect to set of armor
	@Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack)
	{
		if(player.inventory.armorItemInSlot(0) != null &&
			player.inventory.armorItemInSlot(1) != null && 
			player.inventory.armorItemInSlot(2) != null &&
			player.inventory.armorItemInSlot(3) != null)
				{
			player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DFULL);
			player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DFULL);
			if (player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS &&
				player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS && 
				player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY &&
				player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
			{
				player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DFULL);
				player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DFULL);
				player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
				player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 1));
				player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 1));
				{
				if (player.getActivePotionEffect(MobEffects.REGENERATION) == null)
				{
					player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
				}
				if (world.getWorldTime() % 50 > 0)
				{
					return;
				}
					player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
				}
				
				
				
			}
			}
			
		
		
		//check if dragon boots is equipped
		if(player.inventory.armorItemInSlot(0) != null)
			{
			player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DBOOTS);
			player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DBOOTS);
			
				if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS)
				{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DBOOTS);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DBOOTS);
					player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
					player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 0));
				}
			}
		//check if dragon legs is equipped
				if(player.inventory.armorItemInSlot(1) != null)
					{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DLEGS);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DLEGS);
						if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS)
						{
							player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DLEGS);
							player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DLEGS);
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if dragon body is equipped
				if(player.inventory.armorItemInSlot(2) != null)
					
					{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DBODY);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DBODY);
						if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY)
						{
							player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DBODY);
							player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DBODY);
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if dragon helm is equipped
				if(player.inventory.armorItemInSlot(3) != null)
					{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DHELM);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DHELM);
						if(player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
							player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DHELM);
							player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DHELM);
						}
					}
		//check if boots and legs is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(1) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if boots and body is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(2) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if boots and helm is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if legs and body is equipped
				if(player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(2) != null)
					{
						if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS && 
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if legs and helm is equipped
				if(player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS && 
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if body and helm is equipped
				if(player.inventory.armorItemInSlot(2) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY && 
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if boots, legs and body is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(2) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS &&
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
						}
					}
		//check if legs, body and helm is equipped
				if(player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(2) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS && 
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY &&
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
						}
					}
		//check if boots, body and helm is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(2) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY &&
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
						}
					}
		//check if boots, legs and helm is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS &&
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
						}
					}
////// THIRD AGE ///////
				if(player.inventory.armorItemInSlot(0) != null &&
						player.inventory.armorItemInSlot(1) != null && 
						player.inventory.armorItemInSlot(2) != null &&
						player.inventory.armorItemInSlot(3) != null)
					{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_3FULL);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_3FULL);
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.THIRD_AGE_BOOTS &&
							player.inventory.armorItemInSlot(1).getItem() == ItemInit.THIRD_AGE_LEGS && 
							player.inventory.armorItemInSlot(2).getItem() == ItemInit.THIRD_AGE_BODY &&
							player.inventory.armorItemInSlot(3).getItem() == ItemInit.THIRD_AGE_HELM)
						{
							player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_3FULL);
							player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_3FULL);
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 3));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 3));
							player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 0, 3));
							player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 3));
							player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 0, 3));
							player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 3));
							{
								if (player.getActivePotionEffect(MobEffects.REGENERATION) == null)
								{
									player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 25 , 1));
								}
								if (world.getWorldTime() % 25 > 0)
								{
									return;
								}
									player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 25 , 1));
								}
						}
					}
					
					//check if boots is equipped
					if(player.inventory.armorItemInSlot(0) != null)
						{
						player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_3BOOTS);
						player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_3BOOTS);
							if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.THIRD_AGE_BOOTS)
							{
								player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_3BOOTS);
								player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_3BOOTS);
								player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
								player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 1));
								player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 1));
								{
									if (player.getActivePotionEffect(MobEffects.REGENERATION) == null)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
									}
									if (world.getWorldTime() % 50 > 0)
									{
										return;
									}
										player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
								}
							}
						}
					//check if legs is equipped
							if(player.inventory.armorItemInSlot(1) != null)
								{
								player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_3LEGS);
								player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_3LEGS);
									if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.THIRD_AGE_LEGS)
									{
										player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_3LEGS);
										player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_3LEGS);
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 0));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 1));
										{
											if (player.getActivePotionEffect(MobEffects.REGENERATION) == null)
											{
												player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
											}
											if (world.getWorldTime() % 50 > 0)
											{
												return;
											}
												player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
										}
									}
								}
					//check if body is equipped
							if(player.inventory.armorItemInSlot(2) != null)
								{
								player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_3BODY);
								player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_3BODY);
									if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.THIRD_AGE_BODY)
									{
										player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_3BODY);
										player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_3BODY);
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 0, 0));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 1));
										{
											if (player.getActivePotionEffect(MobEffects.REGENERATION) == null)
											{
												player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
											}
											if (world.getWorldTime() % 50 > 0)
											{
												return;
											}
												player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
										}
									}
								}
					//check if helm is equipped
							if(player.inventory.armorItemInSlot(3) != null)
								{
								player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_3HELM);
								player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_3HELM);
									if(player.inventory.armorItemInSlot(3).getItem() == ItemInit.THIRD_AGE_HELM)
									{
										player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_3HELM);
										player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_3HELM);
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 0, 1));
										{
											if (player.getActivePotionEffect(MobEffects.REGENERATION) == null)
											{
												player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
											}
											if (world.getWorldTime() % 50 > 0)
											{
												return;
											}
												player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
										}
									}
								}
					//check if boots and legs is equipped
							if(player.inventory.armorItemInSlot(0) != null &&
							player.inventory.armorItemInSlot(1) != null)
								{
								player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_3BOOTS);
								player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_3BOOTS);
									if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.THIRD_AGE_BOOTS && 
									player.inventory.armorItemInSlot(1).getItem() == ItemInit.THIRD_AGE_LEGS)
									{
										player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_3BOOTS);
										player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_3BOOTS);
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 2));
									}
								}
					//check if boots and body is equipped
							if(player.inventory.armorItemInSlot(0) != null &&
							player.inventory.armorItemInSlot(2) != null)
								{
									if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.THIRD_AGE_BOOTS && 
									player.inventory.armorItemInSlot(2).getItem() == ItemInit.THIRD_AGE_BODY)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 2));
									}
								}
					//check if boots and helm is equipped
							if(player.inventory.armorItemInSlot(0) != null &&
							player.inventory.armorItemInSlot(3) != null)
								{
									if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.THIRD_AGE_BOOTS && 
									player.inventory.armorItemInSlot(3).getItem() == ItemInit.THIRD_AGE_HELM)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 2));
										
										
									}
								}
					//check if legs and body is equipped
							if(player.inventory.armorItemInSlot(1) != null &&
							player.inventory.armorItemInSlot(2) != null)
								{
									if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.THIRD_AGE_LEGS && 
									player.inventory.armorItemInSlot(2).getItem() == ItemInit.THIRD_AGE_BODY)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 2));
									}
								}
					//check if legs and helm is equipped
							if(player.inventory.armorItemInSlot(1) != null &&
							player.inventory.armorItemInSlot(3) != null)
								{
									if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.THIRD_AGE_LEGS && 
									player.inventory.armorItemInSlot(3).getItem() == ItemInit.THIRD_AGE_HELM)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 2));
									}
								}
					//check if body and helm is equipped
							if(player.inventory.armorItemInSlot(2) != null &&
							player.inventory.armorItemInSlot(3) != null)
								{
									if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.THIRD_AGE_BODY && 
									player.inventory.armorItemInSlot(3).getItem() == ItemInit.THIRD_AGE_HELM)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 0, 2));
									}
								}
					//check if boots, legs and body is equipped
							if(player.inventory.armorItemInSlot(0) != null &&
							player.inventory.armorItemInSlot(1) != null &&
							player.inventory.armorItemInSlot(2) != null)
								{
									if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.THIRD_AGE_BOOTS && 
									player.inventory.armorItemInSlot(1).getItem() == ItemInit.THIRD_AGE_LEGS &&
									player.inventory.armorItemInSlot(2).getItem() == ItemInit.THIRD_AGE_BODY)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 3));
										player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 2));
									}
								}
					//check if legs, body and helm is equipped
							if(player.inventory.armorItemInSlot(1) != null &&
							player.inventory.armorItemInSlot(2) != null &&
							player.inventory.armorItemInSlot(3) != null)
								{
									if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.THIRD_AGE_LEGS && 
									player.inventory.armorItemInSlot(2).getItem() == ItemInit.THIRD_AGE_BODY &&
									player.inventory.armorItemInSlot(3).getItem() == ItemInit.THIRD_AGE_HELM)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 0, 2));
										
									}
								}
					//check if boots, body and helm is equipped
							if(player.inventory.armorItemInSlot(0) != null &&
							player.inventory.armorItemInSlot(2) != null &&
							player.inventory.armorItemInSlot(3) != null)
								{
									if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.THIRD_AGE_BOOTS && 
									player.inventory.armorItemInSlot(2).getItem() == ItemInit.THIRD_AGE_BODY &&
									player.inventory.armorItemInSlot(3).getItem() == ItemInit.THIRD_AGE_HELM)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.LUCK, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 0, 2));
									}
								}
					//check if boots, legs and helm is equipped
							if(player.inventory.armorItemInSlot(0) != null &&
							player.inventory.armorItemInSlot(1) != null &&
							player.inventory.armorItemInSlot(3) != null)
								{
									if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.THIRD_AGE_BOOTS && 
									player.inventory.armorItemInSlot(1).getItem() == ItemInit.THIRD_AGE_LEGS &&
									player.inventory.armorItemInSlot(3).getItem() == ItemInit.THIRD_AGE_HELM)
									{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.NIGHT_VISION, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 2));
										player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 0, 3));
									}
								}
//// RUNE ////
							if(player.inventory.armorItemInSlot(0) != null &&
									player.inventory.armorItemInSlot(1) != null && 
									player.inventory.armorItemInSlot(2) != null &&
									player.inventory.armorItemInSlot(3) != null)
								{
								player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_RFULL);
								player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_RFULL);
									if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.RUNE_BOOTS &&
										player.inventory.armorItemInSlot(1).getItem() == ItemInit.RUNE_LEGS && 
										player.inventory.armorItemInSlot(2).getItem() == ItemInit.RUNE_BODY &&
										player.inventory.armorItemInSlot(3).getItem() == ItemInit.RUNE_HELM)
									{
										player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_RFULL);
										player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_RFULL);
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
										player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
										player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 0));
									}
								}
								
								//check if boots is equipped
								if(player.inventory.armorItemInSlot(0) != null)
									{
									player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_RBOOTS);
									player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_RBOOTS);
										if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.RUNE_BOOTS)
										{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_RBOOTS);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_RBOOTS);
										}
									}
								//check if legs is equipped
								if(player.inventory.armorItemInSlot(1) != null)
									{
									player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_RLEGS);
									player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_RLEGS);
										if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.RUNE_LEGS)
										{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_RBOOTS);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_RBOOTS);
										}
									}
								//check if body is equipped
								if(player.inventory.armorItemInSlot(2) != null)
									{
									player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_RBODY);
									player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_RBODY);
										if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.RUNE_BODY)
										{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_RBODY);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_RBODY);
										}
									}
								//check if helm is equipped
								if(player.inventory.armorItemInSlot(3) != null)
									{
									player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_RHELM);
									player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_RHELM);
										if(player.inventory.armorItemInSlot(3).getItem() == ItemInit.RUNE_HELM)
										{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_RHELM);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_RHELM);
										}
									}
								//check if boots and legs is equipped
								if(player.inventory.armorItemInSlot(0) != null &&
								   player.inventory.armorItemInSlot(1) != null)
									{
										if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.RUNE_BOOTS && 
									       player.inventory.armorItemInSlot(1).getItem() == ItemInit.RUNE_LEGS)
										{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
										}
									}
								//check if boots and body is equipped
								if(player.inventory.armorItemInSlot(0) != null &&
								player.inventory.armorItemInSlot(2) != null)
									{
										if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.RUNE_BOOTS && 
										   player.inventory.armorItemInSlot(2).getItem() == ItemInit.RUNE_BODY)
										{
										player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
										}
									}
								//check if boots and helm is equipped
										if(player.inventory.armorItemInSlot(0) != null &&
										player.inventory.armorItemInSlot(3) != null)
											{
												if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.RUNE_BOOTS && 
												player.inventory.armorItemInSlot(3).getItem() == ItemInit.RUNE_HELM)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
												}
											}
								//check if legs and body is equipped
										if(player.inventory.armorItemInSlot(1) != null &&
										player.inventory.armorItemInSlot(2) != null)
											{
												if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.RUNE_LEGS && 
												player.inventory.armorItemInSlot(2).getItem() == ItemInit.RUNE_BODY)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
												}
											}
								//check if legs and helm is equipped
										if(player.inventory.armorItemInSlot(1) != null &&
										player.inventory.armorItemInSlot(3) != null)
											{
												if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.RUNE_LEGS && 
												player.inventory.armorItemInSlot(3).getItem() == ItemInit.RUNE_HELM)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
												}
											}
								//check if body and helm is equipped
										if(player.inventory.armorItemInSlot(2) != null &&
										player.inventory.armorItemInSlot(3) != null)
											{
												if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.RUNE_BODY && 
												player.inventory.armorItemInSlot(3).getItem() == ItemInit.RUNE_HELM)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
												}
											}
								//check if boots, legs and body is equipped
										if(player.inventory.armorItemInSlot(0) != null &&
										player.inventory.armorItemInSlot(1) != null &&
										player.inventory.armorItemInSlot(2) != null)
											{
												if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.RUNE_BOOTS && 
												player.inventory.armorItemInSlot(1).getItem() == ItemInit.RUNE_LEGS &&
												player.inventory.armorItemInSlot(2).getItem() == ItemInit.RUNE_BODY)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
												}
											}
								//check if legs, body and helm is equipped
										if(player.inventory.armorItemInSlot(1) != null &&
										player.inventory.armorItemInSlot(2) != null &&
										player.inventory.armorItemInSlot(3) != null)
											{
												if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.RUNE_LEGS && 
												player.inventory.armorItemInSlot(2).getItem() == ItemInit.RUNE_BODY &&
												player.inventory.armorItemInSlot(3).getItem() == ItemInit.RUNE_HELM)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
												}
											}
								//check if boots, body and helm is equipped
										if(player.inventory.armorItemInSlot(0) != null &&
										player.inventory.armorItemInSlot(2) != null &&
										player.inventory.armorItemInSlot(3) != null)
											{
												if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.RUNE_BOOTS && 
												player.inventory.armorItemInSlot(2).getItem() == ItemInit.RUNE_BODY &&
												player.inventory.armorItemInSlot(3).getItem() == ItemInit.RUNE_HELM)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
												}
											}
								//check if boots, legs and helm is equipped
										if(player.inventory.armorItemInSlot(0) != null &&
										player.inventory.armorItemInSlot(1) != null &&
										player.inventory.armorItemInSlot(3) != null)
											{
												if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.RUNE_BOOTS && 
												player.inventory.armorItemInSlot(1).getItem() == ItemInit.RUNE_LEGS &&
												player.inventory.armorItemInSlot(3).getItem() == ItemInit.RUNE_HELM)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
												}
											}
///// ADAMANT /////
										if(player.inventory.armorItemInSlot(0) != null &&
												player.inventory.armorItemInSlot(1) != null && 
												player.inventory.armorItemInSlot(2) != null &&
												player.inventory.armorItemInSlot(3) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_AFULL);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_AFULL);
												if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.ADAMANT_BOOTS &&
													player.inventory.armorItemInSlot(1).getItem() == ItemInit.ADAMANT_LEGS && 
													player.inventory.armorItemInSlot(2).getItem() == ItemInit.ADAMANT_BODY &&
													player.inventory.armorItemInSlot(3).getItem() == ItemInit.ADAMANT_HELM)
												{
													player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 0));
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_AFULL);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_AFULL);
												}
											}
										//check if boots is equipped
										if(player.inventory.armorItemInSlot(0) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_ABOOTS);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_ABOOTS);
												if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.ADAMANT_BOOTS)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_ABOOTS);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_ABOOTS);
												}
											}
										//check if legs is equipped
										if(player.inventory.armorItemInSlot(1) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_ALEGS);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_ALEGS);
												if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.ADAMANT_LEGS)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_ABOOTS);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_ABOOTS);
												}
											}
										//check if body is equipped
										if(player.inventory.armorItemInSlot(2) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_ABODY);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_ABODY);
												if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.ADAMANT_BODY)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_ABODY);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_ABODY);
												}
											}
										//check if helm is equipped
										if(player.inventory.armorItemInSlot(3) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_AHELM);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_AHELM);
												if(player.inventory.armorItemInSlot(3).getItem() == ItemInit.ADAMANT_HELM)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_AHELM);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_AHELM);
												}
											}
///// MITHRIL /////
										if(player.inventory.armorItemInSlot(0) != null &&
												player.inventory.armorItemInSlot(1) != null && 
												player.inventory.armorItemInSlot(2) != null &&
												player.inventory.armorItemInSlot(3) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_MFULL);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_MFULL);
												if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.MITHRIL_BOOTS &&
													player.inventory.armorItemInSlot(1).getItem() == ItemInit.MITHRIL_LEGS && 
													player.inventory.armorItemInSlot(2).getItem() == ItemInit.MITHRIL_BODY &&
													player.inventory.armorItemInSlot(3).getItem() == ItemInit.MITHRIL_HELM)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_MFULL);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_MFULL);
												}
											}
										//check if boots is equipped
										if(player.inventory.armorItemInSlot(0) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_MBOOTS);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_MBOOTS);
												if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.MITHRIL_BOOTS)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_MBOOTS);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_MBOOTS);
												}
											}
										//check if legs is equipped
										if(player.inventory.armorItemInSlot(1) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_MLEGS);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_MLEGS);
												if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.MITHRIL_LEGS)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_MBOOTS);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_MBOOTS);
												}
											}
										//check if body is equipped
										if(player.inventory.armorItemInSlot(2) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_MBODY);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_MBODY);
												if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.MITHRIL_BODY)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_MBODY);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_MBODY);
												}
											}
										//check if helm is equipped
										if(player.inventory.armorItemInSlot(3) != null)
											{
											player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_MHELM);
											player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_MHELM);
												if(player.inventory.armorItemInSlot(3).getItem() == ItemInit.MITHRIL_HELM)
												{
													player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_MHELM);
													player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_MHELM);
												}
											}
	}
	
	

}

Holy shit...

Edited by supreme marshal
Link to comment
Share on other sites

Well now I have a problem with Health Boost potion effect. It is a very weird problem. It give me empty hearth bonus but my health always go back to 10 hearts maximum. When I try to eat food to restore my health, it's trying to restore the missing health that is over 10 hearts but it's always going back to 10 hearts as if I'm taking damages when I get past 10 hearts. Anyone know of this problem?

Edited by supreme marshal
Link to comment
Share on other sites

1 hour ago, supreme marshal said:

10 hearths

Natural-Fireplace-Hearth-Stone.jpg

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Show your code. I'm not sure what the problem might be

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

package com.SupremeMarshal.MoreToolsTierMod.objects.armor;

import com.SupremeMarshal.MoreToolsTierMod.Main;
import com.SupremeMarshal.MoreToolsTierMod.init.ModItems;
import com.SupremeMarshal.MoreToolsTierMod.util.interfaces.IHasModel;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;


public class DragonArmorBase extends ItemArmor implements IHasModel
{

	public DragonArmorBase(String name, ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) {
		super(materialIn, renderIndexIn, equipmentSlotIn);
		setUnlocalizedName(name);
		setRegistryName(name);
		setCreativeTab(CreativeTabs.COMBAT);
		

		
		ModItems.ITEMS.add(this);
	}
	@Override
	public void registerModels() 
	{
		Main.proxy.registerItemRenderer(this, 0, "inventory");
	}
	///add potion effect to full set of armor
	@Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack item)
	{
		if(player.inventory.armorItemInSlot(0) != null &&
			player.inventory.armorItemInSlot(1) != null && 
			player.inventory.armorItemInSlot(2) != null &&
			player.inventory.armorItemInSlot(3) != null)
		{
			if(player.inventory.armorItemInSlot(0).getItem() == ModItems.DRAGON_BOOTS &&
				player.inventory.armorItemInSlot(1).getItem() == ModItems.DRAGON_LEGS && 
				player.inventory.armorItemInSlot(2).getItem() == ModItems.DRAGON_BODY &&
				player.inventory.armorItemInSlot(3).getItem() == ModItems.DRAGON_HELM)
			{
				player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
				player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 1));
				player.addPotionEffect(new PotionEffect(MobEffects.HEALTH_BOOST,0,3));
			}
		}
	}
}

 

Edited by supreme marshal
Link to comment
Share on other sites

It's because you're passing a duration of 0.

Instead pass in a larger value.

 

You can use getActivePotionEffect and getDuration to determine if the potion is already active, and only apply the duration if either the potion is not active or the duration is <2

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

22 minutes ago, supreme marshal said:

I put 5 seconds instead, it still do the same thing. But now I can see the particle of the effect.

The only way to not have particles is to prevent them from being rendered.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

yes by putting the time of the potion effect to zero, it remove the particle effect. The effect of the potion is still suppose to work, the problem was not the time set too low. I wonder if it's going to work if I try my mod on the original minecraft launcher. Anyways, I don't really need the Health bonus since I can still make my armor powerful. Here a picture of what is actually happening. You can see the Hearts won't go above the normal maximum limit.

MCscreen1.png

Link to comment
Share on other sites

Time 0 -> Potion ticks -> Potion expires -> Max health set to 10

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

45 minutes ago, diesieben07 said:

The PotionEffect constructor has a parameter to hide the particles.

Oh? Is that new (relative to about 1.10)?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

So I am still trying to solve this issue. The problem that I am applying the health_boost potion effect for every armor ticks, which mean it will be reset every single tick. This conflict the effect because it's always reset to a new effect. This method work for boost speed, strength, vision and some more but for Health boost or Regeneration, it isn't.

Link to comment
Share on other sites

Ok I solved the issue for the Regeneration, here is the codes on Armor tick after checking if full set is equipped:

if (player.getActivePotionEffect(MobEffects.REGENERATION) == null)
				{
					player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
				}
				if (world.getWorldTime() % 50 > 0)
				{
					return;
				}
					player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));

Basically, regeneration 1 regen every 50 ticks so with this method, it won't reset regeneration 1 until 50 ticks is completed. So then it can regenerate one health after 50 ticks and reset the Regeneration effect.

 

But unfortunately I haven't got a solution for Health Boost yet. I tried the same method as regeneration, but my health actually reset to normal every 50 ticks so this method is not working. In other word, every time my health boost effect is being reset, my health is also getting reset. 

 

I'm thinking about just editing player's max health when armor is equipped and resetting it when he get it off. I want this method to be compatible with other mod that modify player's health. So maybe if I check player current health and add (for exemple) 5 health. When I remove my armor, it check player current health again (because if other mod modify player health, it won't be the same as when he equipped the armor) and remove 5 health. I'm just not sure how to put this in codes yet.

Edited by supreme marshal
Link to comment
Share on other sites

public class DragonArmorBase extends ItemArmor implements IHasModel
{

	public DragonArmorBase(String name, ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) {
		super(materialIn, renderIndexIn, equipmentSlotIn);
		setUnlocalizedName(name);
		setRegistryName(name);
		setCreativeTab(CreativeTabs.COMBAT);
		

		
		ItemInit.ITEMS.add(this);
	}
	@Override
	public void registerModels() 
	{
		Main.proxy.registerItemRenderer(this, 0, "inventory");
	}
	
//////UUID//////
	//DRAGON ARMOR//
		//HEALTH// -- Total = 40 Health
	protected static final UUID MAX_HEALTH_DFULL_UUID = UUID.fromString("fdd721e0-bcb0-4963-9c03-ace14c6ceae4");
	private static final AttributeModifier HEALTH_BOOST_DFULL = new AttributeModifier (MAX_HEALTH_DFULL_UUID, "MAX_HEALTH_DFULL_UUID", 10, 0); 
	
	protected static final UUID MAX_HEALTH_DHELM_UUID = UUID.fromString("cfb80931-3fc9-4e5a-9760-213aee2dce98");
	private static final AttributeModifier HEALTH_BOOST_DHELM = new AttributeModifier (MAX_HEALTH_DHELM_UUID, "MAX_HEALTH_DHELM_UUID", 5, 0);
	
	protected static final UUID MAX_HEALTH_DBODY_UUID = UUID.fromString("122785ee-9867-4ace-af8b-745932039e73");
	private static final AttributeModifier HEALTH_BOOST_DBODY = new AttributeModifier (MAX_HEALTH_DBODY_UUID, "MAX_HEALTH_DBODY_UUID", 10, 0);
	
	protected static final UUID MAX_HEALTH_DLEGS_UUID = UUID.fromString("a5c77a84-5a15-4752-9f07-599a3a2e4c9f");
	private static final AttributeModifier HEALTH_BOOST_DLEGS = new AttributeModifier (MAX_HEALTH_DLEGS_UUID, "MAX_HEALTH_DLEGS_UUID", 10, 0);
	
	protected static final UUID MAX_HEALTH_DBOOTS_UUID = UUID.fromString("f3fb329d-4923-4aa1-bef8-d0728f4b7abd");
	private static final AttributeModifier HEALTH_BOOST_DBOOTS = new AttributeModifier (MAX_HEALTH_DBOOTS_UUID, "MAX_HEALTH_DBOOTS_UUID", 5, 0);
	
		//KNOCKBACK RESISTANCE -- Total = 80%
	protected static final UUID KNOCKBACK_RESISTANCE_DFULL_UUID = UUID.fromString("a5f4ce17-c5b7-4791-979c-b55018c2e89c");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DFULL = new AttributeModifier (KNOCKBACK_RESISTANCE_DFULL_UUID, "KNOCKBACK_RESISTANCE_DFULL_UUID", 20, 0); 
	
	protected static final UUID KNOCKBACK_RESISTANCE_DHELM_UUID = UUID.fromString("5619ab81-25e6-43e1-85e8-0a11be2b0bcd");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DHELM = new AttributeModifier (KNOCKBACK_RESISTANCE_DHELM_UUID, "KNOCKBACK_RESISTANCE_DHELM_UUID", 10, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_DBODY_UUID = UUID.fromString("ecec32f1-c5b5-4921-98ba-e1717a3befa4");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DBODY = new AttributeModifier (KNOCKBACK_RESISTANCE_DBODY_UUID, "KNOCKBACK_RESISTANCE_DBODY_UUID", 20, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_DLEGS_UUID = UUID.fromString("1726437a-2fba-42b9-a3f7-56a777740037");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DLEGS = new AttributeModifier (KNOCKBACK_RESISTANCE_DLEGS_UUID, "KNOCKBACK_RESISTANCE_DLEGS_UUID", 20, 0);
	
	protected static final UUID KNOCKBACK_RESISTANCE_DBOOTS_UUID = UUID.fromString("7ffe2d12-c540-407b-8df6-101450ab8a5b");
	private static final AttributeModifier KNOCKBACK_RESISTANCE_BOOST_DBOOTS = new AttributeModifier (KNOCKBACK_RESISTANCE_DBOOTS_UUID, "KNOCKBACK_RESISTANCE_DBOOTS_UUID", 10, 0);
	
	//RUNE ARMOR//
		//HEALTH// == Total = 30 Health
	
		//KNOCKBACK RESISTANCE -- Total = 60%
	
	
	//ADAMANT ARMOR//
		//HEALTH// == Total = 20 Health
		
		//KNOCKBACK RESISTANCE -- Total = 40%
	
	
	//MITHRIL ARMOR//
		//HEALTH// == Total = 10 Health
			
		//KNOCKBACK RESISTANCE -- Total = 20%
	
	//THIRD AGE ARMOR//
		//HEALTH// == Total = 50 Health
				
		//KNOCKBACK RESISTANCE -- Total = 90%
	
	public static String playerKey(EntityPlayer player)
	{
		return player.getGameProfile().getName() + ":" + player.world.isRemote;
	}
	
	///add effect to set of armor
	@Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack)
	{
		if(player.inventory.armorItemInSlot(0) != null &&
			player.inventory.armorItemInSlot(1) != null && 
			player.inventory.armorItemInSlot(2) != null &&
			player.inventory.armorItemInSlot(3) != null)
				{
			player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DFULL);
			player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DFULL);
			if (player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS &&
				player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS && 
				player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY &&
				player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
			{
				player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DFULL);
				player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DFULL);
				player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
				player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 1));
				player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 1));
				{
				if (player.getActivePotionEffect(MobEffects.REGENERATION) == null)
				{
					player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
				}
				if (world.getWorldTime() % 50 > 0)
				{
					return;
				}
					player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 50 , 0));
				}
				
				
				
			}
			}
			
		
		
		//check if dragon boots is equipped
		if(player.inventory.armorItemInSlot(0) != null)
			{
			player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DBOOTS);
			player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DBOOTS);
			
				if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS)
				{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DBOOTS);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DBOOTS);
					player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
					player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 0, 0));
				}
			}
		//check if dragon legs is equipped
				if(player.inventory.armorItemInSlot(1) != null)
					{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DLEGS);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DLEGS);
						if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS)
						{
							player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DLEGS);
							player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DLEGS);
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if dragon body is equipped
				if(player.inventory.armorItemInSlot(2) != null)
					
					{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DBODY);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DBODY);
						if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY)
						{
							player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DBODY);
							player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DBODY);
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if dragon helm is equipped
				if(player.inventory.armorItemInSlot(3) != null)
					{
					player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).removeModifier(HEALTH_BOOST_DHELM);
					player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).removeModifier(KNOCKBACK_RESISTANCE_BOOST_DHELM);
						if(player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
							player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).applyModifier(HEALTH_BOOST_DHELM);
							player.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).applyModifier(KNOCKBACK_RESISTANCE_BOOST_DHELM);
						}
					}
		//check if boots and legs is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(1) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if boots and body is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(2) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if boots and helm is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if legs and body is equipped
				if(player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(2) != null)
					{
						if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS && 
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if legs and helm is equipped
				if(player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS && 
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if body and helm is equipped
				if(player.inventory.armorItemInSlot(2) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY && 
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 1));
						}
					}
		//check if boots, legs and body is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(2) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS &&
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
						}
					}
		//check if legs, body and helm is equipped
				if(player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(2) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS && 
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY &&
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
						}
					}
		//check if boots, body and helm is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(2) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(2).getItem() == ItemInit.DRAGON_BODY &&
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
						}
					}
		//check if boots, legs and helm is equipped
				if(player.inventory.armorItemInSlot(0) != null &&
				player.inventory.armorItemInSlot(1) != null &&
				player.inventory.armorItemInSlot(3) != null)
					{
						if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.DRAGON_BOOTS && 
						player.inventory.armorItemInSlot(1).getItem() == ItemInit.DRAGON_LEGS &&
						player.inventory.armorItemInSlot(3).getItem() == ItemInit.DRAGON_HELM)
						{
							player.addPotionEffect(new PotionEffect(MobEffects.RESISTANCE, 0, 2));
							player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 0, 0));
						}
					}
////// THIRD AGE ///////
      
      //ect.. I won't show the rest because it's pretty much copy-paste for every armor.

 

 

So when I equip a dragon helm, it give me  5 Health and 10% knockback resistance + some potion effect.

Body = 10 health and 20% knockback resistance.

Full set give me 10 extra health and 20% extra knockback resist with Resistance 3, Fire resistance 2 and strength 2.

I tested it and it work 100%.  My mod is almost ready to be published but I still want to add more things in it.

Edited by supreme marshal
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello. I've been having a problem when launching minecraft forge. It just doesn't open the game, and leaves me with this "(exit code 1)" error. Both regular and optifine versions of minecraft launch just fine, tried both with 1.18.2 and 1.20.1. I can assure that my drivers are updated so that can't be it, and i've tried using Java 17, 18 and 21 to no avail. Even with no mods installed, the thing won't launch. I'll leave the log here, although it's in spanish: https://jmp.sh/s/FPqGBSi30fzKJDt2M1gc My specs are this: Ryzen 3 4100 || Radeon R9 280x || 16gb ram || Windows 10 I'd appreciate any help, thank you in advance.
    • Hey, Me and my friends decided to start up a Server with "a few" mods, the last few days everything went well we used all the items we wanted. Now our Game crashes the moment we touch a Lava Bucket inside our Inventory. It just instantly closes and gives me an "Alc Cleanup"  Crash screen (Using GDLauncher). I honestly dont have a clue how to resolve this error. If anyone could help id really appreciate it, I speak German and Englisch so you can choose whatever you speak more fluently. Thanks in Advance. Plus I dont know how to link my Crash Report help for that would be nice too whoops
    • I hosted a minecraft server and I modded it, and there is always an error on the console which closes the server. If someone knows how to repair it, it would be amazing. Thank you. I paste the crash report down here: ---- Minecraft Crash Report ---- WARNING: coremods are present:   llibrary (llibrary-core-1.0.11-1.12.2.jar)   WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)   AstralCore (astralsorcery-1.12.2-1.10.27.jar)   CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)   SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)   ForgelinPlugin (Forgelin-1.8.4.jar)   midnight (themidnight-0.3.5.jar)   FutureMC (Future-MC-0.2.19.jar)   SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)   Backpacked (backpacked-1.4.3-1.12.2.jar)   LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar) Contact their authors BEFORE contacting forge // There are four lights! Time: 3/28/24 12:17 PM Description: Exception in server tick loop net.minecraftforge.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:89)     at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:612)     at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)     at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)     at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)     at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)     at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)     at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)     at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)     at com.google.common.eventbus.EventBus.post(EventBus.java:217)     at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)     at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:595)     at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98)     at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333)     at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125)     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486)     at java.lang.Thread.run(Thread.java:750) Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/multiplayer/WorldClient     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)     at java.lang.Class.privateGetPublicMethods(Class.java:2902)     at java.lang.Class.getMethods(Class.java:1615)     at net.minecraftforge.fml.common.eventhandler.EventBus.register(EventBus.java:82)     at net.minecraftforge.fml.common.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:82)     ... 31 more Caused by: java.lang.ClassNotFoundException: net.minecraft.client.multiplayer.WorldClient     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(ClassLoader.java:418)     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)     ... 37 more Caused by: net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerException: Exception in class transformer net.minecraftforge.fml.common.asm.transformers.SideTransformer@4e558728 from coremod FMLCorePlugin     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:260)     at net.minecraft.launchwrapper.LaunchClassLoader.runTransformers(LaunchClassLoader.java:279)     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:176)     ... 39 more Caused by: java.lang.RuntimeException: Attempted to load class bsb for invalid side SERVER     at net.minecraftforge.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:62)     at net.minecraftforge.fml.common.asm.ASMTransformerWrapper$TransformerWrapper.transform(ASMTransformerWrapper.java:256)     ... 41 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.12.2     Operating System: Linux (amd64) version 5.10.0-28-cloud-amd64     Java Version: 1.8.0_382, Temurin     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin     Memory: 948745536 bytes (904 MB) / 1564999680 bytes (1492 MB) up to 7635730432 bytes (7282 MB)     JVM Flags: 2 total; -Xmx8192M -Xms256M     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP 9.42 Powered by Forge 14.23.5.2860 63 mods loaded, 63 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     | State | ID                 | Version                 | Source                                                | Signature                                |     |:----- |:------------------ |:----------------------- |:----------------------------------------------------- |:---------------------------------------- |     | LC    | minecraft          | 1.12.2                  | minecraft.jar                                         | None                                     |     | LC    | mcp                | 9.42                    | minecraft.jar                                         | None                                     |     | LC    | FML                | 8.0.99.99               | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | forge              | 14.23.5.2860            | forge-1.12.2-14.23.5.2860.jar                         | e3c3d50c7c986df74c645c0ac54639741c90a557 |     | LC    | creativecoredummy  | 1.0.0                   | minecraft.jar                                         | None                                     |     | LC    | backpacked         | 1.4.2                   | backpacked-1.4.3-1.12.2.jar                           | None                                     |     | LC    | itemblacklist      | 1.4.3                   | ItemBlacklist-1.4.3.jar                               | None                                     |     | LC    | securitycraft      | v1.9.8                  | [1.12.2] SecurityCraft v1.9.8.jar                     | None                                     |     | LC    | aiimprovements     | 0.0.1.3                 | AIImprovements-1.12-0.0.1b3.jar                       | None                                     |     | LC    | jei                | 4.16.1.301              | jei_1.12.2-4.16.1.301.jar                             | None                                     |     | LC    | appleskin          | 1.0.14                  | AppleSkin-mc1.12-1.0.14.jar                           | None                                     |     | LC    | baubles            | 1.5.2                   | Baubles-1.12-1.5.2.jar                                | None                                     |     | LC    | astralsorcery      | 1.10.27                 | astralsorcery-1.12.2-1.10.27.jar                      | a0f0b759d895c15ceb3e3bcb5f3c2db7c582edf0 |     | LC    | attributefix       | 1.0.12                  | AttributeFix-Forge-1.12.2-1.0.12.jar                  | None                                     |     | LC    | atum               | 2.0.20                  | Atum-1.12.2-2.0.20.jar                                | None                                     |     | LC    | bloodmoon          | 1.5.3                   | Bloodmoon-MC1.12.2-1.5.3.jar                          | d72e0dd57935b3e9476212aea0c0df352dd76291 |     | LC    | forgelin           | 1.8.4                   | Forgelin-1.8.4.jar                                    | None                                     |     | LC    | bountiful          | 2.2.2                   | Bountiful-2.2.2.jar                                   | None                                     |     | LC    | camera             | 1.0.10                  | camera-1.0.10.jar                                     | None                                     |     | LC    | chisel             | MC1.12.2-1.0.2.45       | Chisel-MC1.12.2-1.0.2.45.jar                          | None                                     |     | LC    | collective         | 3.0                     | collective-1.12.2-3.0.jar                             | None                                     |     | LC    | reskillable        | 1.12.2-1.13.0           | Reskillable-1.12.2-1.13.0.jar                         | None                                     |     | LC    | compatskills       | 1.12.2-1.17.0           | CompatSkills-1.12.2-1.17.0.jar                        | None                                     |     | LC    | creativecore       | 1.10.0                  | CreativeCore_v1.10.71_mc1.12.2.jar                    | None                                     |     | LC    | customnpcs         | 1.12                    | CustomNPCs_1.12.2-(05Jul20).jar                       | None                                     |     | LC    | darknesslib        | 1.1.2                   | DarknessLib-1.12.2-1.1.2.jar                          | 220f10d3a93b3ff5fbaa7434cc629d863d6751b9 |     | LC    | dungeonsmod        | @VERSION@               | DungeonsMod-1.12.2-1.0.8.jar                          | None                                     |     | LC    | enhancedvisuals    | 1.3.0                   | EnhancedVisuals_v1.4.4_mc1.12.2.jar                   | None                                     |     | LC    | extrautils2        | 1.0                     | extrautils2-1.12-1.9.9.jar                            | None                                     |     | LC    | futuremc           | 0.2.6                   | Future-MC-0.2.19.jar                                  | None                                     |     | LC    | geckolib3          | 3.0.30                  | geckolib-forge-1.12.2-3.0.31.jar                      | None                                     |     | LC    | gottschcore        | 1.15.1                  | GottschCore-mc1.12.2-f14.23.5.2859-v1.15.1.jar        | None                                     |     | LC    | hardcorerevival    | 1.2.0                   | HardcoreRevival_1.12.2-1.2.0.jar                      | None                                     |     | LC    | waila              | 1.8.26                  | Hwyla-1.8.26-B41_1.12.2.jar                           | None                                     |     | LE    | imsm               | 1.12                    | Instant Massive Structures Mod 1.12.2.jar             | None                                     |     | L     | journeymap         | 1.12.2-5.7.1p2          | journeymap-1.12.2-5.7.1p2.jar                         | None                                     |     | L     | mobsunscreen       | @version@               | mobsunscreen-1.12.2-3.1.5.jar                         | None                                     |     | L     | morpheus           | 1.12.2-3.5.106          | Morpheus-1.12.2-3.5.106.jar                           | None                                     |     | L     | llibrary           | 1.7.20                  | llibrary-1.7.20-1.12.2.jar                            | None                                     |     | L     | mowziesmobs        | 1.5.8                   | mowziesmobs-1.5.8.jar                                 | None                                     |     | L     | nocubessrparmory   | 3.0.0                   | NoCubes_SRP_Combat_Addon_3.0.0.jar                    | None                                     |     | L     | nocubessrpnests    | 3.0.0                   | NoCubes_SRP_Nests_Addon_3.0.0.jar                     | None                                     |     | L     | nocubessrpsurvival | 3.0.0                   | NoCubes_SRP_Survival_Addon_3.0.0.jar                  | None                                     |     | L     | nocubesrptweaks    | V4.1                    | nocubesrptweaks-V4.1.jar                              | None                                     |     | L     | patchouli          | 1.0-23.6                | Patchouli-1.0-23.6.jar                                | None                                     |     | L     | artifacts          | 1.1.2                   | RLArtifacts-1.1.2.jar                                 | None                                     |     | L     | rsgauges           | 1.2.8                   | rsgauges-1.12.2-1.2.8.jar                             | None                                     |     | L     | rustic             | 1.1.7                   | rustic-1.1.7.jar                                      | None                                     |     | L     | silentlib          | 3.0.13                  | SilentLib-1.12.2-3.0.14+168.jar                       | None                                     |     | L     | scalinghealth      | 1.3.37                  | ScalingHealth-1.12.2-1.3.42+147.jar                   | None                                     |     | L     | lteleporters       | 1.12.2-3.0.2            | simpleteleporters-1.12.2-3.0.2.jar                    | None                                     |     | L     | spartanshields     | 1.5.5                   | SpartanShields-1.12.2-1.5.5.jar                       | None                                     |     | L     | spartanweaponry    | 1.5.3                   | SpartanWeaponry-1.12.2-1.5.3.jar                      | None                                     |     | L     | srparasites        | 1.9.18                  | SRParasites-1.12.2v1.9.18.jar                         | None                                     |     | L     | treasure2          | 2.2.0                   | Treasure2-mc1.12.2-f14.23.5.2859-v2.2.1.jar           | None                                     |     | L     | treeharvester      | 4.0                     | treeharvester_1.12.2-4.0.jar                          | None                                     |     | L     | twilightforest     | 3.11.1021               | twilightforest-1.12.2-3.11.1021-universal.jar         | None                                     |     | L     | variedcommodities  | 1.12.2                  | VariedCommodities_1.12.2-(31Mar23).jar                | None                                     |     | L     | voicechat          | 1.12.2-2.4.32           | voicechat-forge-1.12.2-2.4.32.jar                     | None                                     |     | L     | wolfarmor          | 3.8.0                   | WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar | None                                     |     | L     | worldborder        | 2.3                     | worldborder_1.12.2-2.3.jar                            | None                                     |     | L     | midnight           | 0.3.5                   | themidnight-0.3.5.jar                                 | None                                     |     | L     | structurize        | 1.12.2-0.10.277-RELEASE | structurize-1.12.2-0.10.277-RELEASE.jar               | None                                     |     Loaded coremods (and transformers):  llibrary (llibrary-core-1.0.11-1.12.2.jar)   net.ilexiconn.llibrary.server.core.plugin.LLibraryTransformer   net.ilexiconn.llibrary.server.core.patcher.LLibraryRuntimePatcher WolfArmorCore (WolfArmorAndStorage-1.12.2-3.8.0-universal-signed.jar)    AstralCore (astralsorcery-1.12.2-1.10.27.jar)    CreativePatchingLoader (CreativeCore_v1.10.71_mc1.12.2.jar)    SecurityCraftLoadingPlugin ([1.12.2] SecurityCraft v1.9.8.jar)    ForgelinPlugin (Forgelin-1.8.4.jar)    midnight (themidnight-0.3.5.jar)   com.mushroom.midnight.core.transformer.MidnightClassTransformer FutureMC (Future-MC-0.2.19.jar)   thedarkcolour.futuremc.asm.CoreTransformer SpartanWeaponry-MixinLoader (SpartanWeaponry-1.12.2-1.5.3.jar)    Backpacked (backpacked-1.4.3-1.12.2.jar)   com.mrcrayfish.backpacked.asm.BackpackedTransformer LoadingPlugin (Reskillable-1.12.2-1.13.0.jar)   codersafterdark.reskillable.base.asm.ClassTransformer LoadingPlugin (Bloodmoon-MC1.12.2-1.5.3.jar)   lumien.bloodmoon.asm.ClassTransformer     Profiler Position: N/A (disabled)     Is Modded: Definitely; Server brand changed to 'fml,forge'     Type: Dedicated Server (map_server.txt)
    • When i add mods like falling leaves, visuality and kappas shaders, even if i restart Minecraft they dont show up in the mods menu and they dont work
    • Delete the forge-client.toml file in your config folder  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.