mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-18 19:29:08 +00:00
- Added toString to the data values
- Added getPlayer to crafting inventory - Added crafting inventory to recipe function - Removed some print statements - Renamed the global minetweaker variable to tweaker - Bumped forge version to 1121 due to ore dictionary changes - Added bracket handler for ore entries - Enabled withTag(null) - Fixed issues with the new ore dictionary implementation in Forge 1113+ - Fixed bug in Ore recipe conversion - Fixed import errors not being detected and reported properly - Fixed nested NBT tags not being converted properly - Fixed something in any type implementation - Added commas in function name generation - Added class registries for IC2 and NEI integration
This commit is contained in:
1 parent
2de467d7d8
commit
3827eba3e2
39 files changed
+301
-50
No files matched your search
@@ -32,6 +32,8 @@ public class ExpressionFunction extends Expression {
|
||||
public ExpressionFunction(ZenPosition position, List<ParsedFunctionArgument> arguments, ZenType returnType, Statement[] statements) {
|
||||
super(position);
|
||||
|
||||
System.out.println("Function expression: " + arguments.size() + " arguments");
|
||||
|
||||
this.arguments = arguments;
|
||||
this.returnType = returnType;
|
||||
this.statements = statements;
|
||||
|
||||
@@ -66,6 +66,8 @@ public class ExpressionTable extends Expression {
|
||||
|
||||
@Override
|
||||
public Expression cast(ZenPosition position, IEnvironmentGlobal environment, ZenType type) {
|
||||
System.out.println("Casting Table to " + type.getName());
|
||||
|
||||
if (type instanceof ZenTypeAssociative) {
|
||||
ZenTypeAssociative keyType = (ZenTypeAssociative) type;
|
||||
Expression[] newKeys = new Expression[keys.length];
|
||||
@@ -77,8 +79,11 @@ public class ExpressionTable extends Expression {
|
||||
}
|
||||
|
||||
return new ExpressionTable(getPosition(), newKeys, newValues, type);
|
||||
} else if (this.type.canCastImplicit(type, environment)) {
|
||||
return this.type.cast(position, environment, this, type);
|
||||
} else {
|
||||
return super.cast(position, environment, type);
|
||||
environment.error(position, "cannot cast " + this.type + " to " + type);
|
||||
return new ExpressionInvalid(position, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user