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