Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted
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.

Posted

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.

Posted (edited)
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
Posted

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.

Posted
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.

Posted

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

Posted

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.

Posted
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.

Posted

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.

Posted (edited)

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
Posted (edited)

Good news, I have learned about Attribute modifier and now I managed to increase my health when wearing my full armor set. Everything seem to work well. HELL YEAH!!!! Until I get another issue...

 

I'll show my codes when I'm done.

Edited by supreme marshal
Posted (edited)
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

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

    • After reinstalling and rebuilding server, now I get another error which is Internal Exception: io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(2829) + length(1) exceeds writerIndex(2829): UnpooledHeapByteBuf(ridx: 2829, widx: 2829, cap: 2829/2829)
    • In 1.20.1, while creating an addon(mod) for Epic Fight, I tried to runclient and it crashed with the following error rg.spongepowered.asm.mixin.throwables.MixinApplyError: Mixin [mixins.epicfight.json:MixinEntityRenderer] from phase [DEFAULT] in config [ mixins.epicfight.json] FAILED during APPLY Could you please tell me how to solve this problem? build.gradle   plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' //id 'org.parchmentmc.librarian.forgegradle' version '1.+' //id 'org.spongepowerd.mixin' version '0.8.5' } version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { // The mappings can be changed at any time and must be in the following format. // Channel: Version: // official MCVersion Official field/method names from Mojang mapping files // parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official // // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings. // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md // // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge // Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. mappings channel: mapping_channel, version: mapping_version // When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game. // In most cases, it is not necessary to enable. // enableEclipsePrepareRuns = true // enableIdeaPrepareRuns = true // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game. // It is REQUIRED to be set to true for this template to function. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html copyIdeResources = true // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations. // The folder name can be set on a run configuration using the "folderName" property. // By default, the folder name of a run configuration is the name of the Gradle project containing it. // generateRunFolders = true // This property enables access transformers for use in development. // They will be applied to the Minecraft artifact. // The access transformer file can be anywhere in the project. // However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge. // This default location is a best practice to automatically put the file in the right place in the final jar. // See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. // These can be tweaked, removed, or duplicated as needed. runs { // applies to all the run configs below configureEach { workingDirectory project.file('run') // Recommended logging data for a userdev environment // The markers can be added/remove as needed separated by commas. // "SCAN": For mods scan. // "REGISTRIES": For firing of registry events. // "REGISTRYDUMP": For getting the contents of all registries. property 'forge.logging.markers', 'REGISTRIES' // Recommended logging level for the console // You can set various levels here. // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels property 'forge.logging.console.level', 'debug' mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } // This run config launches GameTestServer and runs all registered gametests, then exits. // By default, the server will crash when no gametests are provided. // The gametest system is also enabled by default for other run configs under the /test command. gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { // example of overriding the workingDirectory set in configureEach above workingDirectory project.file('run-data') // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } // Include resources generated by data generators. sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { // Put repositories for dependencies here // ForgeGradle automatically adds the Forge maven and Maven Central for you maven { url "https://cursemaven.com" content { includeGroup "curse.maven" } } // If you have mod jar dependencies in ./libs, you can declare them as a repository like so. // See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver // flatDir { // dir 'libs' // } } dependencies { // Specify the version of Minecraft to use. // Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact. // The "userdev" classifier will be requested and setup by ForgeGradle. // If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"], // then special handling is done to allow a setup of a vanilla dependency without the use of an external repository. minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" // Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings // The JEI API is declared for compile time use, while the full JEI artifact is used at runtime // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}") // compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}") // runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}") implementation fg.deobf("curse.maven:epic-fight-mod-405076:5922122") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' // Example mod dependency using a mod jar from ./libs with a flat dir repository // This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar // The group id is ignored when searching -- in this case, it is "blank" // implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}") // For more info: // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } // This block of code expands all declared replace properties in the specified resource targets. // A missing property will result in an error. Properties are expanded using ${} Groovy notation. // When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html tasks.named('processResources', ProcessResources).configure { var replaceProperties = [ minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range, forge_version: forge_version, forge_version_range: forge_version_range, loader_version_range: loader_version_range, mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version, mod_authors: mod_authors, mod_description: mod_description, ] inputs.properties replaceProperties filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { expand replaceProperties + [project: project] } } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } // This is the preferred method to reobfuscate your jar file finalizedBy 'reobfJar' } // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing: // tasks.named('publish').configure { // dependsOn 'reobfJar' // } // Example configuration to allow publishing using the maven-publish plugin publishing { publications { register('mavenJava', MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } maven { url "https://cursemaven.com" content { includeGroup "curse.maven" } } } } tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation }  
    • I have a custom 3d model which works perfectly. BUT I want it to be held diffrently on the players hand when the item is being used. My JSON file under assets/examplemod/items looks like this: { "model": { "type": "minecraft:condition", "on_false": { "type": "minecraft:model", "model": "examplemod:item/example_item" }, "on_true": { "type": "minecraft:model", "model": "examplemod:item/example_item_using" }, "property": "minecraft:using_item" } }   This works fine until the item is used. The correct model will be displayed but with a full black texture instead of the actuall texture. Any idea why? (I want to use the exact same texture for both items, because their model is the same just diffrent displays on firstperson_righthand and firstperson_lefthand). The models JSON's are fully blockbench files inlcuding the elements, display, textures with texture_size.   Also is this the correct way to do it? Because it feels so dumb to change the exact same model just for a diffrent right- and lefthand view.   (fyi: ItemUseAnimation is BLOCK for this item)
    • I just backed up my world then tried to create new mod with currently equipped mod but with new world still made same error. Sooo I think it's not world error. also It's working fine on singleplayer. + but it made some another weird error with new world
    • Maybe the file is too large - you can upload the log file via Mediafire
  • Topics

×
×
  • Create New...

Important Information

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