net.minecraft.item.ItemPickaxe Java Examples
The following examples show how to use
net.minecraft.item.ItemPickaxe.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExtraInventory.java From ForgeHax with MIT License | 6 votes |
private static int getItemValue(ItemStack stack, boolean loopGuard) { Item item = stack.getItem(); if (stack.isEmpty()) { return 0; } else if (item instanceof ItemArmor || item instanceof ItemPickaxe || item instanceof ItemAxe || item instanceof ItemSword || item instanceof ItemFood || item instanceof ItemArrow || Items.TOTEM_OF_UNDYING.equals(item)) { return 100 * stack.getCount(); // very important } else if (item instanceof ItemShulkerBox) { return 5 + (loopGuard ? 0 : Utils.getShulkerContents(stack) .stream() .mapToInt(ExtraInventory::getItemValueSafe) .sum()); } else { return 5; } }
Example #2
Source File: EnchantmentCorrupting.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
@Override public boolean canApply(ItemStack item) { if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemPrimalCrusher) return true; else return false; }
Example #3
Source File: EnchantmentConsuming.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
@Override public boolean canApply(ItemStack item) { if (item.getItem() instanceof ItemPickaxe || item.getItem() instanceof ItemSpade || item.getItem() instanceof ItemPrimalCrusher) return true; else return false; }