Compare commits

..

43 Commits

Author SHA1 Message Date
a807b98f07 Ensure sign isn't physicsed 2022-03-02 17:48:44 +00:00
3dbbbc698e Fix "security" issue that was already present 2022-03-02 16:35:05 +01:00
a71af4e76f Switch loadingChunks to AtomicInteger to be safe (in case of multi-threaded) 2022-03-02 16:35:05 +01:00
5c0e538231 Address comments 2022-03-02 16:35:05 +01:00
db963ffc61 Remove debug 2022-03-02 16:35:05 +01:00
7343319fe6 Don't allow players to modify outside build height when using plot set / schematics.
- Also fixes schematic height issues
2022-03-02 16:35:05 +01:00
dc6d0e089f Fix min -> max 2022-03-02 16:35:05 +01:00
bbe31379e8 Use version min/max heights if world not present in QueueCoordinator 2022-03-02 16:35:05 +01:00
7c48fe198d Layer index utility method in LocalChunk 2022-03-02 16:35:05 +01:00
c5ff743c9e y index utility method in ChunknQueueCoordinator 2022-03-02 16:35:05 +01:00
fc93156362 Don't overly extend height when regenerating road region 2022-03-02 16:35:05 +01:00
c875487173 Improve plot getVolume method readability 2022-03-02 16:35:05 +01:00
a100f497b5 Add note on schem y normalisation 2022-03-02 16:35:05 +01:00
99fa3f403e min gen height is set in PlotArea 2022-03-02 16:35:05 +01:00
be417ae954 Start generation at min gen height if bedrock is disabled 2022-03-02 16:35:05 +01:00
0e4c87fb8f Clean up ClassicPlotManager road creation/removal 2022-03-02 16:35:05 +01:00
a233bfe111 Add utility methods for world height in QueueCoordinator 2022-03-02 16:35:05 +01:00
9328695c75 Don't magically split to 128 height in regeneration 2022-03-02 16:35:05 +01:00
8e9a142be8 Correct height in HybridUtils, also use minGenHeight + 1 2022-03-02 16:35:05 +01:00
6cb88505a9 Create utility method for layer index in GenChunk 2022-03-02 16:35:05 +01:00
ae3b86ed53 Use minGenHeight + 1 rather than build height in AugmentedUtils 2022-03-02 16:35:05 +01:00
3d0ceb4eb9 Add a count for chunks we're currently trying to load to not skip chunks at the end of a queue's edit 2022-03-02 16:35:05 +01:00
c8327bfa40 Address some deprecations for regions and biome setting 2022-03-02 16:35:05 +01:00
c4db968830 Use world min/max heights if present in QueueCoordinator 2022-03-02 16:35:05 +01:00
852c180bbd Javadocs/comments/deprecation 2022-03-02 16:35:05 +01:00
e45b2ba288 Address inclusivity issues for max world height 2022-03-02 16:35:05 +01:00
f45fb8fd6f Better javadoc
Co-authored-by: Hannes Greule <SirYwell@users.noreply.github.com>
2022-03-02 16:35:05 +01:00
b630baef55 Fix offset for min build height in SchematicHandler 2022-03-02 16:35:05 +01:00
d6b2b41c89 Ground level//bedrock is at min gen height
- Add comment on == rather than <= being used
 - It's because it's only checking for the bedrock layer being broken if that's disabled
2022-03-02 16:35:05 +01:00
10c9425826 Address comments 2022-03-02 16:35:05 +01:00
f369ccb30e Address comments 2022-03-02 16:35:05 +01:00
026e3fc17e Process chunks in order when regenerating all roads 2022-03-02 16:35:05 +01:00
b9f6f9b2b8 Overhall regenallroads method to make it work, make sure BukkitChunkCoordinator can/will finish 2022-03-02 16:35:05 +01:00
a12fe280db Fix incorrect schematic paste height, undo changes to HybridUtils 2022-03-02 16:35:05 +01:00
ff60ad1e24 Minor fixes, don't overlay error many times for the same y 2022-03-02 16:35:05 +01:00
7d15cc3ba3 Make road schematic stuff slightly more efficient by sharing queues 2022-03-02 16:35:05 +01:00
4367be9ad0 Address comments 2022-03-02 16:35:05 +01:00
9f4bdaef40 Fix up queues 2022-03-02 16:35:05 +01:00
0d468505bb Few fixes 2022-03-02 16:35:05 +01:00
fae95b758a Default gen/build heights based on minecraft version 2022-03-02 16:35:05 +01:00
f7dd0c1d38 Add min gen height to setup, 2022-03-02 16:35:05 +01:00
80c39ec79a Implement extended world heights into core module 2022-03-02 16:35:05 +01:00
f1d9d4bdc7 Begin to implement extended world heights:
- Implemented in Bukkit module (and where required in Core module)
2022-03-02 16:35:05 +01:00
23 changed files with 34 additions and 37 deletions

View File

@ -27,7 +27,6 @@ body:
description: Which server version version you using? If your server version is not listed, it is not supported. Update to a supported version first.
multiple: false
options:
- '1.18.2'
- '1.18.1'
- '1.18'
- '1.17.1'

View File

@ -8,11 +8,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v2.4.0
- name: Validate Gradle Wrapper"
uses: gradle/wrapper-validation-action@v1
uses: gradle/wrapper-validation-action@v1.0.4
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v3.0.0
with:
distribution: temurin
java-version: 17

View File

@ -23,7 +23,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v2
- name: Initialize CodeQL
uses: github/codeql-action/init@v1

View File

@ -14,6 +14,6 @@ jobs:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v5.18.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -67,7 +67,7 @@ public class GenChunk extends ScopedQueueCoordinator {
* @param minY minimum world Y, inclusive
* @param maxY maximum world Y, inclusive
*
* @since 6.6.0
* @since TODO
*/
public GenChunk(int minY, int maxY) {
super(null, Location.at("", 0, minY, 0), Location.at("", 15, maxY, 15));

View File

@ -88,7 +88,7 @@ public class BukkitWorld implements World<org.bukkit.World> {
/**
* Get the min world height from a Bukkit {@link org.bukkit.World}. Inclusive
*
* @since 6.6.0
* @since TODO
*/
public static int getMinWorldHeight(org.bukkit.World world) {
return HAS_MIN_Y ? world.getMinHeight() : 0;
@ -97,7 +97,7 @@ public class BukkitWorld implements World<org.bukkit.World> {
/**
* Get the max world height from a Bukkit {@link org.bukkit.World}. Exclusive
*
* @since 6.6.0
* @since TODO
*/
public static int getMaxWorldHeight(org.bukkit.World world) {
return HAS_MIN_Y ? world.getMaxHeight() : 256;
@ -143,7 +143,7 @@ public class BukkitWorld implements World<org.bukkit.World> {
/**
* @deprecated This method is not meant to be invoked or overridden, with no replacement.
*/
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
protected boolean canEqual(final Object other) {
return other instanceof BukkitWorld;
}

View File

@ -102,7 +102,7 @@ public interface PlotPlatform<P> extends LocaleHolder {
* Gets the default minimum world height for the version of Minecraft that the server is running.
*
* @return minimum world height
* @since 6.6.0
* @since TODO
*/
int versionMinHeight();
@ -110,7 +110,7 @@ public interface PlotPlatform<P> extends LocaleHolder {
* Gets the default maximum world height for the version of Minecraft that the server is running.
*
* @return maximum world height (inclusive)
* @since 6.6.0
* @since TODO
*/
int versionMaxHeight();

View File

@ -605,7 +605,7 @@ public class HybridUtils {
* @return if successful
* @deprecated use {@link HybridUtils#regenerateRoad(PlotArea, BlockVector2, int, QueueCoordinator)}
*/
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
public boolean regenerateRoad(final PlotArea area, final BlockVector2 chunk, int extend) {
return regenerateRoad(area, chunk, extend, null);
}
@ -618,7 +618,7 @@ public class HybridUtils {
* @param extend How far to extend setting air above the road
* @param queueCoordinator {@link QueueCoordinator} to use to set the blocks. Null if one should be created and enqueued
* @return if successful
* @since 6.6.0
* @since TODO
*/
public boolean regenerateRoad(
final PlotArea area,

View File

@ -61,7 +61,7 @@ public interface World<T> {
/**
* Get the min world height. Inclusive.
*
* @since 6.6.0
* @since TODO
*/
int getMinHeight();
@ -69,7 +69,7 @@ public interface World<T> {
/**
* Get the max world height. Inclusive.
*
* @since 6.6.0
* @since TODO
*/
int getMaxHeight();

View File

@ -122,7 +122,7 @@ import static com.plotsquared.core.util.entity.EntityCategories.CAP_VEHICLE;
*/
public class Plot {
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
public static final int MAX_HEIGHT = 256;
private static final Logger LOGGER = LogManager.getLogger("PlotSquared/" + Plot.class.getSimpleName());

View File

@ -1381,7 +1381,7 @@ public abstract class PlotArea {
/**
* Get the min height from which P2 will generate blocks. Inclusive.
*
* @since 6.6.0
* @since TODO
*/
public int getMinGenHeight() {
return this.minGenHeight;
@ -1390,7 +1390,7 @@ public abstract class PlotArea {
/**
* Get the max height to which P2 will generate blocks. Inclusive.
*
* @since 6.6.0
* @since TODO
*/
public int getMaxGenHeight() {
return this.maxGenHeight;

View File

@ -125,7 +125,7 @@ public abstract class PlotWorld {
/**
* @deprecated This method is not meant to be invoked or overridden, with no replacement.
*/
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
protected boolean canEqual(final Object other) {
return other instanceof PlotWorld;
}

View File

@ -391,7 +391,7 @@ public class FlagContainer {
/**
* @deprecated This method is not meant to be invoked or overridden, with no replacement.
*/
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
protected boolean canEqual(final Object other) {
return other instanceof FlagContainer;
}

View File

@ -221,7 +221,7 @@ public abstract class PlotFlag<T, F extends PlotFlag<T, F>> {
/**
* @deprecated This method is not meant to be invoked or overridden, with no replacement.
*/
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
protected boolean canEqual(final Object other) {
return other instanceof PlotFlag;
}

View File

@ -74,7 +74,7 @@ public class LocalChunk {
/**
* Get the minimum layer position stored (usually -4 or 0).
*
* @since 6.6.0
* @since TODO
*/
public int getMinSection() {
return this.minSection;

View File

@ -77,7 +77,7 @@ public abstract class QueueCoordinator {
* @return a new {@link ScopedQueueCoordinator}
* @deprecated Use {@link ScopedQueueCoordinator#getForChunk(int, int, int, int)}
*/
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
public ScopedQueueCoordinator getForChunk(int x, int z) {
if (getWorld() == null) {
return getForChunk(x, z, PlotSquared.platform().versionMinHeight(), PlotSquared.platform().versionMaxHeight());
@ -91,7 +91,7 @@ public abstract class QueueCoordinator {
* @param x chunk x coordinate
* @param z chunk z coordinate
* @return a new {@link ScopedQueueCoordinator}
* @since 6.6.0
* @since TODO
*/
public ScopedQueueCoordinator getForChunk(int x, int z, int minY, int maxY) {
int bx = x << 4;

View File

@ -379,7 +379,7 @@ public abstract class RegionManager {
});
}
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
public void setBiome(
final CuboidRegion region,
final int extendBiome,
@ -398,7 +398,7 @@ public abstract class RegionManager {
* @param biome biome to set
* @param area {@link PlotArea} in which the biome is being set
* @param whenDone task to run when complete
* @since 6.6.0
* @since TODO
*/
public void setBiome(
final CuboidRegion region,

View File

@ -76,7 +76,7 @@ public class RegionUtil {
return new CuboidRegion(min, max);
}
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
public static CuboidRegion createRegion(int pos1x, int pos2x, int pos1z, int pos2z) {
return createRegion(pos1x, pos2x, 0, 255, pos1z, pos2z);
}

View File

@ -25,6 +25,7 @@
*/
package com.plotsquared.core.util;
import com.fastasyncworldedit.core.regions.RegionWrapper;
import com.plotsquared.core.PlotSquared;
import com.plotsquared.core.configuration.Settings;
import com.plotsquared.core.location.Location;
@ -44,9 +45,6 @@ import java.util.UUID;
public class WEManager {
private static final BlockVector3 MIN = BlockVector3.at(Integer.MIN_VALUE, Integer.MIN_VALUE, Integer.MIN_VALUE);
private static final BlockVector3 MAX = BlockVector3.at(Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE);
public static boolean maskContains(Set<CuboidRegion> mask, int x, int y, int z) {
for (CuboidRegion region : mask) {
if (RegionUtil.contains(region, x, y, z)) {
@ -94,7 +92,7 @@ public class WEManager {
Location location = player.getLocation();
String world = location.getWorldName();
if (!PlotSquared.get().getPlotAreaManager().hasPlotArea(world)) {
regions.add(new CuboidRegion(MIN, MAX));
regions.add(RegionWrapper.GLOBAL());
return regions;
}
PlotArea area = player.getApplicablePlotArea();

View File

@ -96,7 +96,7 @@ public abstract class WorldUtil {
* @param world World name
* @param region Region
* @param biome Biome
* @since 6.6.0
* @since TODO
*/
public static void setBiome(String world, final CuboidRegion region, BiomeType biome) {
PlotSquared.platform().worldUtil().setBiomes(world, region, biome);

View File

@ -71,7 +71,7 @@ public class UUIDMapping {
/**
* @deprecated This method is not meant to be invoked or overridden, with no replacement.
*/
@Deprecated(forRemoval = true, since = "6.6.0")
@Deprecated(forRemoval = true, since = "TODO")
protected boolean canEqual(final Object other) {
return other instanceof UUIDMapping;
}

View File

@ -18,7 +18,7 @@ plugins {
idea
}
version = "6.6.1"
version = "6.5.2-SNAPSHOT"
allprojects {
group = "com.plotsquared"

View File

@ -6,7 +6,7 @@ guava = "31.0.1-jre" # Version set by Minecraft
# Platform expectations
paper = "1.18.1-R0.1-SNAPSHOT"
checker-qual = "3.21.3"
checker-qual = "3.21.2"
guice = "5.1.0"
findbugs = "3.0.1"
snakeyaml = "1.30" # Version set by Bukkit
@ -22,7 +22,7 @@ fawe = "2.0.1"
vault = "1.7.1"
placeholderapi = "2.11.1"
luckperms = "5.4"
essentialsx = "2.19.3"
essentialsx = "2.19.2"
mvdwapi = "3.1.1"
# Third party