Java 类net.minecraft.client.gui.achievement.GuiAchievement 实例源码

项目:Progression    文件:AchievementHelper.java   
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");
}
项目:Progression    文件:PacketCompleted.java   
@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");
    }
}
项目:Zombe-Modpack    文件:ZWrapper.java   
public static GuiAchievement getAchievementGUI() {
    return getMinecraft().guiAchievement;
}