Added Effigy of Wrath
parent
91b9e6d417
commit
9541283dae
@ -0,0 +1,38 @@
|
|||||||
|
package com.zivilon.cinder_loe.mixins;
|
||||||
|
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Overwrite;
|
||||||
|
|
||||||
|
import com.zivilon.cinder_loe.items.LoEGreatSword;
|
||||||
|
import lotr.common.item.LOTRItemBattleaxe;
|
||||||
|
import lotr.common.item.LOTRItemHammer;
|
||||||
|
import lotr.common.item.LOTRItemBalrogWhip;
|
||||||
|
import lotr.common.enchant.LOTREnchantment;
|
||||||
|
import lotr.common.enchant.LOTREnchantmentType;
|
||||||
|
import lotr.common.enchant.LOTREnchantmentHelper;
|
||||||
|
import lotr.common.enchant.LOTREnchantmentWeaponSpecial;
|
||||||
|
import lotr.common.item.LOTRWeaponStats;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemArmor;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
@Mixin(LOTREnchantmentWeaponSpecial.class)
|
||||||
|
public abstract class MixinLOTREnchantmentWeaponSpecial extends LOTREnchantment {
|
||||||
|
|
||||||
|
public MixinLOTREnchantmentWeaponSpecial(String s, LOTREnchantmentType type) {
|
||||||
|
super(s, type);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Overwrite(remap = false)
|
||||||
|
public boolean canApply(ItemStack itemstack, boolean considering) {
|
||||||
|
if (super.canApply(itemstack, considering)) {
|
||||||
|
Item item = itemstack.getItem();
|
||||||
|
if (item instanceof LOTRItemBalrogWhip && (this == LOTREnchantment.fire || this == LOTREnchantment.chill))
|
||||||
|
return false;
|
||||||
|
if (this == LOTREnchantment.getEnchantmentByName("wrath"))
|
||||||
|
return (item instanceof LoEGreatSword || item instanceof LOTRItemBattleaxe || item instanceof LOTRItemHammer);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 949 B |
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"animation":{"frametime":3}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue