Package net.minecraft.item

Examples of net.minecraft.item.ItemSword


              }
              if (targetSlot == 0) {
                if (item instanceof ItemSword && !(oldItem.getItem() instanceof ItemSword)) {
                  shouldEquip = true;
                } else if (item instanceof ItemSword && oldItem.getItem() instanceof ItemSword) {
                  ItemSword newSword = (ItemSword) item;
                  ItemSword oldSword = (ItemSword) oldItem.getItem();

                  if (newSword.func_82803_g() == oldSword.func_82803_g()) {
                    shouldEquip = itemStack.getItemDamage() > oldItem.getItemDamage() || itemStack.hasTagCompound() && !oldItem.hasTagCompound();
                  } else {
                    shouldEquip = newSword.func_82803_g() > oldSword.func_82803_g();
                  }
                } else {
                  shouldEquip = false;
                }
              } else if (item instanceof ItemArmor && !(oldItem.getItem() instanceof ItemArmor)) {
View Full Code Here

TOP

Related Classes of net.minecraft.item.ItemSword

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.