aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data
diff options
context:
space:
mode:
authorsyeyoung <cyong06@naver.com>2021-02-12 00:03:42 +0900
committersyeyoung <cyong06@naver.com>2021-02-12 00:03:42 +0900
commit89c82ad1fea9fd0a8e32a5e818c6c01856cdd660 (patch)
treeeb989b2e58b2b18480d41a262b9cabf1a0ba387d /src/main/java/kr/syeyoung/dungeonsguide/dungeon/data
parent505cb6fc92e7d2c7412b43f459796791ca36e5a3 (diff)
downloadSkyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.tar.gz
Skyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.tar.bz2
Skyblock-Dungeons-Guide-89c82ad1fea9fd0a8e32a5e818c6c01856cdd660.zip
YES
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/data')
-rwxr-xr-xsrc/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
index 2fdfec96..78ae7ab9 100755
--- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
+++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/data/OffsetPoint.java
@@ -6,6 +6,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import net.minecraft.block.Block;
import net.minecraft.util.BlockPos;
+import net.minecraft.util.Vec3;
import javax.vecmath.Vector2d;
import java.io.Serializable;
@@ -13,6 +14,8 @@ import java.io.Serializable;
@Data
@AllArgsConstructor
public class OffsetPoint implements Cloneable, Serializable {
+ private static final long serialVersionUID = 3102336358774967540L;
+
private int x;
private int y;
private int z;
@@ -20,6 +23,10 @@ public class OffsetPoint implements Cloneable, Serializable {
public OffsetPoint(DungeonRoom dungeonRoom, BlockPos pos) {
setPosInWorld(dungeonRoom, pos);
}
+ public OffsetPoint(DungeonRoom dungeonRoom, Vec3 pos) {
+ setPosInWorld(dungeonRoom, new BlockPos((int)pos.xCoord, (int)pos.yCoord, (int)pos.zCoord));
+ }
+
public void setPosInWorld(DungeonRoom dungeonRoom, BlockPos pos) {
Vector2d vector2d = new Vector2d(pos.getX() - dungeonRoom.getMin().getX(), pos.getZ() - dungeonRoom.getMin().getZ());