mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 06:36:44 +01:00
Merge branch 'v6' into fix/missing-message-files
This commit is contained in:
commit
4a703a305b
@ -105,5 +105,6 @@ tasks {
|
|||||||
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
|
opt.links("https://jd.adventure.kyori.net/api/4.9.3/")
|
||||||
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/")
|
||||||
|
opt.encoding("UTF-8")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,5 +64,6 @@ tasks {
|
|||||||
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/")
|
||||||
opt.links("https://javadoc.io/doc/com.intellectualsites.informative-annotations/informative-annotations/latest/")
|
opt.links("https://javadoc.io/doc/com.intellectualsites.informative-annotations/informative-annotations/latest/")
|
||||||
|
opt.encoding("UTF-8")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,9 +75,6 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
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;
|
||||||
@ -270,57 +267,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.
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -358,15 +331,17 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
y + min.getBlockY(),
|
y + min.getBlockY(),
|
||||||
z + min.getBlockZ()
|
z + min.getBlockZ()
|
||||||
));
|
));
|
||||||
schem3PopulationNeeded |= id.hasNbtData();
|
if (!id.getBlockType().getMaterial().isAir()) {
|
||||||
addOverlayBlock(
|
schem3PopulationNeeded |= id.hasNbtData();
|
||||||
(short) (x + shift + oddshift + centerShiftX),
|
addOverlayBlock(
|
||||||
(short) (y + plotY),
|
(short) (x + shift + oddshift + centerShiftX),
|
||||||
(short) (z + shift + oddshift + centerShiftZ),
|
(short) (y + plotY),
|
||||||
id,
|
(short) (z + shift + oddshift + centerShiftZ),
|
||||||
false,
|
id,
|
||||||
maxSchematicHeight
|
false,
|
||||||
);
|
h3
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (blockArrayClipboard3.hasBiomes()) {
|
if (blockArrayClipboard3.hasBiomes()) {
|
||||||
BiomeType biome = blockArrayClipboard3.getBiome(BlockVector2.at(
|
BiomeType biome = blockArrayClipboard3.getBiome(BlockVector2.at(
|
||||||
@ -416,23 +391,18 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
y + min.getBlockY(),
|
y + min.getBlockY(),
|
||||||
z + min.getBlockZ()
|
z + min.getBlockZ()
|
||||||
));
|
));
|
||||||
schem1PopulationNeeded |= id.hasNbtData();
|
if (!id.getBlockType().getMaterial().isAir()) {
|
||||||
addOverlayBlock(
|
schem1PopulationNeeded |= id.hasNbtData();
|
||||||
(short) (x - shift),
|
addOverlayBlock((short) (x - shift), (short) (y + roadY), (short) (z + shift + oddshift), id, false, h1);
|
||||||
(short) (y + roadY),
|
addOverlayBlock(
|
||||||
(short) (z + shift + oddshift),
|
(short) (z + shift + oddshift),
|
||||||
id,
|
(short) (y + roadY),
|
||||||
false,
|
(short) (shift - x + (oddshift - 1)),
|
||||||
maxSchematicHeight
|
id,
|
||||||
);
|
true,
|
||||||
addOverlayBlock(
|
h1
|
||||||
(short) (z + shift + oddshift),
|
);
|
||||||
(short) (y + roadY),
|
}
|
||||||
(short) (shift - x + (oddshift - 1)),
|
|
||||||
id,
|
|
||||||
true,
|
|
||||||
maxSchematicHeight
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
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()));
|
||||||
@ -460,15 +430,10 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
y + min.getBlockY(),
|
y + min.getBlockY(),
|
||||||
z + min.getBlockZ()
|
z + min.getBlockZ()
|
||||||
));
|
));
|
||||||
schem2PopulationNeeded |= id.hasNbtData();
|
if (!id.getBlockType().getMaterial().isAir()) {
|
||||||
addOverlayBlock(
|
schem2PopulationNeeded |= id.hasNbtData();
|
||||||
(short) (x - shift),
|
addOverlayBlock((short) (x - shift), (short) (y + roadY), (short) (z - shift), id, false, h2);
|
||||||
(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()));
|
||||||
@ -478,11 +443,6 @@ public class HybridPlotWorld extends ClassicPlotWorld {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated This method should not be available for public API usage and will be made private.
|
|
||||||
*/
|
|
||||||
@Deprecated(since = "6.9.1")
|
|
||||||
@NotPublic
|
|
||||||
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;
|
||||||
@ -509,11 +469,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(since = "6.9.1")
|
|
||||||
@NotPublic
|
|
||||||
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;
|
||||||
|
@ -19,7 +19,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "com.plotsquared"
|
group = "com.plotsquared"
|
||||||
version = "6.9.2-SNAPSHOT"
|
version = "6.9.3-SNAPSHOT"
|
||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
group = rootProject.group
|
group = rootProject.group
|
||||||
@ -65,7 +65,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.9"))
|
implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.11"))
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -6,7 +6,7 @@ spotbugs = "4.7.1"
|
|||||||
|
|
||||||
# Plugins
|
# Plugins
|
||||||
worldedit = "7.2.10"
|
worldedit = "7.2.10"
|
||||||
placeholderapi = "2.11.1"
|
placeholderapi = "2.11.2"
|
||||||
luckperms = "5.4"
|
luckperms = "5.4"
|
||||||
essentialsx = "2.19.4"
|
essentialsx = "2.19.4"
|
||||||
mvdwapi = "3.1.1"
|
mvdwapi = "3.1.1"
|
||||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
6
gradlew
vendored
6
gradlew
vendored
@ -205,6 +205,12 @@ set -- \
|
|||||||
org.gradle.wrapper.GradleWrapperMain \
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
|
# Stop when "xargs" is not available.
|
||||||
|
if ! command -v xargs >/dev/null 2>&1
|
||||||
|
then
|
||||||
|
die "xargs is not available"
|
||||||
|
fi
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
# Use "xargs" to parse quoted args.
|
||||||
#
|
#
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
14
gradlew.bat
vendored
14
gradlew.bat
vendored
@ -14,7 +14,7 @@
|
|||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@ -25,7 +25,7 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%"=="" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if %ERRORLEVEL% equ 0 goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
|||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
set EXIT_CODE=%ERRORLEVEL%
|
||||||
exit /b 1
|
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||||
|
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||||
|
exit /b %EXIT_CODE%
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
Loading…
Reference in New Issue
Block a user