mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 23:26:45 +01:00
Address comments
This commit is contained in:
parent
9f4bdaef40
commit
4367be9ad0
@ -31,6 +31,7 @@ import com.plotsquared.bukkit.util.BukkitUtil;
|
|||||||
import com.plotsquared.core.location.ChunkWrapper;
|
import com.plotsquared.core.location.ChunkWrapper;
|
||||||
import com.plotsquared.core.location.Location;
|
import com.plotsquared.core.location.Location;
|
||||||
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
import com.plotsquared.core.queue.ScopedQueueCoordinator;
|
||||||
|
import com.plotsquared.core.util.AnnotationHelper;
|
||||||
import com.plotsquared.core.util.ChunkUtil;
|
import com.plotsquared.core.util.ChunkUtil;
|
||||||
import com.plotsquared.core.util.PatternUtil;
|
import com.plotsquared.core.util.PatternUtil;
|
||||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||||
@ -50,6 +51,7 @@ import org.checkerframework.checker.nullness.qual.Nullable;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||||
public class GenChunk extends ScopedQueueCoordinator {
|
public class GenChunk extends ScopedQueueCoordinator {
|
||||||
|
|
||||||
public final Biome[] biomes;
|
public final Biome[] biomes;
|
||||||
@ -61,21 +63,7 @@ public class GenChunk extends ScopedQueueCoordinator {
|
|||||||
public int chunkZ;
|
public int chunkZ;
|
||||||
private ChunkData chunkData = null;
|
private ChunkData chunkData = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Not API. Used as a bridge between P2 and Bukkit {@link Chunk}.
|
|
||||||
*
|
|
||||||
* @deprecated Use {@link GenChunk#regenChunk(int, int)} for extended world heights
|
|
||||||
* @since TODO
|
|
||||||
*/
|
|
||||||
@Deprecated(forRemoval = true, since = "TODO")
|
|
||||||
public GenChunk() {
|
|
||||||
this(0, 255);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Not API. Used as a bridge between P2 and Bukkit {@link Chunk}.
|
|
||||||
*
|
|
||||||
* @param minY minimum world Y, inclusive
|
* @param minY minimum world Y, inclusive
|
||||||
* @param maxY maximum world Y, inclusive
|
* @param maxY maximum world Y, inclusive
|
||||||
*
|
*
|
||||||
|
@ -102,6 +102,7 @@ public interface PlotPlatform<P> extends LocaleHolder {
|
|||||||
* Gets the default minimum world height for the version of Minecraft that the server is running.
|
* Gets the default minimum world height for the version of Minecraft that the server is running.
|
||||||
*
|
*
|
||||||
* @return minimum world height
|
* @return minimum world height
|
||||||
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
int versionMinHeight();
|
int versionMinHeight();
|
||||||
|
|
||||||
@ -109,6 +110,7 @@ public interface PlotPlatform<P> extends LocaleHolder {
|
|||||||
* Gets the default maximum world height for the version of Minecraft that the server is running.
|
* Gets the default maximum world height for the version of Minecraft that the server is running.
|
||||||
*
|
*
|
||||||
* @return maximum world height
|
* @return maximum world height
|
||||||
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
int versionMaxHeight();
|
int versionMaxHeight();
|
||||||
|
|
||||||
|
@ -1100,18 +1100,14 @@ public class PlotSquared {
|
|||||||
ConfigurationUtil.INTEGER.parseString(value).shortValue()
|
ConfigurationUtil.INTEGER.parseString(value).shortValue()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
case "minh", "minheight" -> {
|
case "minh", "minheight" -> this.worldConfiguration.set(
|
||||||
this.worldConfiguration.set(
|
|
||||||
base + "world.min_gen_height",
|
base + "world.min_gen_height",
|
||||||
ConfigurationUtil.INTEGER.parseString(value).shortValue()
|
ConfigurationUtil.INTEGER.parseString(value).shortValue()
|
||||||
);
|
);
|
||||||
}
|
case "maxh", "maxheight" -> this.worldConfiguration.set(
|
||||||
case "maxh", "maxheight" -> {
|
|
||||||
this.worldConfiguration.set(
|
|
||||||
base + "world.max_gen_height",
|
base + "world.max_gen_height",
|
||||||
ConfigurationUtil.INTEGER.parseString(value).shortValue()
|
ConfigurationUtil.INTEGER.parseString(value).shortValue()
|
||||||
);
|
);
|
||||||
}
|
|
||||||
case "f", "floor" -> this.worldConfiguration.set(
|
case "f", "floor" -> this.worldConfiguration.set(
|
||||||
base + "plot.floor",
|
base + "plot.floor",
|
||||||
ConfigurationUtil.BLOCK_BUCKET.parseString(value).toString()
|
ConfigurationUtil.BLOCK_BUCKET.parseString(value).toString()
|
||||||
|
@ -73,6 +73,8 @@ public class LocalChunk {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the minimum layer position stored (usually -4 or 0).
|
* Get the minimum layer position stored (usually -4 or 0).
|
||||||
|
*
|
||||||
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public int getMinSection() {
|
public int getMinSection() {
|
||||||
return this.minSection;
|
return this.minSection;
|
||||||
|
@ -88,6 +88,7 @@ public abstract class QueueCoordinator {
|
|||||||
* @param x chunk x coordinate
|
* @param x chunk x coordinate
|
||||||
* @param z chunk z coordinate
|
* @param z chunk z coordinate
|
||||||
* @return a new {@link ScopedQueueCoordinator}
|
* @return a new {@link ScopedQueueCoordinator}
|
||||||
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public ScopedQueueCoordinator getForChunk(int x, int z, int minY, int maxY) {
|
public ScopedQueueCoordinator getForChunk(int x, int z, int minY, int maxY) {
|
||||||
int bx = x << 4;
|
int bx = x << 4;
|
||||||
|
@ -390,6 +390,16 @@ public abstract class RegionManager {
|
|||||||
setBiome(region, extendBiome, biome, PlotSquared.get().getPlotAreaManager().getPlotAreas(world, region)[0], whenDone);
|
setBiome(region, extendBiome, biome, PlotSquared.get().getPlotAreaManager().getPlotAreas(world, region)[0], whenDone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set a region to a biome type.
|
||||||
|
*
|
||||||
|
* @param region region to set
|
||||||
|
* @param extendBiome how far outside the region to extent setting the biome too account for 3D biomes being 4x4
|
||||||
|
* @param biome biome to set
|
||||||
|
* @param area {@link PlotArea} in which the biome is being set
|
||||||
|
* @param whenDone task to run when complete
|
||||||
|
* @since TODO
|
||||||
|
*/
|
||||||
public void setBiome(
|
public void setBiome(
|
||||||
final CuboidRegion region,
|
final CuboidRegion region,
|
||||||
final int extendBiome,
|
final int extendBiome,
|
||||||
|
@ -96,6 +96,7 @@ public abstract class WorldUtil {
|
|||||||
* @param p2x Max X
|
* @param p2x Max X
|
||||||
* @param p2z Max Z
|
* @param p2z Max Z
|
||||||
* @param biome Biome
|
* @param biome Biome
|
||||||
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public static void setBiome(PlotArea area, int p1x, int p1z, int p2x, int p2z, BiomeType biome) {
|
public static void setBiome(PlotArea area, int p1x, int p1z, int p2x, int p2z, BiomeType biome) {
|
||||||
BlockVector3 pos1 = BlockVector2.at(p1x, p1z).toBlockVector3(area.getMinGenHeight());
|
BlockVector3 pos1 = BlockVector2.at(p1x, p1z).toBlockVector3(area.getMinGenHeight());
|
||||||
|
Loading…
Reference in New Issue
Block a user