From af2ef375547c212ae606fe395e7ffad8162143f1 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 5 Aug 2016 13:38:13 +0200 Subject: [PATCH] Made the booklet understand achievements properly --- .../mod/booklet/BookletUtils.java | 9 +++++---- .../gui/container/tab_actuallyadditions.png | Bin 1089 -> 0 bytes 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 src/main/resources/assets/minecraft/textures/gui/container/tab_actuallyadditions.png diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java index 7edb72207..8f4ade0ee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/BookletUtils.java @@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.api.booklet.BookletPage; import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.api.booklet.IBookletEntry; import de.ellpeck.actuallyadditions.mod.achievement.InitAchievements; +import de.ellpeck.actuallyadditions.mod.achievement.TheAchievements; import de.ellpeck.actuallyadditions.mod.booklet.button.BookmarkButton; import de.ellpeck.actuallyadditions.mod.booklet.button.IndexButton; import de.ellpeck.actuallyadditions.mod.booklet.button.TexturedButton; @@ -138,8 +139,8 @@ public final class BookletUtils{ if(page != null && page.getItemStacksForPage() != null){ for(ItemStack stack : page.getItemStacksForPage()){ if(stack != null){ - for(Achievement achievement : InitAchievements.ACHIEVEMENT_LIST){ - if(achievement.theItemStack != null && ItemUtil.areItemsEqual(stack, achievement.theItemStack, true)){ + for(TheAchievements achievement : TheAchievements.values()){ + if(ItemUtil.contains(achievement.itemsToBeGotten, stack, true)){ if(pre){ booklet.mc.getTextureManager().bindTexture(GuiBooklet.RES_LOC); booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize+1, booklet.guiTop-18, 166, 154, 22, 21); @@ -151,8 +152,8 @@ public final class BookletUtils{ infoList = new ArrayList(); infoList.add(TextFormatting.GOLD+"Achievements related to this chapter:"); } - infoList.add("-"+StringUtil.localize(achievement.statId)); - infoList.add(TextFormatting.GRAY+"("+achievement.getDescription()+")"); + infoList.add("-"+StringUtil.localize(achievement.chieve.statId)); + infoList.add(TextFormatting.GRAY+"("+achievement.chieve.getDescription()+")"); } } } diff --git a/src/main/resources/assets/minecraft/textures/gui/container/tab_actuallyadditions.png b/src/main/resources/assets/minecraft/textures/gui/container/tab_actuallyadditions.png deleted file mode 100644 index cc250e55833bd9aea93e175d5728169b162f12a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1089 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G$6&6|H(?D8gCb z5n0T@z;_UY8Fx&~e#^kX{Ls_IF{I+w+q(w~X9oy0Jgk+xdc<*yqw=hU{Gv>y3pUN; zmrQaGblW&@qszD7c{|s*bJQs(t@qxun(^n9cyWib<(xA2;&;EE-x6N0`8Ank)6a*G z)HkO_2HpQV?KMM;o_IQI=A84-J33}8)681?@*NAG{QrlK>i@7LS;t;?z5ku>$Th|X zABCs9?RorS_T{$oAYZUB2rxJx7!7kjPj2YlwXVBRMwWv`Ve!8Ae`jd@&u8#k9{gEc zvQ6<>rP=X0?ayQW8(mO-{&cM+(}#Zcbw@4w49{=2d}d?w{95d_^yj~pF0!xW;9z3l zU{GLaU|_(`_^|2SJ7$Tthu&dvGn4t&FL!ZSyVdQ;TYLUIg#pz-^Cnpzd_9G-i*su z$K4dL1t8oYaG*{C+A}BiOro?I)6C7?mS#-0FZmK`nWJu0B>TOVk#4kMMvnlvejo!B zJ08c}6pG6X+jH;Sy-YyWw@zaBE)m+|0xKkgU?*@nj