public static void display(final ItemStack icon, final String description) { GuiAchievement gui = Minecraft.getMinecraft().guiAchievement; gui.displayUnformattedAchievement(new DummyAchievement(new Criteria(null, null) { @Override public ItemStack getIcon() { return icon; } }) { @Override @SideOnly(Side.CLIENT) public String getDescription() { return description; } }); ReflectionHelper.setPrivateValue(GuiAchievement.class, gui, Minecraft.getSystemTime(), "notificationTime", "field_146263_l"); ReflectionHelper.setPrivateValue(GuiAchievement.class, gui, false, "permanentNotification", "field_146262_n"); }
@Override public void handlePacket(EntityPlayer player) { if (criteria != null) { GuiAchievement gui = Minecraft.getMinecraft().guiAchievement; gui.displayUnformattedAchievement(new DummyAchievement(criteria)); ReflectionHelper.setPrivateValue(GuiAchievement.class, gui, Minecraft.getSystemTime(), "notificationTime", "field_146263_l"); ReflectionHelper.setPrivateValue(GuiAchievement.class, gui, false, "permanentNotification", "field_146262_n"); } }
public static GuiAchievement getAchievementGUI() { return getMinecraft().guiAchievement; }