mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +01:00
Fixed booklet achievement info not showing the item if it has a wildcard value
This commit is contained in:
parent
93fcacdacb
commit
aa0ec6a575
2 changed files with 17 additions and 15 deletions
|
@ -117,21 +117,23 @@ public class BookletUtils{
|
||||||
for(BookletPage page : booklet.currentEntrySet.chapter.pages){
|
for(BookletPage page : booklet.currentEntrySet.chapter.pages){
|
||||||
if(page != null && page.getItemStacksForPage() != null){
|
if(page != null && page.getItemStacksForPage() != null){
|
||||||
for(ItemStack stack : page.getItemStacksForPage()){
|
for(ItemStack stack : page.getItemStacksForPage()){
|
||||||
for(Achievement achievement : InitAchievements.achievementList){
|
if(stack != null){
|
||||||
if(stack != null && achievement.theItemStack != null && achievement.theItemStack.isItemEqual(stack)){
|
for(Achievement achievement : InitAchievements.achievementList){
|
||||||
if(pre){
|
if(achievement.theItemStack != null && ItemUtil.areItemsEqual(stack, achievement.theItemStack, true)){
|
||||||
booklet.mc.getTextureManager().bindTexture(GuiBooklet.resLoc);
|
if(pre){
|
||||||
booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize+1, booklet.guiTop-18, 166, 154, 22, 21);
|
booklet.mc.getTextureManager().bindTexture(GuiBooklet.resLoc);
|
||||||
return;
|
booklet.drawTexturedModalRect(booklet.guiLeft+booklet.xSize+1, booklet.guiTop-18, 166, 154, 22, 21);
|
||||||
}
|
return;
|
||||||
else{
|
}
|
||||||
if(mouseX >= booklet.guiLeft+booklet.xSize+1 && mouseX < booklet.guiLeft+booklet.xSize+1+22 && mouseY >= booklet.guiTop-18 && mouseY < booklet.guiTop-18+21){
|
else{
|
||||||
if(infoList == null){
|
if(mouseX >= booklet.guiLeft+booklet.xSize+1 && mouseX < booklet.guiLeft+booklet.xSize+1+22 && mouseY >= booklet.guiTop-18 && mouseY < booklet.guiTop-18+21){
|
||||||
infoList = new ArrayList<String>();
|
if(infoList == null){
|
||||||
infoList.add(EnumChatFormatting.GOLD+"Achievements related to this chapter:");
|
infoList = new ArrayList<String>();
|
||||||
|
infoList.add(EnumChatFormatting.GOLD+"Achievements related to this chapter:");
|
||||||
|
}
|
||||||
|
infoList.add("-"+StringUtil.localize(achievement.statId));
|
||||||
|
infoList.add(EnumChatFormatting.GRAY+"("+achievement.getDescription()+")");
|
||||||
}
|
}
|
||||||
infoList.add("-"+StringUtil.localize(achievement.statId));
|
|
||||||
infoList.add(EnumChatFormatting.GRAY+"("+achievement.getDescription()+")");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -261,7 +261,7 @@ public class GuiBooklet extends GuiScreen{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"unchecked", "MismatchedQueryAndUpdateOfCollection"})
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void initGui(){
|
public void initGui(){
|
||||||
this.guiLeft = (this.width-this.xSize)/2;
|
this.guiLeft = (this.width-this.xSize)/2;
|
||||||
|
|
Loading…
Reference in a new issue