- Continued writing on the IC2 integration code

- Implemented advanced recipes on <*> values
- Removed unused ZenScript classes
- Continued work on any values
- Moved documentation generation to buildSrc
- Started work on a jar merging task
- Added toString implementation to ingredients
- Added stack count to ICraftingInventory
- Fixed imports
- Added logCommand to the logger to log command output
- Implemented memory script provider to load scripts received from the server
- Added exception handling for script execution
- First attempt at creating a transformer to generate a list of ZenClass and ZenExpansion classes
- Added console commands (reload, names, liquids, inventory, hand, oredict)
- Added general logic
- Fixed item ingredients for wildcard sizes
- Implemented selective recipe removal
- Fixed null recipe results
- Started implementation of player-specific recipes
- Removed redundant IC2 mod copy
- Other minor fixes
This commit is contained in:
Stan Hebben committed 2014-06-20 14:13:55 +02:00
1 parent f3ea7f7831
commit 489347558f
124 files changed
+3942 -419

No files matched your search

@@ -7,6 +7,9 @@
package stanhebben.zenscript.util;
import java.util.ArrayList;
import java.util.List;
import stanhebben.zenscript.expression.Expression;
import stanhebben.zenscript.type.natives.JavaMethod;
/**
*
@@ -42,6 +45,39 @@ public class StringUtil {
}
return result.toString();
}
/**
* If a set of methods is available and none matches, this method creates
* a suitable message.
*
* @param methods matching methods
* @param arguments calling arguments
* @return return value
*/
public static String methodMatchingError(List<JavaMethod> methods, Expression... arguments) {
if (methods.isEmpty()) {
return "no method with that name available";
} else {
StringBuilder message = new StringBuilder();
if (methods.size() == 1) {
message.append("a method ");
} else {
message.append(methods.size()).append(" methods ");
}
message.append("available but none matches the parameters (");
boolean first = true;
for (Expression value : arguments) {
if (first) {
first = false;
} else {
message.append(", ");
}
message.append(value.getType().toString());
}
message.append(")");
return message.toString();
}
}
/**
* Splits a string in parts, given a specified delimiter.