diff --git a/gradle.properties b/gradle.properties index 1517fe9..b95fc53 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,5 +5,5 @@ org.gradle.daemon=false mc_version=1.19.2 forge_version=43.2.3 -myversion=1.0.4.0 +myversion=1.0.4.1 parchment_version=2022.11.27 \ No newline at end of file diff --git a/src/main/java/dev/zontreck/libzontreck/vectors/ChunkPos.java b/src/main/java/dev/zontreck/libzontreck/vectors/ChunkPos.java index 7c1edd1..5b47e70 100644 --- a/src/main/java/dev/zontreck/libzontreck/vectors/ChunkPos.java +++ b/src/main/java/dev/zontreck/libzontreck/vectors/ChunkPos.java @@ -4,12 +4,6 @@ public class ChunkPos { public boolean isSubArea; public Points subclaim; - public ChunkPos(Vector2 chunkPos) - { - isSubArea=false; - Vector3 min = new Vector3(chunkPos.x, -70, chunkPos.y); - subclaim = new Points(min, min.add(new Vector3(15, 300, 15))); - } public ChunkPos(Vector3 point1, Vector3 point2) { @@ -21,4 +15,9 @@ public class ChunkPos { { return point.inside(subclaim.Point1, subclaim.Point2); } + + public static ChunkPos getChunkPos(WorldPosition pos) + { + return pos.getChunkPos(); + } } diff --git a/src/main/java/dev/zontreck/libzontreck/vectors/WorldPosition.java b/src/main/java/dev/zontreck/libzontreck/vectors/WorldPosition.java index c031220..fafc25b 100644 --- a/src/main/java/dev/zontreck/libzontreck/vectors/WorldPosition.java +++ b/src/main/java/dev/zontreck/libzontreck/vectors/WorldPosition.java @@ -113,4 +113,12 @@ public class WorldPosition if(Position.same(other.Position) && Dimension == other.Dimension)return true; else return false; } + + public ChunkPos getChunkPos() + { + net.minecraft.world.level.ChunkPos mcChunk = getActualDimension().getChunkAt(Position.asBlockPos()).getPos(); + ChunkPos pos = new ChunkPos(new Vector3(mcChunk.getMinBlockX(),-70,mcChunk.getMinBlockZ()), new Vector3(mcChunk.getMaxBlockX(), 400, mcChunk.getMaxBlockZ())); + + return pos; + } } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 77c7a25..8a0c1a8 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -19,7 +19,7 @@ modId="libzontreck" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata # see the associated build.gradle script for how to populate this completely automatically during a build -version="1.0.4.0" #mandatory +version="1.0.4.1" #mandatory # A display name for the mod displayName="LibZontreck" #mandatory # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/