mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-21 07:40:27 +00:00
Initial terrascript 2 commit
This commit is contained in:
@@ -7,15 +7,17 @@
|
||||
|
||||
package com.dfsek.terra.addon.terrascript.check;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.Type;
|
||||
|
||||
import net.jafama.FastMath;
|
||||
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.NoiseChunkGenerator3D;
|
||||
import com.dfsek.terra.addons.chunkgenerator.generation.math.samplers.SamplerProvider;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.ImplementationArguments;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Expression;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Scope;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.functions.Function;
|
||||
import com.dfsek.terra.addons.terrascript.script.TerraImplementationArguments;
|
||||
import com.dfsek.terra.addons.terrascript.legacy.parser.lang.ImplementationArguments;
|
||||
import com.dfsek.terra.addons.terrascript.legacy.parser.lang.Expression;
|
||||
import com.dfsek.terra.addons.terrascript.legacy.parser.lang.Scope;
|
||||
import com.dfsek.terra.addons.terrascript.legacy.parser.lang.functions.Function;
|
||||
import com.dfsek.terra.addons.terrascript.legacy.script.TerraImplementationArguments;
|
||||
import com.dfsek.terra.addons.terrascript.lexer.SourcePosition;
|
||||
import com.dfsek.terra.api.util.RotationUtil;
|
||||
import com.dfsek.terra.api.util.vector.Vector2;
|
||||
@@ -61,8 +63,8 @@ public class CheckFunction implements Function<String> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReturnType returnType() {
|
||||
return ReturnType.STRING;
|
||||
public Type returnType() {
|
||||
return Type.STRING;
|
||||
}
|
||||
|
||||
private String apply(Vector3 vector, WritableWorld world) {
|
||||
|
||||
@@ -9,8 +9,9 @@ package com.dfsek.terra.addon.terrascript.check;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.Expression;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.functions.FunctionBuilder;
|
||||
import com.dfsek.terra.addons.terrascript.Type;
|
||||
import com.dfsek.terra.addons.terrascript.legacy.parser.lang.Expression;
|
||||
import com.dfsek.terra.addons.terrascript.legacy.parser.lang.functions.FunctionBuilder;
|
||||
import com.dfsek.terra.addons.terrascript.lexer.SourcePosition;
|
||||
import com.dfsek.terra.api.Platform;
|
||||
|
||||
@@ -35,9 +36,9 @@ public class CheckFunctionBuilder implements FunctionBuilder<CheckFunction> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Expression.ReturnType getArgument(int position) {
|
||||
public Type getArgument(int position) {
|
||||
return switch(position) {
|
||||
case 0, 1, 2 -> Expression.ReturnType.NUMBER;
|
||||
case 0, 1, 2 -> Type.NUMBER;
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.dfsek.terra.addon.terrascript.check;
|
||||
|
||||
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
|
||||
import com.dfsek.terra.addons.terrascript.parser.lang.functions.FunctionBuilder;
|
||||
import com.dfsek.terra.addons.terrascript.legacy.parser.lang.functions.FunctionBuilder;
|
||||
import com.dfsek.terra.api.Platform;
|
||||
import com.dfsek.terra.api.addon.BaseAddon;
|
||||
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
|
||||
|
||||
Reference in New Issue
Block a user