Navigation Menu

Skip to content

Commit

Permalink
Fixed crashes with shaped recipes when recipes didn't take up the ent…
Browse files Browse the repository at this point in the history
…ire workbench.
  • Loading branch information
GuntherDW committed Jun 20, 2011
1 parent 325f12f commit b44e5eb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/SnowBallShapedRecipe.java
Expand Up @@ -113,14 +113,15 @@ public Object[] generateRecipeLine() {
lines.add(line);
}
if(cols==1) {
for(int col=0; col<3; col++) {
for(int col=0; col<lines.size(); col++) {
String lin = lines.get(col).trim();
lines.set(col, lin);
}
} else if(cols==2) {
boolean trimmode = (biggestline.charAt(2) == ' ');
for(int col=0; col < 3; col++) {
for(int col=0; col < lines.size(); col++) {
String lin = lines.get(col);
// System.out.println(col+": "+lin);
if(trimmode) {
lin = lin.substring(0, 2);
} else {
Expand All @@ -132,7 +133,7 @@ public Object[] generateRecipeLine() {
objects.addAll(lines);
objects.addAll(inglines);
/* for(String s : lines) {
System.out.println("line:"+s);
System.out.println("line:"+s.replace(' ', '.'));
} */
return objects.toArray();
}
Expand Down

0 comments on commit b44e5eb

Please sign in to comment.