mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-07-31 11:35:27 +02:00
Compare commits
1 Commits
fix/v6/sch
...
fix/v6/pub
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f27bf9a153 |
@@ -100,7 +100,7 @@ tasks {
|
|||||||
opt.links("https://jd.papermc.io/paper/1.18/")
|
opt.links("https://jd.papermc.io/paper/1.18/")
|
||||||
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
|
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-bukkit/" + libs.worldeditBukkit.get().versionConstraint.toString())
|
||||||
opt.links("https://javadoc.io/doc/com.plotsquared/PlotSquared-Core/latest/")
|
opt.links("https://javadoc.io/doc/com.plotsquared/PlotSquared-Core/latest/")
|
||||||
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
|
opt.links("https://jd.adventure.kyori.net/api/" + libs.adventure.get().versionConstraint.toString())
|
||||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||||
opt.links("https://checkerframework.org/api/")
|
opt.links("https://checkerframework.org/api/")
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,7 @@ final class BlockStatePopulator extends BlockPopulator {
|
|||||||
private final IndependentPlotGenerator plotGenerator;
|
private final IndependentPlotGenerator plotGenerator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public BlockStatePopulator(
|
public BlockStatePopulator(
|
||||||
final @NonNull IndependentPlotGenerator plotGenerator
|
final @NonNull IndependentPlotGenerator plotGenerator
|
||||||
@@ -57,7 +57,7 @@ final class BlockStatePopulator extends BlockPopulator {
|
|||||||
/**
|
/**
|
||||||
* @deprecated Use {@link BlockStatePopulator#BlockStatePopulator(IndependentPlotGenerator)} as plotAreManager is unused
|
* @deprecated Use {@link BlockStatePopulator#BlockStatePopulator(IndependentPlotGenerator)} as plotAreManager is unused
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public BlockStatePopulator(
|
public BlockStatePopulator(
|
||||||
final @NonNull IndependentPlotGenerator plotGenerator,
|
final @NonNull IndependentPlotGenerator plotGenerator,
|
||||||
final @NonNull PlotAreaManager plotAreaManager
|
final @NonNull PlotAreaManager plotAreaManager
|
||||||
|
@@ -49,7 +49,7 @@ final class LegacyBlockStatePopulator extends BlockPopulator {
|
|||||||
private final IndependentPlotGenerator plotGenerator;
|
private final IndependentPlotGenerator plotGenerator;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public LegacyBlockStatePopulator(
|
public LegacyBlockStatePopulator(
|
||||||
final @NonNull IndependentPlotGenerator plotGenerator
|
final @NonNull IndependentPlotGenerator plotGenerator
|
||||||
|
@@ -44,7 +44,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||||||
/**
|
/**
|
||||||
* Wraps a {@link LimitedRegion} inside a {@link com.plotsquared.core.queue.QueueCoordinator} so it can be written to.
|
* Wraps a {@link LimitedRegion} inside a {@link com.plotsquared.core.queue.QueueCoordinator} so it can be written to.
|
||||||
*
|
*
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator {
|
public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator {
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator {
|
|||||||
private final LimitedRegion limitedRegion;
|
private final LimitedRegion limitedRegion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public LimitedRegionWrapperQueue(LimitedRegion limitedRegion) {
|
public LimitedRegionWrapperQueue(LimitedRegion limitedRegion) {
|
||||||
super(null);
|
super(null);
|
||||||
|
@@ -63,7 +63,7 @@ public class StateWrapper {
|
|||||||
* @deprecated in favour of using WE methods for obtaining NBT, specifically by obtaining a
|
* @deprecated in favour of using WE methods for obtaining NBT, specifically by obtaining a
|
||||||
* {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()}
|
* {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()}
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public StateWrapper(org.bukkit.block.BlockState state) {
|
public StateWrapper(org.bukkit.block.BlockState state) {
|
||||||
this.state = state;
|
this.state = state;
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ public class StateWrapper {
|
|||||||
* @deprecated in favour of using WorldEdit methods for obtaining NBT, specifically by obtaining a
|
* @deprecated in favour of using WorldEdit methods for obtaining NBT, specifically by obtaining a
|
||||||
* {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()}
|
* {@link com.sk89q.worldedit.world.block.BaseBlock} and then using {@link com.sk89q.worldedit.world.block.BaseBlock#getNbtData()}
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public CompoundTag getTag() {
|
public CompoundTag getTag() {
|
||||||
if (this.tag != null) {
|
if (this.tag != null) {
|
||||||
return this.tag;
|
return this.tag;
|
||||||
|
@@ -59,7 +59,7 @@ tasks {
|
|||||||
withType<Javadoc> {
|
withType<Javadoc> {
|
||||||
val opt = options as StandardJavadocDocletOptions
|
val opt = options as StandardJavadocDocletOptions
|
||||||
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString())
|
opt.links("https://docs.enginehub.org/javadoc/com.sk89q.worldedit/worldedit-core/" + libs.worldeditCore.get().versionConstraint.toString())
|
||||||
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
|
opt.links("https://jd.adventure.kyori.net/api/" + libs.adventure.get().versionConstraint.toString())
|
||||||
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
opt.links("https://google.github.io/guice/api-docs/" + libs.guice.get().versionConstraint.toString() + "/javadoc/")
|
||||||
opt.links("https://checkerframework.org/api/")
|
opt.links("https://checkerframework.org/api/")
|
||||||
}
|
}
|
||||||
|
@@ -388,7 +388,7 @@ public class HybridGen extends IndependentPlotGenerator {
|
|||||||
* Wrapper to allow a WorldEdit {@link Entity} to effectively have a mutable location as the location in its NBT should be changed
|
* Wrapper to allow a WorldEdit {@link Entity} to effectively have a mutable location as the location in its NBT should be changed
|
||||||
* when set to the world.
|
* when set to the world.
|
||||||
*
|
*
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
private static final class PopulatingEntity implements Entity {
|
private static final class PopulatingEntity implements Entity {
|
||||||
|
|
||||||
@@ -396,7 +396,7 @@ public class HybridGen extends IndependentPlotGenerator {
|
|||||||
private com.sk89q.worldedit.util.Location location;
|
private com.sk89q.worldedit.util.Location location;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
private PopulatingEntity(Entity parent, com.sk89q.worldedit.util.Location location) {
|
private PopulatingEntity(Entity parent, com.sk89q.worldedit.util.Location location) {
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
@@ -75,15 +75,12 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
private static final AffineTransform transform = new AffineTransform().rotateY(90);
|
private static final AffineTransform transform = new AffineTransform().rotateY(90);
|
||||||
public boolean ROAD_SCHEMATIC_ENABLED;
|
public boolean ROAD_SCHEMATIC_ENABLED;
|
||||||
public boolean PLOT_SCHEMATIC = false;
|
public boolean PLOT_SCHEMATIC = false;
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public int PLOT_SCHEMATIC_HEIGHT = -1;
|
public int PLOT_SCHEMATIC_HEIGHT = -1;
|
||||||
public short PATH_WIDTH_LOWER;
|
public short PATH_WIDTH_LOWER;
|
||||||
public short PATH_WIDTH_UPPER;
|
public short PATH_WIDTH_UPPER;
|
||||||
public HashMap<Integer, BaseBlock[]> G_SCH;
|
public HashMap<Integer, BaseBlock[]> G_SCH;
|
||||||
public HashMap<Integer, BiomeType> G_SCH_B;
|
public HashMap<Integer, BiomeType> G_SCH_B;
|
||||||
/**
|
|
||||||
* The Y level at which schematic generation will start, lowest of either road or plot schematic generation.
|
|
||||||
*/
|
|
||||||
public int SCHEM_Y;
|
public int SCHEM_Y;
|
||||||
private Location SIGN_LOCATION;
|
private Location SIGN_LOCATION;
|
||||||
private File root = null;
|
private File root = null;
|
||||||
@@ -111,7 +108,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
PlotSquared.platform().injector().injectMembers(this);
|
PlotSquared.platform().injector().injectMembers(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public static byte wrap(byte data, int start) {
|
public static byte wrap(byte data, int start) {
|
||||||
if ((data >= start) && (data < (start + 4))) {
|
if ((data >= start) && (data < (start + 4))) {
|
||||||
data = (byte) ((((data - start) + 2) & 3) + start);
|
data = (byte) ((((data - start) + 2) & 3) + start);
|
||||||
@@ -119,7 +116,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public static byte wrap2(byte data, int start) {
|
public static byte wrap2(byte data, int start) {
|
||||||
if ((data >= start) && (data < (start + 2))) {
|
if ((data >= start) && (data < (start + 2))) {
|
||||||
data = (byte) ((((data - start) + 1) & 1) + start);
|
data = (byte) ((((data - start) + 1) & 1) + start);
|
||||||
@@ -276,57 +273,33 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
int oddshift = (this.ROAD_WIDTH & 1);
|
int oddshift = (this.ROAD_WIDTH & 1);
|
||||||
|
|
||||||
SCHEM_Y = schematicStartHeight();
|
SCHEM_Y = schematicStartHeight();
|
||||||
|
|
||||||
// plotY and roadY are important to allow plot and/or road schematic "overflow" into each other without causing AIOOB
|
|
||||||
// exceptions when attempting either to set blocks to, or get block from G_SCH
|
|
||||||
// Default plot schematic start height, normalized to the minimum height schematics are pasted from.
|
|
||||||
int plotY = PLOT_HEIGHT - SCHEM_Y;
|
int plotY = PLOT_HEIGHT - SCHEM_Y;
|
||||||
int minRoadWall = Settings.Schematics.USE_WALL_IN_ROAD_SCHEM_HEIGHT ? Math.min(ROAD_HEIGHT, WALL_HEIGHT) : ROAD_HEIGHT;
|
int minRoadWall = Settings.Schematics.USE_WALL_IN_ROAD_SCHEM_HEIGHT ? Math.min(ROAD_HEIGHT, WALL_HEIGHT) : ROAD_HEIGHT;
|
||||||
// Default road schematic start height, normalized to the minimum height schematics are pasted from.
|
|
||||||
int roadY = minRoadWall - SCHEM_Y;
|
int roadY = minRoadWall - SCHEM_Y;
|
||||||
|
|
||||||
int worldGenHeight = getMaxGenHeight() - getMinGenHeight() + 1;
|
int worldHeight = getMaxGenHeight() - getMinGenHeight() + 1;
|
||||||
|
|
||||||
int maxSchematicHeight = 0;
|
|
||||||
|
|
||||||
// SCHEM_Y should be normalised to the plot "start" height
|
// SCHEM_Y should be normalised to the plot "start" height
|
||||||
if (schematic3 != null) {
|
if (schematic3 != null) {
|
||||||
if ((maxSchematicHeight = schematic3.getClipboard().getDimensions().getY()) == worldGenHeight) {
|
if (schematic3.getClipboard().getDimensions().getY() == worldHeight) {
|
||||||
SCHEM_Y = getMinGenHeight();
|
SCHEM_Y = plotY = 0;
|
||||||
plotY = 0;
|
|
||||||
} else if (!Settings.Schematics.PASTE_ON_TOP) {
|
} else if (!Settings.Schematics.PASTE_ON_TOP) {
|
||||||
SCHEM_Y = getMinBuildHeight();
|
SCHEM_Y = plotY = getMinBuildHeight() - getMinGenHeight();
|
||||||
plotY = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (schematic1 != null) {
|
if (schematic1 != null) {
|
||||||
if ((maxSchematicHeight = Math.max(
|
if (schematic1.getClipboard().getDimensions().getY() == worldHeight) {
|
||||||
schematic1.getClipboard().getDimensions().getY(),
|
SCHEM_Y = roadY = getMinGenHeight();
|
||||||
maxSchematicHeight
|
if (schematic3 != null && schematic3.getClipboard().getDimensions().getY() != worldHeight
|
||||||
)) == worldGenHeight) {
|
&& !Settings.Schematics.PASTE_ON_TOP) {
|
||||||
SCHEM_Y = getMinGenHeight();
|
plotY = PLOT_HEIGHT;
|
||||||
roadY = 0; // Road is the lowest schematic
|
|
||||||
if (schematic3 != null && schematic3.getClipboard().getDimensions().getY() != worldGenHeight) {
|
|
||||||
// Road is the lowest schematic. Normalize plotY to it.
|
|
||||||
if (Settings.Schematics.PASTE_ON_TOP) {
|
|
||||||
plotY = PLOT_HEIGHT - getMinGenHeight();
|
|
||||||
} else {
|
|
||||||
plotY = getMinBuildHeight() - getMinGenHeight();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else if (!Settings.Schematics.PASTE_ROAD_ON_TOP) {
|
} else if (!Settings.Schematics.PASTE_ROAD_ON_TOP) {
|
||||||
if (SCHEM_Y == getMinGenHeight()) { // Only possible if plot schematic is enabled
|
SCHEM_Y = roadY = getMinBuildHeight();
|
||||||
// Plot is still the lowest schematic, normalize roadY to it
|
if (schematic3 != null && schematic3.getClipboard().getDimensions().getY() != worldHeight
|
||||||
roadY = getMinBuildHeight() - getMinGenHeight();
|
&& !Settings.Schematics.PASTE_ON_TOP) {
|
||||||
} else if (schematic3 != null) {
|
plotY = PLOT_HEIGHT;
|
||||||
SCHEM_Y = getMinBuildHeight();
|
|
||||||
roadY = 0;// Road is the lowest schematic
|
|
||||||
if (Settings.Schematics.PASTE_ON_TOP) {
|
|
||||||
// Road is the lowest schematic. Normalize plotY to it.
|
|
||||||
plotY = PLOT_HEIGHT - getMinBuildHeight();
|
|
||||||
}
|
|
||||||
// If plot schematic is not paste-on-top, it will be from min build height thus plotY = 0 as well already.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -364,6 +337,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
y + min.getBlockY(),
|
y + min.getBlockY(),
|
||||||
z + min.getBlockZ()
|
z + min.getBlockZ()
|
||||||
));
|
));
|
||||||
|
if (!id.getBlockType().getMaterial().isAir()) {
|
||||||
schem3PopulationNeeded |= id.hasNbtData();
|
schem3PopulationNeeded |= id.hasNbtData();
|
||||||
addOverlayBlock(
|
addOverlayBlock(
|
||||||
(short) (x + shift + oddshift + centerShiftX),
|
(short) (x + shift + oddshift + centerShiftX),
|
||||||
@@ -371,9 +345,10 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
(short) (z + shift + oddshift + centerShiftZ),
|
(short) (z + shift + oddshift + centerShiftZ),
|
||||||
id,
|
id,
|
||||||
false,
|
false,
|
||||||
maxSchematicHeight
|
h3
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (blockArrayClipboard3.hasBiomes()) {
|
if (blockArrayClipboard3.hasBiomes()) {
|
||||||
BiomeType biome = blockArrayClipboard3.getBiome(BlockVector2.at(
|
BiomeType biome = blockArrayClipboard3.getBiome(BlockVector2.at(
|
||||||
x + min.getBlockX(),
|
x + min.getBlockX(),
|
||||||
@@ -422,24 +397,19 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
y + min.getBlockY(),
|
y + min.getBlockY(),
|
||||||
z + min.getBlockZ()
|
z + min.getBlockZ()
|
||||||
));
|
));
|
||||||
|
if (!id.getBlockType().getMaterial().isAir()) {
|
||||||
schem1PopulationNeeded |= id.hasNbtData();
|
schem1PopulationNeeded |= id.hasNbtData();
|
||||||
addOverlayBlock(
|
addOverlayBlock((short) (x - shift), (short) (y + roadY), (short) (z + shift + oddshift), id, false, h1);
|
||||||
(short) (x - shift),
|
|
||||||
(short) (y + roadY),
|
|
||||||
(short) (z + shift + oddshift),
|
|
||||||
id,
|
|
||||||
false,
|
|
||||||
maxSchematicHeight
|
|
||||||
);
|
|
||||||
addOverlayBlock(
|
addOverlayBlock(
|
||||||
(short) (z + shift + oddshift),
|
(short) (z + shift + oddshift),
|
||||||
(short) (y + roadY),
|
(short) (y + roadY),
|
||||||
(short) (shift - x + (oddshift - 1)),
|
(short) (shift - x + (oddshift - 1)),
|
||||||
id,
|
id,
|
||||||
true,
|
true,
|
||||||
maxSchematicHeight
|
h1
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (blockArrayClipboard1.hasBiomes()) {
|
if (blockArrayClipboard1.hasBiomes()) {
|
||||||
BiomeType biome = blockArrayClipboard1.getBiome(BlockVector2.at(x + min.getBlockX(), z + min.getBlockZ()));
|
BiomeType biome = blockArrayClipboard1.getBiome(BlockVector2.at(x + min.getBlockX(), z + min.getBlockZ()));
|
||||||
addOverlayBiome((short) (x - shift), (short) (z + shift + oddshift), biome);
|
addOverlayBiome((short) (x - shift), (short) (z + shift + oddshift), biome);
|
||||||
@@ -466,15 +436,10 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
y + min.getBlockY(),
|
y + min.getBlockY(),
|
||||||
z + min.getBlockZ()
|
z + min.getBlockZ()
|
||||||
));
|
));
|
||||||
|
if (!id.getBlockType().getMaterial().isAir()) {
|
||||||
schem2PopulationNeeded |= id.hasNbtData();
|
schem2PopulationNeeded |= id.hasNbtData();
|
||||||
addOverlayBlock(
|
addOverlayBlock((short) (x - shift), (short) (y + roadY), (short) (z - shift), id, false, h2);
|
||||||
(short) (x - shift),
|
}
|
||||||
(short) (y + roadY),
|
|
||||||
(short) (z - shift),
|
|
||||||
id,
|
|
||||||
false,
|
|
||||||
maxSchematicHeight
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
if (blockArrayClipboard2.hasBiomes()) {
|
if (blockArrayClipboard2.hasBiomes()) {
|
||||||
BiomeType biome = blockArrayClipboard2.getBiome(BlockVector2.at(x + min.getBlockX(), z + min.getBlockZ()));
|
BiomeType biome = blockArrayClipboard2.getBiome(BlockVector2.at(x + min.getBlockX(), z + min.getBlockZ()));
|
||||||
@@ -484,10 +449,6 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated This method should not be available for public API usage and will be made private.
|
|
||||||
*/
|
|
||||||
@Deprecated(forRemoval = true, since = "TODO")
|
|
||||||
public void addOverlayBlock(short x, short y, short z, BaseBlock id, boolean rotate, int height) {
|
public void addOverlayBlock(short x, short y, short z, BaseBlock id, boolean rotate, int height) {
|
||||||
if (z < 0) {
|
if (z < 0) {
|
||||||
z += this.SIZE;
|
z += this.SIZE;
|
||||||
@@ -514,10 +475,6 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
existing[y] = id;
|
existing[y] = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated This method should not be available for public API usage and will be made private.
|
|
||||||
*/
|
|
||||||
@Deprecated(forRemoval = true, since = "TODO")
|
|
||||||
public void addOverlayBiome(short x, short z, BiomeType id) {
|
public void addOverlayBiome(short x, short z, BiomeType id) {
|
||||||
if (z < 0) {
|
if (z < 0) {
|
||||||
z += this.SIZE;
|
z += this.SIZE;
|
||||||
@@ -536,7 +493,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
/**
|
/**
|
||||||
* Get the entities contained within the plot schematic for generation. Intended for internal use only.
|
* Get the entities contained within the plot schematic for generation. Intended for internal use only.
|
||||||
*
|
*
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||||
public @Nullable List<Entity> getPlotSchematicEntities() {
|
public @Nullable List<Entity> getPlotSchematicEntities() {
|
||||||
@@ -546,7 +503,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
/**
|
/**
|
||||||
* Get the minimum point of the plot schematic for generation. Intended for internal use only.
|
* Get the minimum point of the plot schematic for generation. Intended for internal use only.
|
||||||
*
|
*
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||||
public @Nullable BlockVector3 getPlotSchematicMinPoint() {
|
public @Nullable BlockVector3 getPlotSchematicMinPoint() {
|
||||||
@@ -556,7 +513,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
/**
|
/**
|
||||||
* Get if post-generation population of chunks with tiles/entities is needed for this world. Not for public API use.
|
* Get if post-generation population of chunks with tiles/entities is needed for this world. Not for public API use.
|
||||||
*
|
*
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||||
public boolean populationNeeded() {
|
public boolean populationNeeded() {
|
||||||
@@ -566,7 +523,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
/**
|
/**
|
||||||
* @deprecated in favour of {@link HybridPlotWorld#getSchematicRoot()}
|
* @deprecated in favour of {@link HybridPlotWorld#getSchematicRoot()}
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public File getRoot() {
|
public File getRoot() {
|
||||||
return this.root;
|
return this.root;
|
||||||
}
|
}
|
||||||
@@ -575,7 +532,7 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
* Get the root folder for this world's generation schematics. May be null if schematics not initialised via
|
* Get the root folder for this world's generation schematics. May be null if schematics not initialised via
|
||||||
* {@link HybridPlotWorld#setupSchematics()}
|
* {@link HybridPlotWorld#setupSchematics()}
|
||||||
*
|
*
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public @Nullable File getSchematicRoot() {
|
public @Nullable File getSchematicRoot() {
|
||||||
return this.root;
|
return this.root;
|
||||||
|
@@ -53,7 +53,7 @@ public abstract class IndependentPlotGenerator {
|
|||||||
* @param settings PlotArea (settings)
|
* @param settings PlotArea (settings)
|
||||||
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public abstract void generateChunk(ScopedQueueCoordinator result, PlotArea settings);
|
public abstract void generateChunk(ScopedQueueCoordinator result, PlotArea settings);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -64,7 +64,7 @@ public abstract class IndependentPlotGenerator {
|
|||||||
* @return True if any population occurred
|
* @return True if any population occurred
|
||||||
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public boolean populateChunk(ScopedQueueCoordinator result, PlotArea settings) {
|
public boolean populateChunk(ScopedQueueCoordinator result, PlotArea settings) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -49,7 +49,7 @@ public sealed class Location extends BlockLoc implements Comparable<Location> pe
|
|||||||
private final World<?> world;
|
private final World<?> world;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
protected Location(
|
protected Location(
|
||||||
final @NonNull World<?> world, final @NonNull BlockVector3 blockVector3,
|
final @NonNull World<?> world, final @NonNull BlockVector3 blockVector3,
|
||||||
|
@@ -33,7 +33,7 @@ import org.checkerframework.checker.nullness.qual.NonNull;
|
|||||||
* Used internally for generation to reference locations in worlds that "don't exist yet". There is no guarantee that the world
|
* Used internally for generation to reference locations in worlds that "don't exist yet". There is no guarantee that the world
|
||||||
* name provided by {@link UncheckedWorldLocation#getWorldName()} exists on the server.
|
* name provided by {@link UncheckedWorldLocation#getWorldName()} exists on the server.
|
||||||
*
|
*
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||||
public final class UncheckedWorldLocation extends Location {
|
public final class UncheckedWorldLocation extends Location {
|
||||||
@@ -41,7 +41,7 @@ public final class UncheckedWorldLocation extends Location {
|
|||||||
private final String worldName;
|
private final String worldName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
private UncheckedWorldLocation(
|
private UncheckedWorldLocation(
|
||||||
final @NonNull String worldName, final int x, final int y, final int z
|
final @NonNull String worldName, final int x, final int y, final int z
|
||||||
@@ -59,7 +59,7 @@ public final class UncheckedWorldLocation extends Location {
|
|||||||
* @param z Z coordinate
|
* @param z Z coordinate
|
||||||
* @return New location
|
* @return New location
|
||||||
*
|
*
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
@AnnotationHelper.ApiDescription(info = "Internal use only. Subject to changes at any time.")
|
||||||
public static @NonNull UncheckedWorldLocation at(
|
public static @NonNull UncheckedWorldLocation at(
|
||||||
|
@@ -65,6 +65,7 @@ import com.sk89q.worldedit.world.biome.BiomeType;
|
|||||||
import com.sk89q.worldedit.world.biome.BiomeTypes;
|
import com.sk89q.worldedit.world.biome.BiomeTypes;
|
||||||
import com.sk89q.worldedit.world.gamemode.GameMode;
|
import com.sk89q.worldedit.world.gamemode.GameMode;
|
||||||
import com.sk89q.worldedit.world.gamemode.GameModes;
|
import com.sk89q.worldedit.world.gamemode.GameModes;
|
||||||
|
import net.kyori.adventure.text.Component;
|
||||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||||
import net.kyori.adventure.text.minimessage.Template;
|
import net.kyori.adventure.text.minimessage.Template;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
@@ -964,31 +965,7 @@ public abstract class PlotArea {
|
|||||||
return this.plots.remove(id) != null;
|
return this.plots.remove(id) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Merge a list of plots together. This is non-blocking for the world-changes that will be made. To run a task when the
|
|
||||||
* world changes are complete, use {@link PlotArea#mergePlots(List, boolean, Runnable)};
|
|
||||||
*
|
|
||||||
* @param plotIds List of plot IDs to merge
|
|
||||||
* @param removeRoads If the roads between plots should be removed
|
|
||||||
* @return if merges were completed successfully.
|
|
||||||
*/
|
|
||||||
public boolean mergePlots(final @NonNull List<PlotId> plotIds, final boolean removeRoads) {
|
public boolean mergePlots(final @NonNull List<PlotId> plotIds, final boolean removeRoads) {
|
||||||
return mergePlots(plotIds, removeRoads, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Merge a list of plots together. This is non-blocking for the world-changes that will be made.
|
|
||||||
*
|
|
||||||
* @param plotIds List of plot IDs to merge
|
|
||||||
* @param removeRoads If the roads between plots should be removed
|
|
||||||
* @param whenDone Task to run when any merge world changes are complete. Also runs if no changes were made. Does not
|
|
||||||
* run if there was an error or if too few plots IDs were supplied.
|
|
||||||
* @return if merges were completed successfully.
|
|
||||||
* @since 6.9.0
|
|
||||||
*/
|
|
||||||
public boolean mergePlots(
|
|
||||||
final @NonNull List<PlotId> plotIds, final boolean removeRoads, final @Nullable Runnable whenDone
|
|
||||||
) {
|
|
||||||
if (plotIds.size() < 2) {
|
if (plotIds.size() < 2) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1051,9 +1028,6 @@ public abstract class PlotArea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
manager.finishPlotMerge(plotIds, queue);
|
manager.finishPlotMerge(plotIds, queue);
|
||||||
if (whenDone != null) {
|
|
||||||
queue.setCompleteTask(whenDone);
|
|
||||||
}
|
|
||||||
queue.enqueue();
|
queue.enqueue();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -203,7 +203,7 @@ public class ChunkCoordinatorBuilder {
|
|||||||
* and simply effectively makes {@link ChunkCoordinator#start()} ()} a blocking operation.
|
* and simply effectively makes {@link ChunkCoordinator#start()} ()} a blocking operation.
|
||||||
*
|
*
|
||||||
* @param forceSync force sync or not
|
* @param forceSync force sync or not
|
||||||
* @since 6.9.0
|
* @since TODO
|
||||||
*/
|
*/
|
||||||
public @NonNull ChunkCoordinatorBuilder forceSync(final boolean forceSync) {
|
public @NonNull ChunkCoordinatorBuilder forceSync(final boolean forceSync) {
|
||||||
this.forceSync = forceSync;
|
this.forceSync = forceSync;
|
||||||
|
@@ -93,7 +93,7 @@ public abstract class QueueCoordinator {
|
|||||||
* @since 6.6.0
|
* @since 6.6.0
|
||||||
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, 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;
|
||||||
int bz = z << 4;
|
int bz = z << 4;
|
||||||
|
@@ -45,7 +45,7 @@ public abstract class ChunkManager {
|
|||||||
/**
|
/**
|
||||||
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public static void setChunkInPlotArea(
|
public static void setChunkInPlotArea(
|
||||||
RunnableVal<ScopedQueueCoordinator> force,
|
RunnableVal<ScopedQueueCoordinator> force,
|
||||||
RunnableVal<ScopedQueueCoordinator> add,
|
RunnableVal<ScopedQueueCoordinator> add,
|
||||||
@@ -86,7 +86,7 @@ public abstract class ChunkManager {
|
|||||||
/**
|
/**
|
||||||
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public static boolean preProcessChunk(BlockVector2 loc, ScopedQueueCoordinator queue) {
|
public static boolean preProcessChunk(BlockVector2 loc, ScopedQueueCoordinator queue) {
|
||||||
final RunnableVal<ScopedQueueCoordinator> forceChunk = forceChunks.get(loc);
|
final RunnableVal<ScopedQueueCoordinator> forceChunk = forceChunks.get(loc);
|
||||||
if (forceChunk != null) {
|
if (forceChunk != null) {
|
||||||
@@ -100,7 +100,7 @@ public abstract class ChunkManager {
|
|||||||
/**
|
/**
|
||||||
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
|
||||||
*/
|
*/
|
||||||
@Deprecated(forRemoval = true, since = "6.9.0")
|
@Deprecated(forRemoval = true, since = "TODO")
|
||||||
public static boolean postProcessChunk(BlockVector2 loc, ScopedQueueCoordinator queue) {
|
public static boolean postProcessChunk(BlockVector2 loc, ScopedQueueCoordinator queue) {
|
||||||
final RunnableVal<ScopedQueueCoordinator> addChunk = forceChunks.get(loc);
|
final RunnableVal<ScopedQueueCoordinator> addChunk = forceChunks.get(loc);
|
||||||
if (addChunk != null) {
|
if (addChunk != null) {
|
||||||
|
@@ -18,11 +18,10 @@ plugins {
|
|||||||
idea
|
idea
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.plotsquared"
|
version = "6.8.2-SNAPSHOT"
|
||||||
version = "6.9.1-SNAPSHOT"
|
|
||||||
|
|
||||||
subprojects {
|
allprojects {
|
||||||
group = rootProject.group
|
group = "com.plotsquared"
|
||||||
version = rootProject.version
|
version = rootProject.version
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
@@ -51,7 +50,9 @@ subprojects {
|
|||||||
url = uri("https://maven.enginehub.org/repo/")
|
url = uri("https://maven.enginehub.org/repo/")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
subprojects {
|
||||||
apply {
|
apply {
|
||||||
plugin<JavaPlugin>()
|
plugin<JavaPlugin>()
|
||||||
plugin<JavaLibraryPlugin>()
|
plugin<JavaLibraryPlugin>()
|
||||||
@@ -65,9 +66,11 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.5"))
|
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.2"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
dependencies {
|
dependencies {
|
||||||
// Tests
|
// Tests
|
||||||
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
|
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
|
||||||
@@ -173,6 +176,10 @@ subprojects {
|
|||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
|
|
||||||
|
register<Delete>("cleanup") {
|
||||||
|
delete(rootDir.resolve("build"))
|
||||||
|
}
|
||||||
|
|
||||||
compileJava {
|
compileJava {
|
||||||
options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000"))
|
options.compilerArgs.addAll(arrayOf("-Xmaxerrs", "1000"))
|
||||||
options.compilerArgs.add("-Xlint:all")
|
options.compilerArgs.add("-Xlint:all")
|
||||||
@@ -185,15 +192,18 @@ subprojects {
|
|||||||
shadowJar {
|
shadowJar {
|
||||||
this.archiveClassifier.set(null as String?)
|
this.archiveClassifier.set(null as String?)
|
||||||
this.archiveFileName.set("${project.name}-${project.version}.${this.archiveExtension.getOrElse("jar")}")
|
this.archiveFileName.set("${project.name}-${project.version}.${this.archiveExtension.getOrElse("jar")}")
|
||||||
|
this.destinationDirectory.set(rootProject.tasks.shadowJar.get().destinationDirectory.get())
|
||||||
}
|
}
|
||||||
|
|
||||||
named("build") {
|
named("build") {
|
||||||
dependsOn(named("shadowJar"))
|
dependsOn(named("shadowJar"))
|
||||||
|
finalizedBy("cleanup")
|
||||||
}
|
}
|
||||||
test {
|
test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nexusPublishing {
|
nexusPublishing {
|
||||||
@@ -204,7 +214,3 @@ nexusPublishing {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.getByName<Jar>("jar") {
|
|
||||||
enabled = false
|
|
||||||
}
|
|
||||||
|
@@ -5,6 +5,11 @@ checker-qual = "3.22.0"
|
|||||||
guice = "5.1.0"
|
guice = "5.1.0"
|
||||||
spotbugs = "4.7.0"
|
spotbugs = "4.7.0"
|
||||||
|
|
||||||
|
# Adventure & MiniMessage
|
||||||
|
adventure-api = "4.9.3"
|
||||||
|
adventure-text-minimessage = "4.1.0-SNAPSHOT"
|
||||||
|
adventure-platform-bukkit = "4.0.1"
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
worldedit = "7.2.10"
|
worldedit = "7.2.10"
|
||||||
placeholderapi = "2.11.1"
|
placeholderapi = "2.11.1"
|
||||||
@@ -36,6 +41,11 @@ guice = { group = "com.google.inject", name = "guice", version.ref = "guice" }
|
|||||||
guiceassistedinject = { group = "com.google.inject.extensions", name = "guice-assistedinject", version.ref = "guice" }
|
guiceassistedinject = { group = "com.google.inject.extensions", name = "guice-assistedinject", version.ref = "guice" }
|
||||||
spotbugs = { group = "com.github.spotbugs", name = "spotbugs-annotations", version.ref = "spotbugs" }
|
spotbugs = { group = "com.github.spotbugs", name = "spotbugs-annotations", version.ref = "spotbugs" }
|
||||||
|
|
||||||
|
# Adventure & MiniMessage
|
||||||
|
adventure = { group = "net.kyori", name = "adventure-api", version.ref = "adventure-api" }
|
||||||
|
minimessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure-text-minimessage" }
|
||||||
|
adventurePlatformBukkit = { group = "net.kyori", name = "adventure-platform-bukkit", version.ref = "adventure-platform-bukkit" }
|
||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
worldeditCore = { group = "com.sk89q.worldedit", name = "worldedit-core", version.ref = "worldedit" }
|
worldeditCore = { group = "com.sk89q.worldedit", name = "worldedit-core", version.ref = "worldedit" }
|
||||||
worldeditBukkit = { group = "com.sk89q.worldedit", name = "worldedit-bukkit", version.ref = "worldedit" }
|
worldeditBukkit = { group = "com.sk89q.worldedit", name = "worldedit-bukkit", version.ref = "worldedit" }
|
||||||
|
@@ -3,9 +3,17 @@
|
|||||||
"config:base",
|
"config:base",
|
||||||
":disableDependencyDashboard"
|
":disableDependencyDashboard"
|
||||||
],
|
],
|
||||||
|
"ignoreDeps": [
|
||||||
|
"guava",
|
||||||
|
"com.google.guava:guava",
|
||||||
|
"com.google.code.gson:gson",
|
||||||
|
"gson",
|
||||||
|
"snakeyaml",
|
||||||
|
"net.kyori"
|
||||||
|
],
|
||||||
"timezone": "Europe/Berlin",
|
"timezone": "Europe/Berlin",
|
||||||
"schedule": [
|
"schedule": [
|
||||||
"every monday"
|
"on monday after 9am"
|
||||||
],
|
],
|
||||||
"labels": ["Renovate"],
|
"labels": ["Renovate"],
|
||||||
"commitMessagePrefix": "build: ",
|
"commitMessagePrefix": "build: ",
|
||||||
|
Reference in New Issue
Block a user