public static void openProducedItemDescription( final MouseEvent e, final RecipeView recipeView, final Window window) { if (e.getButton() != 3) { return; } final UICraftItemDetailMessage msg = new UICraftItemDetailMessage(); msg.setParentWindowId((window == null) ? null : window.getElementMap().getId()); msg.setItem(recipeView); Worker.getInstance().pushMessage(msg); }
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); }