@Nonnull @Override public Map<Object, Object> getMeta(@Nonnull ItemStack stack) { Item item = stack.getItem(); if (!(item instanceof IToolPart)) return Collections.emptyMap(); IToolPart toolPart = (IToolPart) item; Map<Object, Object> out = Maps.newHashMap(); out.put("cost", toolPart.getCost()); return out; } }
if(part instanceof IToolPart && matchAmount < ((IToolPart) part).getCost()) { amount = TextFormatting.DARK_RED + amount + TextFormatting.RESET;
Item part = getPartFromTag(stack); if(part != null && part instanceof IToolPart) { float cost = ((IToolPart) part).getCost() / (float) Material.VALUE_Ingot; tooltip.add(Util.translateFormatted("tooltip.pattern.cost", Util.df.format(cost)));
if(toolPart instanceof MaterialItem) { ItemStack stack = toolPart.getItemstackWithMaterial(TinkerMaterials.stone); TinkerRegistry.registerMelting(stack, TinkerFluids.searedStone, (toolPart.getCost() * Material.VALUE_SearedMaterial) / Material.VALUE_Ingot);