This commit is contained in:
dordsor21 2022-06-09 21:07:49 +01:00
parent 90d42b8b9f
commit 2a79c0a419
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
8 changed files with 41 additions and 0 deletions

View File

@ -45,6 +45,9 @@ final class BlockStatePopulator extends BlockPopulator {
private final IndependentPlotGenerator plotGenerator; private final IndependentPlotGenerator plotGenerator;
/**
* @since TODO
*/
public BlockStatePopulator( public BlockStatePopulator(
final @NonNull IndependentPlotGenerator plotGenerator final @NonNull IndependentPlotGenerator plotGenerator
) { ) {

View File

@ -48,6 +48,9 @@ final class BlockStatePopulator116 extends BlockPopulator {
private final IndependentPlotGenerator plotGenerator; private final IndependentPlotGenerator plotGenerator;
/**
* @since TODO
*/
public BlockStatePopulator116( public BlockStatePopulator116(
final @NonNull IndependentPlotGenerator plotGenerator final @NonNull IndependentPlotGenerator plotGenerator
) { ) {

View File

@ -39,10 +39,18 @@ import org.bukkit.entity.EntityType;
import org.bukkit.generator.LimitedRegion; import org.bukkit.generator.LimitedRegion;
import org.checkerframework.checker.nullness.qual.NonNull; import org.checkerframework.checker.nullness.qual.NonNull;
/**
* Wraps a {@link LimitedRegion} inside a P2 {@link com.plotsquared.core.queue.QueueCoordinator} so it can be written to.
*
* @since TODO
*/
public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator { public class LimitedRegionWrapperQueue extends DelegateQueueCoordinator {
private final LimitedRegion limitedRegion; private final LimitedRegion limitedRegion;
/**
* @since TODO
*/
public LimitedRegionWrapperQueue(LimitedRegion limitedRegion) { public LimitedRegionWrapperQueue(LimitedRegion limitedRegion) {
super(null); super(null);
this.limitedRegion = limitedRegion; this.limitedRegion = limitedRegion;

View File

@ -396,11 +396,20 @@ public class HybridGen extends IndependentPlotGenerator {
// All initialization is done in the PlotArea class // All initialization is done in the PlotArea class
} }
/**
* Wrapper to allow a WE {@link Entity} to effectively have a mutable location as the location in its NBT should be changed
* when set to the world.
*
* @since TODO
*/
private static final class PopulatingEntity implements Entity { private static final class PopulatingEntity implements Entity {
private final Entity parent; private final Entity parent;
private com.sk89q.worldedit.util.Location location; private com.sk89q.worldedit.util.Location location;
/**
* @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;
this.location = location; this.location = location;

View File

@ -492,6 +492,8 @@ 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 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() {
@ -500,6 +502,8 @@ 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 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() {
@ -508,6 +512,8 @@ 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 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() {

View File

@ -62,7 +62,9 @@ public abstract class IndependentPlotGenerator {
* @param result Queue to write to * @param result Queue to write to
* @param settings PlotArea (settings) * @param settings PlotArea (settings)
* @return True if any population occured * @return True if any population occured
* @deprecated {@link ScopedQueueCoordinator} will be renamed in v7.
*/ */
@Deprecated(forRemoval = true, since = "TODO")
public boolean populateChunk(ScopedQueueCoordinator result, PlotArea settings) { public boolean populateChunk(ScopedQueueCoordinator result, PlotArea settings) {
return false; return false;
} }

View File

@ -48,6 +48,9 @@ public class Location extends BlockLoc implements Comparable<Location> {
private final BlockVector3 blockVector3; private final BlockVector3 blockVector3;
private final World<?> world; private final World<?> world;
/**
* @since TODO
*/
protected Location( protected Location(
final @NonNull World<?> world, final @NonNull BlockVector3 blockVector3, final @NonNull World<?> world, final @NonNull BlockVector3 blockVector3,
final float yaw, final float pitch final float yaw, final float pitch

View File

@ -32,12 +32,17 @@ 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 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 class UncheckedWorldLocation extends Location { public class UncheckedWorldLocation extends Location {
private final String worldName; private final String worldName;
/**
* @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
) { ) {
@ -53,6 +58,8 @@ public class UncheckedWorldLocation extends Location {
* @param y Y coordinate * @param y Y coordinate
* @param z Z coordinate * @param z Z coordinate
* @return New location * @return New location
*
* @since TODO
*/ */
public static @NonNull UncheckedWorldLocation at( public static @NonNull UncheckedWorldLocation at(
final @NonNull String world, final int x, final int y, final int z final @NonNull String world, final int x, final int y, final int z