clarify laziness of blocks and added more care to context execution

This commit is contained in:
gnembon committed 2019-11-09 23:12:05 -04:00
1 parent 7bcdd0ab72
commit bcff4fbbc4
5 files changed
+45 -22

No files matched your search

@@ -144,8 +144,6 @@ public class BlockValue extends Value
}
if (v1 instanceof BlockValue)
{
((BlockValue) v1).getBlockState();
((BlockValue) v1).getData();
return new LocatorResult(((BlockValue) v1), 1+offset);
}
if (v1 instanceof ListValue)
@@ -256,7 +254,7 @@ public class BlockValue extends Value
@Override
public Value clone()
{
return new BlockValue(blockState, world, pos);
return new BlockValue(blockState, world, pos, data);
}
@Override
@@ -48,6 +48,7 @@ public abstract class Value implements Comparable<Value>, Cloneable
{
// should not happen
e.printStackTrace();
throw new InternalExpressionException("Variable of type "+getTypeString()+" is not cloneable. Tell gnembon about it, this shoudn't happen");
}
copy.boundVariable = var;
return copy;