mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-08-30 05:40:34 +00:00
add primitive overrides to TerraScript items
This commit is contained in:
+8
@@ -13,5 +13,13 @@ import com.dfsek.terra.addons.terrascript.tokenizer.Position;
|
|||||||
public interface Item<T> {
|
public interface Item<T> {
|
||||||
T apply(ImplementationArguments implementationArguments, Scope scope);
|
T apply(ImplementationArguments implementationArguments, Scope scope);
|
||||||
|
|
||||||
|
default double applyDouble(ImplementationArguments implementationArguments, Scope scope) {
|
||||||
|
throw new UnsupportedOperationException("Cannot apply " + this + " as double");
|
||||||
|
}
|
||||||
|
|
||||||
|
default boolean applyBoolean(ImplementationArguments implementationArguments, Scope scope) {
|
||||||
|
throw new UnsupportedOperationException("Cannot apply " + this + " as double");
|
||||||
|
}
|
||||||
|
|
||||||
Position getPosition();
|
Position getPosition();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user