package net.darkhax.darkutils.items;

import java.util.List;

import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;

import net.darkhax.darkutils.DarkUtils;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class ItemSourcedSword extends ItemSword {
    
    public DamageSource source;
    public EnumChatFormatting displayColor;
    public float effectChance;
    
    public ItemSourcedSword(ToolMaterial material, DamageSource source) {
        
        this(material, source, EnumChatFormatting.WHITE, 1f);
    }
    
    public ItemSourcedSword(ToolMaterial material, DamageSource source, float effectChance) {
        
        this(material, source, EnumChatFormatting.WHITE, effectChance);
    }
    
    public ItemSourcedSword(ToolMaterial material, DamageSource source, EnumChatFormatting displayColor, float effectChance) {
        
        super(material);
        this.setCreativeTab(DarkUtils.tab);
        this.source = source;
        this.displayColor = displayColor;
        this.effectChance = effectChance;
    }
    
    @Override
    public Multimap<String, AttributeModifier> getItemAttributeModifiers () {
        
        return HashMultimap.<String, AttributeModifier> create();
    }
    
    @Override
    @SideOnly(Side.CLIENT)
    public void addInformation (ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
        
        tooltip.add(this.displayColor + "+" + this.attackDamage + " " + StatCollector.translateToLocal("tooltip.darkutils.damagetype." + source.damageType));
    }
}
@@ -302,24 +302,63 @@
 ityPlayer;%0D%0A
+import net.minecraft.item.EnumRarity;%0D%0A
 import net.m
@@ -1528,24 +1528,152 @@
  @Override%0D%0A
+    public EnumRarity getRarity (ItemStack itemstack) %7B%0D%0A        %0D%0A        return EnumRarity.RARE;%0D%0A    %7D%0D%0A    %0D%0A    @Override%0D%0A
     public M

Set rarity for sourced swords to Rare