mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
made the infused blade also have a special effect: slowness!
This commit is contained in:
parent
21c33fc856
commit
f7c817a5c9
3 changed files with 12 additions and 2 deletions
|
@ -90,7 +90,7 @@ public final class NaturesAura {
|
|||
Compat.postInit();
|
||||
proxy.postInit(event);
|
||||
|
||||
if (ModConfig.general.removeDragonBreathContainerItem) {
|
||||
if (ModConfig.enabledFeatures.removeDragonBreathContainerItem) {
|
||||
Items.DRAGON_BREATH.setContainerItem(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,12 @@ import de.ellpeck.naturesaura.items.ModItems;
|
|||
import de.ellpeck.naturesaura.reg.IModItem;
|
||||
import de.ellpeck.naturesaura.reg.IModelProvider;
|
||||
import de.ellpeck.naturesaura.reg.ModRegistry;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraftforge.common.capabilities.ICapabilityProvider;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
|
@ -49,6 +52,13 @@ public class ItemSwordNA extends ItemSword implements IModItem, IModelProvider {
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker) {
|
||||
if (this == ModItems.INFUSED_SWORD)
|
||||
target.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 60, 2));
|
||||
return super.hitEntity(stack, target, attacker);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ICapabilityProvider initCapabilities(ItemStack stack, @Nullable NBTTagCompound nbt) {
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
"recipe": "naturesaura:infused_hoe"
|
||||
}, {
|
||||
"type": "crafting",
|
||||
"text": "The $(item)Botanist's Blade$(), while not having an inherent special feature, will still prove useful in slaying enemies of any sort.",
|
||||
"text": "The $(item)Botanist's Blade$() is a good way of dealing with monsters: It will cause any mob you hit to be $(thing)slowed down$() for a couple of seconds, making them an easier target.",
|
||||
"recipe": "naturesaura:infused_sword"
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue