content: package com.aizistral.enigmaticlegacy.items;
  
  import java.util.List;
  
  import com.aizistral.enigmaticlegacy.EnigmaticLegacy;
  import com.aizistral.enigmaticlegacy.api.items.ITaintable;
  import com.aizistral.enigmaticlegacy.helpers.ItemLoreHelper;
  import com.aizistral.enigmaticlegacy.items.generic.ItemBase;
  
  import net.minecraft.network.chat.Component;
  import net.minecraft.resources.ResourceLocation;
  import net.minecraft.world.entity.Entity;
  import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.Rarity;
  import net.minecraft.world.item.TooltipFlag;
  import net.minecraft.world.item.Vanishable;
  import net.minecraft.world.level.Level;
  
  public class EarthHeart extends ItemBase implements ITaintable, Vanishable {
  
  	public EarthHeart() {
  		super(ItemBase.getDefaultProperties().rarity(Rarity.UNCOMMON).stacksTo(1));
  	}
  
  	@Override
  	public void inventoryTick(ItemStack stack, Level worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
  		if (entityIn instanceof Player && !entityIn.level().isClientSide) {
  			Player player = (Player) entityIn;
  			this.handleTaintable(stack, player);
  		}
  	}
  
  	@Override
  	public void appendHoverText(ItemStack stack, Level worldIn, List<Component> tooltip, TooltipFlag flagIn) {
  		if (this.isTainted(stack)) {
  			ItemLoreHelper.addLocalizedString(tooltip, "tooltip.enigmaticlegacy.tainted1");
  		}
  	}
  
  }
  