Multi-version support for 1.13-1.16

This commit is contained in:
dfsek
2021-01-06 10:57:34 -07:00
parent 25ae2b3c9b
commit 512edae9c6
7 changed files with 111 additions and 60 deletions
@@ -25,7 +25,11 @@ public class BlockFunction implements Function<Void> {
this.position = position;
if(!(data instanceof ConstantExpression)) throw new ParseException("Block data must be constant", data.getPosition());
this.data = main.getWorldHandle().createBlockData(((ConstantExpression<String>) data).getConstant());
try {
this.data = main.getWorldHandle().createBlockData(((ConstantExpression<String>) data).getConstant());
} catch(IllegalArgumentException e) {
throw new ParseException("Could not parse block data", data.getPosition(), e);
}
this.x = x;
this.y = y;
this.z = z;