Removed needing a buffer chest for the new item routing ritual - working on a few odd quirks, however.

This commit is contained in:
WayofTime 2015-01-30 18:53:52 -05:00
parent 2888fcfe07
commit 539bb564fa
12 changed files with 437 additions and 188 deletions

View file

@ -1508,8 +1508,8 @@ public class AlchemicalWizardry
String strLine;
//Read File Line By Line
int maxWidth = 25;
int maxLines = 16;
int defMaxLines = 16;
int maxLines = defMaxLines;
int currentPage = 0;
@ -1545,6 +1545,31 @@ public class AlchemicalWizardry
String title = strLine.replaceFirst("//TITLE ", " ").trim();
currentTitle = "aw.entry." + title;
continue;
}else if(strLine.startsWith("//SPECIAL "))
{
if(strings[currentPage].isEmpty())
{
String lines = strLine.replaceFirst("//SPECIAL ", "");
Integer ln = Integer.decode(lines);
if(ln != null)
{
maxLines = ln;
}
}else
{
String[] newStrings = new String[currentPage + 1 + 1]; //Just to show that it is increasing
for(int i=0; i<strings.length; i++)
{
newStrings[i] = strings[i];
}
currentPage++;
newStrings[currentPage - 1] = currentTitle + "." + pageIndex + "=" + newStrings[currentPage - 1];
newStrings[currentPage] = "";
strings = newStrings;
}
continue;
}
@ -1568,12 +1593,6 @@ public class AlchemicalWizardry
word = word.replace('\t', ' ');
List list = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(strings[currentPage] + " " + word, 110);
// if(currentWidth != 0 && currentWidth + length + 1 > maxWidth)
// {
// currentLine++;
// currentWidth = 0;
// }
//if(currentLine > maxLines)
if(list.size() > maxLines)
{
changePage = true;
@ -1593,7 +1612,9 @@ public class AlchemicalWizardry
strings = newStrings;
pageIndex++;
maxLines = defMaxLines;
changePage = false;
}else
{