mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-23 21:39:40 +00:00
- Added /mt blocks and /mt entities commands
- Further preparation of event manager for the event update - Can now request all blocks and entities using the global game variable - Improved automatic handling of version numbers
This commit is contained in:
1 parent
b50a88227b
commit
56b8c9355c
81 files changed
+751
-506
No files matched your search
@@ -42,7 +42,7 @@ public class StatementForeach extends Statement {
|
||||
int[] localVariables = new int[varnames.length];
|
||||
for (int i = 0; i < localVariables.length; i++) {
|
||||
SymbolLocal localVar = new SymbolLocal(iterator.getType(i), true);
|
||||
local.putValue(varnames[i], localVar);
|
||||
local.putValue(varnames[i], localVar, getPosition());
|
||||
localVariables[i] = local.getLocal(localVar);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,10 @@ public class StatementIf extends Statement {
|
||||
public void compile(IEnvironmentMethod environment) {
|
||||
environment.getOutput().position(getPosition());
|
||||
|
||||
Expression cCondition = condition.compile(environment, ZenType.BOOL).eval(environment);
|
||||
Expression cCondition = condition.compile(environment, ZenType.BOOL)
|
||||
.eval(environment)
|
||||
.cast(getPosition(), environment, ZenType.BOOL);
|
||||
|
||||
ZenType expressionType = cCondition.getType();
|
||||
if (expressionType.canCastImplicit(ZenType.BOOL, environment)) {
|
||||
Label labelEnd = new Label();
|
||||
|
||||
@@ -43,7 +43,7 @@ public class StatementVar extends Statement {
|
||||
ZenType cType = type == null ? (cInitializer == null ? ZenTypeAny.INSTANCE : cInitializer.getType()) : type;
|
||||
SymbolLocal symbol = new SymbolLocal(cType, isFinal);
|
||||
|
||||
environment.putValue(name, symbol);
|
||||
environment.putValue(name, symbol, getPosition());
|
||||
|
||||
if (cInitializer != null) {
|
||||
cInitializer.compile(true, environment);
|
||||
|
||||
Reference in new issue
Block a user