mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-26 18:49:06 +00:00
Iris pos util
This commit is contained in:
@@ -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