Another easter egg to keep up with version parity.

This commit is contained in:
bconlon 2020-07-19 22:12:55 -07:00
parent 2c42ffab0b
commit 6fc9a898c2

View file

@ -1,5 +1,7 @@
package com.legacy.aether.items.weapons;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
@ -23,7 +25,7 @@ public class ItemLightningKnife extends Item {
@Override
public ItemStack onItemRightClick(ItemStack heldItem, World worldIn, EntityPlayer playerIn) {
if (!playerIn.capabilities.isCreativeMode) {
if (!playerIn.capabilities.isCreativeMode && EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, heldItem) == 0) {
--heldItem.stackSize;
}