package net.mcreator.cawezsmantletostratus.procedures;

import net.minecraft.world.item.ItemStack;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.effect.MobEffectInstance;

import net.mcreator.cawezsmantletostratus.init.CawezsMantleToStratusModItems;

public class AmuletItemInInventoryTickProcedure {
	public static void execute(Entity entity, ItemStack itemstack) {
		if (entity == null)
			return;
		if (itemstack.getItem() == CawezsMantleToStratusModItems.ROSE_AMULET.get()) {
			if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
				_entity.addEffect(new MobEffectInstance(MobEffects.REGENERATION, 60, 0, true, false));
		}
		if (itemstack.getItem() == CawezsMantleToStratusModItems.ROUGE_AMULET.get()) {
			if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
				_entity.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, 60, 0, true, false));
		}
		if (itemstack.getItem() == CawezsMantleToStratusModItems.AMBER_AMULET.get()) {
			if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
				_entity.addEffect(new MobEffectInstance(MobEffects.DIG_SPEED, 60, 0, true, false));
		}
		if (itemstack.getItem() == CawezsMantleToStratusModItems.COBALT_AMULET.get()) {
			if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
				_entity.addEffect(new MobEffectInstance(MobEffects.DAMAGE_RESISTANCE, 60, 0, true, false));
		}
		if (itemstack.getItem() == CawezsMantleToStratusModItems.AZURE_AMULTE.get()) {
			if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
				_entity.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SPEED, 60, 0, true, false));
		}
		if (itemstack.getItem() == CawezsMantleToStratusModItems.JADE_AMULET.get()) {
			if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
				_entity.addEffect(new MobEffectInstance(MobEffects.JUMP, 60, 0, true, false));
		}
	}
}
