Migrate vectors to a dedicated API interface
This commit is contained in:
parent
0f01475ec3
commit
81286767f4
18 changed files with 1124 additions and 469 deletions
|
@ -5,10 +5,10 @@ import net.minecraft.server.level.ServerLevel;
|
|||
|
||||
public class ChunkPos {
|
||||
public Points points;
|
||||
public Vector2 centerPoints;
|
||||
public Vector2d centerPoints;
|
||||
public String dim;
|
||||
|
||||
public ChunkPos(Vector3 point1, Vector3 point2, ServerLevel lvl)
|
||||
public ChunkPos(Vector3d point1, Vector3d point2, ServerLevel lvl)
|
||||
{
|
||||
points = new Points(point1, point2, lvl);
|
||||
dim = WorldPosition.getDim(lvl);
|
||||
|
@ -17,12 +17,12 @@ public class ChunkPos {
|
|||
public ChunkPos(CompoundTag tag)
|
||||
{
|
||||
points = new Points(tag.getCompound("points"));
|
||||
centerPoints = new Vector2(tag.getCompound("center"));
|
||||
centerPoints = Vector2d.deserialize(tag.getCompound("center"));
|
||||
}
|
||||
|
||||
public boolean isWithin(Vector3 point)
|
||||
public boolean isWithin(Vector3d point)
|
||||
{
|
||||
return point.inside(points.Min, points.Max);
|
||||
return point.Inside(points.Min, points.Max);
|
||||
}
|
||||
|
||||
public static ChunkPos getChunkPos(WorldPosition pos)
|
||||
|
|
Reference in a new issue