public static void openProducedItemDescription( final MouseEvent e, final AbstractCraftHarvestElement element, final Window window) { if (e.getButton() != 3) { return; } final AbstractReferenceItem referenceItem = ReferenceItemManager.getInstance().getReferenceItem(element.getItemId()); if (referenceItem == null) { return; } final Item item = new Item(referenceItem.getId()); item.initializeWithReferenceItem(referenceItem); final UIItemDetailMessage msg = new UIItemDetailMessage(); msg.setId(16415); msg.setParentWindowId((window == null) ? null : window.getElementMap().getId()); msg.setItem(item); Worker.getInstance().pushMessage(msg); }
public static void displayRecipesWithIngredient( final Event e, final AbstractCraftHarvestElement elem) { UICraftFrame.getInstance().createLinkedRecipes(elem.getItemId()); }