Fixed Drill attack damage

This commit is contained in:
Ellpeck 2016-03-19 11:42:11 +01:00
parent 0499fbdf7f
commit 5d34bce194

View file

@ -25,7 +25,6 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes;
@ -215,10 +214,14 @@ public class ItemDrill extends ItemEnergy{
return EnumRarity.EPIC;
}
@Override
public Multimap getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack){
Multimap map = super.getAttributeModifiers(slot, stack);
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack){
Multimap<String, AttributeModifier> map = super.getAttributeModifiers(slot, stack);
if(slot == EntityEquipmentSlot.MAINHAND){
map.put(SharedMonsterAttributes.ATTACK_DAMAGE.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Drill Modifier", this.getEnergyStored(stack) >= ENERGY_USE ? 8.0F : 0.1F, 0));
map.put(SharedMonsterAttributes.ATTACK_SPEED.getAttributeUnlocalizedName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Tool Modifier", -2.5F, 0));
}
return map;
}