Package net.hollowcube.polar
Class AnvilPolar
java.lang.Object
net.hollowcube.polar.AnvilPolar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull PolarWorldanvilToPolar(@NotNull Path path) Convert the anvil world at the given path to a Polar world.static @NotNull PolarWorldanvilToPolar(@NotNull Path path, int minSection, int maxSection) Convert the anvil world at the given path to a Polar world.static @NotNull PolarWorldanvilToPolar(@NotNull Path path, int minSection, int maxSection, @NotNull ChunkSelector selector) Convert the anvil world at the given path to a Polar world.static @NotNull PolarWorldanvilToPolar(@NotNull Path path, @NotNull ChunkSelector selector) Convert the anvil world at the given path to a Polar world.
-
Constructor Details
-
AnvilPolar
public AnvilPolar()
-
-
Method Details
-
anvilToPolar
@NotNull public static @NotNull PolarWorld anvilToPolar(@NotNull @NotNull Path path) throws IOException Convert the anvil world at the given path to a Polar world. The world height range (in sections) is assumed to be from -4 to 19 (inclusive), which is the default for recent Minecraft versions.
All chunks from all regions in the anvil world will be included in the Polar world.- Parameters:
path- Path to the anvil world (the directory containing the region directory)- Returns:
- The Polar world representing the given Anvil world
- Throws:
IOException- If there was an error reading the anvil world
-
anvilToPolar
@NotNull public static @NotNull PolarWorld anvilToPolar(@NotNull @NotNull Path path, @NotNull @NotNull ChunkSelector selector) throws IOException Convert the anvil world at the given path to a Polar world. The world height range (in sections) is assumed to be from -4 to 19 (inclusive), which is the default for recent Minecraft versions.
Only the selected chunks will be included in the resulting Polar world.- Parameters:
path- Path to the anvil world (the directory containing the region directory)selector- Chunk selector to use to determine which chunks to include in the Polar world- Returns:
- The Polar world representing the given Anvil world
- Throws:
IOException- If there was an error reading the anvil world
-
anvilToPolar
@NotNull public static @NotNull PolarWorld anvilToPolar(@NotNull @NotNull Path path, int minSection, int maxSection) throws IOException Convert the anvil world at the given path to a Polar world. The provided world height range will be used to determine which sections will be included in the Polar world. If a section is missing, an empty polar section will be included in its place.
All chunks from all regions in the anvil world will be included in the Polar world.- Parameters:
path- Path to the anvil world (the directory containing the region directory)minSection- The minimum section to include in the Polar worldmaxSection- The maximum section to include in the Polar world- Returns:
- The Polar world representing the given Anvil world
- Throws:
IOException- If there was an error reading the anvil world
-
anvilToPolar
@NotNull public static @NotNull PolarWorld anvilToPolar(@NotNull @NotNull Path path, int minSection, int maxSection, @NotNull @NotNull ChunkSelector selector) throws IOException Convert the anvil world at the given path to a Polar world. The provided world height range will be used to determine which sections will be included in the Polar world. If a section is missing, an empty polar section will be included in its place.
Only the selected chunks will be included in the resulting Polar world.- Parameters:
path- Path to the anvil world (the directory containing the region directory)minSection- The minimum section to include in the Polar worldmaxSection- The maximum section to include in the Polar worldselector- Chunk selector to use to determine which chunks to include in the Polar world- Returns:
- The Polar world representing the given Anvil world
- Throws:
IOException- If there was an error reading the anvil world
-