mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-14 12:51:20 +00:00
Multi-version support for 1.13-1.16
This commit is contained in:
+5
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user