mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-20 23:36:52 +00:00
Iris pos util
This commit is contained in:
1 parent
5085c89c22
commit
a9a964cc75
1 file changed
+5
@@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.bukkit.util.BlockVector;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@@ -26,6 +27,10 @@ public class IrisPosition
|
||||
@Desc("The z position")
|
||||
private int z = 0;
|
||||
|
||||
public IrisPosition(BlockVector bv) {
|
||||
this(bv.getBlockX(), bv.getBlockY(), bv.getBlockZ());
|
||||
}
|
||||
|
||||
public IrisPosition add(IrisPosition relativePosition) {
|
||||
return new IrisPosition(relativePosition.x+x, relativePosition.y+y, relativePosition.z + z);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user