From 36958ae8afcda1cf8426512f4d143316ec19023a Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 20 Aug 2015 18:34:32 +0200 Subject: [PATCH] Gave the Knife some Attack Damage --- .../ellpeck/actuallyadditions/items/ItemDrill.java | 2 +- .../ellpeck/actuallyadditions/items/ItemKnife.java | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java b/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java index 636238022..c31dc8160 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java @@ -425,7 +425,7 @@ public class ItemDrill extends ItemEnergy implements INameableItem{ @Override public Multimap getAttributeModifiers(ItemStack stack){ Multimap map = super.getAttributeModifiers(stack); - map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", this.getEnergyStored(stack) >= ConfigIntValues.DRILL_ENERGY_USE.getValue() ? 8.0F : 0.0F, 0)); + map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Drill Modifier", this.getEnergyStored(stack) >= ConfigIntValues.DRILL_ENERGY_USE.getValue() ? 8.0F : 0.0F, 0)); return map; } } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java index 01af88604..d9465f4e0 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java @@ -1,10 +1,13 @@ package ellpeck.actuallyadditions.items; +import com.google.common.collect.Multimap; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.util.*; import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.SharedMonsterAttributes; +import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; @@ -71,4 +74,12 @@ public class ItemKnife extends Item implements INameableItem{ public String getName(){ return "itemKnife"; } + + @SuppressWarnings("unchecked") + @Override + public Multimap getAttributeModifiers(ItemStack stack){ + Multimap map = super.getAttributeModifiers(stack); + map.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Knife Modifier", 3, 0)); + return map; + } }