Fix 2.6.4 Skript support & fix compilation
This commit is contained in:
Regular → Executable
+5
-12
@@ -1,22 +1,19 @@
|
||||
package io.github.bi0qaw.biosphere;
|
||||
|
||||
import io.github.bi0qaw.biosphere.expression.*;
|
||||
import ch.njol.skript.Skript;
|
||||
import ch.njol.skript.SkriptAddon;
|
||||
import ch.njol.skript.lang.ExpressionType;
|
||||
import io.github.bi0qaw.biosphere.expression.*;
|
||||
import io.github.bi0qaw.biosphere.type.FrameType;
|
||||
import io.github.bi0qaw.biosphere.util.Frame;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.type.FrameType;
|
||||
import io.github.bi0qaw.biosphere.util.Frame;
|
||||
|
||||
public class Biosphere extends JavaPlugin {
|
||||
|
||||
private static Biosphere plugin;
|
||||
|
||||
public void onEnable(){
|
||||
|
||||
plugin = this;
|
||||
Skript.registerAddon(this);
|
||||
SkriptAddon addon = Skript.registerAddon(this);
|
||||
|
||||
new FrameType();
|
||||
|
||||
@@ -74,8 +71,4 @@ public class Biosphere extends JavaPlugin {
|
||||
Skript.registerExpression(ExprVectorSphere.class, Vector.class, ExpressionType.SIMPLE, "[vector ]sphere with radius %number%(,| and) density %number%");
|
||||
Skript.registerExpression(ExprVectorSphereRand.class, Vector.class, ExpressionType.SIMPLE, "[vector ]random sphere with radius %number%(,| and) density %number%");
|
||||
}
|
||||
|
||||
public static Biosphere getPlugin() {
|
||||
return plugin;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
Regular → Executable
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -3,18 +3,15 @@ package io.github.bi0qaw.biosphere.expression;
|
||||
import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
import ch.njol.util.Kleenean;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Location Cube Outline")
|
||||
@Description("Creates a list of locations in the shape of a cube, including the corners and vertices of the cube. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.VectorMath;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -3,21 +3,14 @@ package io.github.bi0qaw.biosphere.expression;
|
||||
import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
import ch.njol.util.Kleenean;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Location Line")
|
||||
@Description("Creates a list of locations in the shape of a line. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
@@ -9,8 +9,7 @@ import io.github.bi0qaw.biosphere.util.VectorMath;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
|
||||
@@ -3,17 +3,15 @@ package io.github.bi0qaw.biosphere.expression;
|
||||
import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
import ch.njol.util.Kleenean;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Location Link All")
|
||||
@Description("Creates a list of locations linking multiple locations with lines. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -6,7 +6,7 @@ import ch.njol.skript.doc.Name;
|
||||
import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
Regular → Executable
Regular → Executable
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser;
|
||||
|
||||
@@ -7,7 +7,7 @@ import io.github.bi0qaw.biosphere.util.LocationLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser;
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -9,7 +9,7 @@ import io.github.bi0qaw.biosphere.util.VectorMath;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -8,7 +8,7 @@ import io.github.bi0qaw.biosphere.util.TrigLib;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
@@ -4,7 +4,7 @@ import ch.njol.skript.doc.Description;
|
||||
import ch.njol.skript.doc.Examples;
|
||||
import ch.njol.skript.doc.Name;
|
||||
import org.bukkit.event.Event;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser.ParseResult;
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Circle")
|
||||
@Description("Creates a list of vectors in the shape of a circle")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Cube")
|
||||
@Description("Creates a list of vectors in the shape of a cube (only the corners!). To get a list of locations including the cube edges use cube outline.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Cube Outline")
|
||||
@Description("Creates a list of vectors in the shape of a polygon including corners and edges. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Helix")
|
||||
@Description("Creates a list of vectors in the shape of a helix. The step parameter determines how many blocks the helix will go upwards in one rotation. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
Regular → Executable
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Line")
|
||||
@Description("Creates a list of vectors in the shape of a line. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
Regular → Executable
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Link All")
|
||||
@Description("Creates a list of vectors linking multiple vectors with lines. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
Regular → Executable
+2
-2
@@ -7,11 +7,11 @@ import ch.njol.skript.lang.Expression;
|
||||
import ch.njol.skript.lang.SkriptParser;
|
||||
import ch.njol.skript.lang.util.SimpleExpression;
|
||||
import ch.njol.util.Kleenean;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Midpoint")
|
||||
@Description("Gives the midpoint between vectors.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Offset")
|
||||
@Description("Offset vectors by other vectors.")
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Polygon")
|
||||
@Description("Creates a list of vectors in the shape of a polygon (only the corners!). If you want a polygon with edges use polygon outline.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Polygon Outline")
|
||||
@Description("Creates a list of vectors in the shape of a polygon including corners and edges. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Reflection")
|
||||
@Description("Mirrors vectors in another vector. The direction parameter applies an additional scaling for each axis.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -12,7 +12,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Rotate")
|
||||
@Description("Rotates vectors around a rotation center and a rotation axis by an angle.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Rotate XYZ")
|
||||
@Description("Rotates vectors around a rotation center and rotation axis by an angle.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Scale")
|
||||
@Description("Scales vectors by a scaling factor and an optional direction. The direction parameter adds an additional scaling along the x-, y- and z-axis.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Sphere")
|
||||
@Description("Creates a list of vectors in the shape of a sphere. The density value controls the amount of points. A higher number increases the amount of points. A density of 1 corresponds to 1 point per block.")
|
||||
|
||||
Regular → Executable
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.Event;
|
||||
import org.bukkit.util.Vector;
|
||||
import io.github.bi0qaw.biosphere.util.VectorLib;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@Name("Vector Random Sphere")
|
||||
@Description("Creates a list of vectors in the shape of a sphere. The locations are randomly distributed on the sphere surface.")
|
||||
|
||||
Regular → Executable
+9
-16
@@ -11,7 +11,6 @@ import ch.njol.yggdrasil.Fields;
|
||||
import io.github.bi0qaw.biosphere.util.Frame;
|
||||
import io.github.bi0qaw.biosphere.util.VectorMath;
|
||||
|
||||
import java.io.NotSerializableException;
|
||||
import java.io.StreamCorruptedException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -20,15 +19,15 @@ public class FrameType {
|
||||
public FrameType(){}
|
||||
|
||||
static {
|
||||
Classes.registerClass(new ClassInfo<Frame>(Frame.class, "frame")
|
||||
Classes.registerClass(new ClassInfo<>(Frame.class, "frame")
|
||||
.user("frames?")
|
||||
.name("Frame")
|
||||
.description("Reference frame that can be used to get vectors relative to some direction.")
|
||||
.usage(new String[]{"frame of %entity%", "frame with yaw %number% and pitch %number%"})
|
||||
.examples(new String[]{"set {_frame} to frame of player", "set {_circle::*} to circle with radius 1 and density 5",
|
||||
"show happy villager at player's head offset by {_circle::*} in frame of player",
|
||||
"#shows a particle circle around the player's head with the yaw and pitch of the player"})
|
||||
.defaultExpression(new EventValueExpression<Frame>(Frame.class))
|
||||
.usage("frame of %entity%", "frame with yaw %number% and pitch %number%")
|
||||
.examples("set {_frame} to frame of player", "set {_circle::*} to circle with radius 1 and density 5",
|
||||
"show happy villager at player's head offset by {_circle::*} in frame of player",
|
||||
"#shows a particle circle around the player's head with the yaw and pitch of the player")
|
||||
.defaultExpression(new EventValueExpression<>(Frame.class))
|
||||
.parser(new Parser<Frame>() {
|
||||
|
||||
private final Pattern parsePattern = Pattern.compile("frame:(-?\\d+(\\.\\d+)?),(-?\\d+(\\.\\d+)?)"
|
||||
@@ -63,12 +62,6 @@ public class FrameType {
|
||||
float pitch = VectorMath.skriptPitch(f.getPitch());
|
||||
return "frame:" + Skript.toString(yaw) + "," + Skript.toString(pitch);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getVariableNamePattern() {
|
||||
return "frame:(-?\\d+(\\.\\d+)?),(-?\\d+(\\.\\d+)?)";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDebugMessage(Frame f) {
|
||||
float yaw = VectorMath.skriptYaw(f.getYaw());
|
||||
@@ -78,7 +71,7 @@ public class FrameType {
|
||||
})
|
||||
.serializer(new Serializer<Frame>() {
|
||||
@Override
|
||||
public Fields serialize(Frame f) throws NotSerializableException {
|
||||
public Fields serialize(Frame f) {
|
||||
final Fields fields = new Fields();
|
||||
float yaw = VectorMath.skriptYaw(f.getYaw());
|
||||
float pitch = VectorMath.skriptPitch(f.getPitch());
|
||||
@@ -88,12 +81,12 @@ public class FrameType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserialize(Frame f, Fields fields) throws StreamCorruptedException, NotSerializableException {
|
||||
public void deserialize(Frame f, Fields fields) {
|
||||
assert false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Frame deserialize(Fields f) throws StreamCorruptedException, NotSerializableException {
|
||||
protected Frame deserialize(Fields f) throws StreamCorruptedException {
|
||||
float yaw = VectorMath.fromSkriptYaw(f.getPrimitive("yaw", float.class));
|
||||
float pitch = VectorMath.fromSkriptPitch(f.getPrimitive("pitch", float.class));
|
||||
return new Frame().setFromYawPitch(yaw, pitch);
|
||||
|
||||
Regular → Executable
Regular → Executable
-1
@@ -55,7 +55,6 @@ public class LocationLib {
|
||||
}
|
||||
|
||||
public static Location[] getLineCoordinate(Location[] locations, Location end, double position) {
|
||||
Location[] coordinates = new Location[locations.length];
|
||||
Vector delta;
|
||||
int i = 0;
|
||||
for (Location l: locations) {
|
||||
|
||||
Regular → Executable
Regular → Executable
Regular → Executable
+4
-2
@@ -1,4 +1,6 @@
|
||||
name: Biosphere2
|
||||
main: io.github.bi0qaw.biosphere.Biosphere
|
||||
author: bi0qaw
|
||||
version: 1.0.2
|
||||
author: bi0qaw, Govindas
|
||||
version: 1.0.3
|
||||
api-version: 1.13
|
||||
depend: [Skript]
|
||||
Reference in New Issue
Block a user