Compare commits
25 Commits
release-3
...
release-23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
257f3db70f | ||
|
|
d87eaf8a8b | ||
|
|
58818c543a | ||
|
|
170e37b1a8 | ||
|
|
fd6b333892 | ||
|
|
9d437f2fb7 | ||
|
|
0e3c7ce677 | ||
|
|
f8a60b0396 | ||
|
|
4aa7f613a7 | ||
|
|
6c73bdb3af | ||
|
|
613b2276ac | ||
|
|
9f9706a976 | ||
|
|
54dfb768de | ||
|
|
02bf66a783 | ||
|
|
f0db903bb5 | ||
|
|
8a333120da | ||
|
|
424e876c7c | ||
|
|
e5e84f55ab | ||
|
|
2bfa77be48 | ||
|
|
8578903621 | ||
|
|
6a3b842b90 | ||
|
|
6c345e6680 | ||
|
|
60b13b6213 | ||
|
|
b602b8e073 | ||
|
|
02a7f7c066 |
@@ -1,2 +1,2 @@
|
||||
purpurCommit = 893ce2a77ae2c2c31638a4c1e73cde595c4c21ec
|
||||
pufferfishCommit = d032415ca6fd0736d7cb0da28e3134b957fb83a0
|
||||
purpurCommit = 9429820ef674811674c43475f55ed8a1cd76ed97
|
||||
pufferfishCommit = b7781634b0800476107ed4a0b38fb24c13da6bf8
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import io.papermc.paperweight.patcher.*
|
||||
import io.papermc.paperweight.util.*
|
||||
import io.papermc.paperweight.util.constants.PAPERCLIP_CONFIG
|
||||
|
||||
@@ -6,7 +5,7 @@ plugins {
|
||||
java
|
||||
`maven-publish`
|
||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
||||
id("io.papermc.paperweight.patcher") version "1.5.3"
|
||||
id("io.papermc.paperweight.patcher") version "1.5.4"
|
||||
}
|
||||
|
||||
repositories {
|
||||
@@ -20,7 +19,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
remapper("net.fabricmc:tiny-remapper:0.8.6:fat")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.605.2")
|
||||
decompiler("net.minecraftforge:forgeflower:2.0.627.2")
|
||||
paperclip("io.papermc:paperclip:3.0.3")
|
||||
}
|
||||
|
||||
@@ -85,8 +84,6 @@ paperweight {
|
||||
}
|
||||
|
||||
val upstreamTask = tasks.register("updateUpstream") {
|
||||
finalizedBy("applyPatches")
|
||||
|
||||
val tempDir = layout.cacheDir("updateUpstream");
|
||||
val file = "gradle.properties";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
group = org.plazmamc.plazma
|
||||
version = 1.19.4-R0.1-SNAPSHOT
|
||||
|
||||
paperCommit = fbf74ba0ac016c408bbec28e7da317b68a81e2e1
|
||||
paperCommit = 8d040fad9b4ddcc49a7b70c15b80b63c479eac95
|
||||
|
||||
org.gradle.caching = true
|
||||
org.gradle.parallel = true
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
184
gradlew.bat
vendored
184
gradlew.bat
vendored
@@ -1,92 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 27 Mar 2023 02:50:22 +0000
|
||||
Date: Fri, 14 Apr 2023 06:48:56 +0000
|
||||
Subject: [PATCH] Pufferfish API Changes
|
||||
|
||||
Original: Kevin Raneri <kevin.raneri@gmail.com>
|
||||
@@ -20,7 +20,7 @@ You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index cad12a2632b9ebb569280441c42869685db1f31a..b83e2c5a0a094002d12aee55ec0cf8d12bf33f3e 100644
|
||||
index 279a666e8ea2c07f41ee3f28b768e95dca5f0a10..a93b900889ddb56a2943c54a7fff6f60f42a78f1 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -42,6 +42,7 @@ dependencies {
|
||||
@@ -47,7 +47,7 @@ index cad12a2632b9ebb569280441c42869685db1f31a..b83e2c5a0a094002d12aee55ec0cf8d1
|
||||
into("META-INF/maven/${project.group}/${project.name}")
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java b/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6fbaf2a232745db0a41394b1c2cc0cc90cefc4ee
|
||||
index 0000000000000000000000000000000000000000..10310fdd53de28efb8a8250f6d3b0c8eb08fb68a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/sentry/SentryContext.java
|
||||
@@ -0,0 +1,161 @@
|
||||
@@ -69,21 +69,21 @@ index 0000000000000000000000000000000000000000..6fbaf2a232745db0a41394b1c2cc0cc9
|
||||
+import org.jetbrains.annotations.Nullable;
|
||||
+
|
||||
+public class SentryContext {
|
||||
+
|
||||
+
|
||||
+ private static final Gson GSON = new Gson();
|
||||
+
|
||||
+
|
||||
+ public static void setPluginContext(@Nullable Plugin plugin) {
|
||||
+ if (plugin != null) {
|
||||
+ ThreadContext.put("pufferfishsentry_pluginname", plugin.getName());
|
||||
+ ThreadContext.put("pufferfishsentry_pluginversion", plugin.getDescription().getVersion());
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public static void removePluginContext() {
|
||||
+ ThreadContext.remove("pufferfishsentry_pluginname");
|
||||
+ ThreadContext.remove("pufferfishsentry_pluginversion");
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public static void setSenderContext(@Nullable CommandSender sender) {
|
||||
+ if (sender != null) {
|
||||
+ ThreadContext.put("pufferfishsentry_playername", sender.getName());
|
||||
@@ -92,15 +92,15 @@ index 0000000000000000000000000000000000000000..6fbaf2a232745db0a41394b1c2cc0cc9
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public static void removeSenderContext() {
|
||||
+ ThreadContext.remove("pufferfishsentry_playername");
|
||||
+ ThreadContext.remove("pufferfishsentry_playerid");
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public static void setEventContext(Event event, RegisteredListener registration) {
|
||||
+ setPluginContext(registration.getPlugin());
|
||||
+
|
||||
+
|
||||
+ try {
|
||||
+ // Find the player that was involved with this event
|
||||
+ Player player = null;
|
||||
@@ -108,36 +108,36 @@ index 0000000000000000000000000000000000000000..6fbaf2a232745db0a41394b1c2cc0cc9
|
||||
+ player = ((PlayerEvent) event).getPlayer();
|
||||
+ } else {
|
||||
+ Class<? extends Event> eventClass = event.getClass();
|
||||
+
|
||||
+
|
||||
+ Field playerField = null;
|
||||
+
|
||||
+
|
||||
+ for (Field field : eventClass.getDeclaredFields()) {
|
||||
+ if (field.getType().equals(Player.class)) {
|
||||
+ playerField = field;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if (playerField != null) {
|
||||
+ playerField.setAccessible(true);
|
||||
+ player = (Player) playerField.get(event);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ if (player != null) {
|
||||
+ setSenderContext(player);
|
||||
+ }
|
||||
+ } catch (Exception e) {} // We can't really safely log exceptions.
|
||||
+
|
||||
+
|
||||
+ ThreadContext.put("pufferfishsentry_eventdata", GSON.toJson(serializeFields(event)));
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public static void removeEventContext() {
|
||||
+ removePluginContext();
|
||||
+ removeSenderContext();
|
||||
+ ThreadContext.remove("pufferfishsentry_eventdata");
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ private static Map<String, String> serializeFields(Object object) {
|
||||
+ Map<String, String> fields = new TreeMap<>();
|
||||
+ fields.put("_class", object.getClass().getName());
|
||||
@@ -146,7 +146,7 @@ index 0000000000000000000000000000000000000000..6fbaf2a232745db0a41394b1c2cc0cc9
|
||||
+ if (Modifier.isStatic(declaredField.getModifiers())) {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ String fieldName = declaredField.getName();
|
||||
+ if (fieldName.equals("handlers")) {
|
||||
+ continue;
|
||||
@@ -162,51 +162,51 @@ index 0000000000000000000000000000000000000000..6fbaf2a232745db0a41394b1c2cc0cc9
|
||||
+ }
|
||||
+ return fields;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public static class State {
|
||||
+
|
||||
+
|
||||
+ private Plugin plugin;
|
||||
+ private Command command;
|
||||
+ private String commandLine;
|
||||
+ private Event event;
|
||||
+ private RegisteredListener registeredListener;
|
||||
+
|
||||
+
|
||||
+ public Plugin getPlugin() {
|
||||
+ return plugin;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public void setPlugin(Plugin plugin) {
|
||||
+ this.plugin = plugin;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public Command getCommand() {
|
||||
+ return command;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public void setCommand(Command command) {
|
||||
+ this.command = command;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public String getCommandLine() {
|
||||
+ return commandLine;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public void setCommandLine(String commandLine) {
|
||||
+ this.commandLine = commandLine;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public Event getEvent() {
|
||||
+ return event;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public void setEvent(Event event) {
|
||||
+ this.event = event;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public RegisteredListener getRegisteredListener() {
|
||||
+ return registeredListener;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ public void setRegisteredListener(RegisteredListener registeredListener) {
|
||||
+ this.registeredListener = registeredListener;
|
||||
+ }
|
||||
@@ -214,7 +214,7 @@ index 0000000000000000000000000000000000000000..6fbaf2a232745db0a41394b1c2cc0cc9
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6d266ebf5e52745ad13e90e5754b524383fa9b29
|
||||
index 0000000000000000000000000000000000000000..ab5fea0b03224bf249352ce340e94704ff713345
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDChecker.java
|
||||
@@ -0,0 +1,40 @@
|
||||
@@ -231,7 +231,7 @@ index 0000000000000000000000000000000000000000..6d266ebf5e52745ad13e90e5754b5243
|
||||
+ */
|
||||
+@Deprecated
|
||||
+public class SIMDChecker {
|
||||
+
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static boolean canEnable(Logger logger) {
|
||||
+ try {
|
||||
@@ -239,13 +239,13 @@ index 0000000000000000000000000000000000000000..6d266ebf5e52745ad13e90e5754b5243
|
||||
+ return false;
|
||||
+ } else {
|
||||
+ SIMDDetection.testRun = true;
|
||||
+
|
||||
+
|
||||
+ VectorSpecies<Integer> ISPEC = IntVector.SPECIES_PREFERRED;
|
||||
+ VectorSpecies<Float> FSPEC = FloatVector.SPECIES_PREFERRED;
|
||||
+
|
||||
+
|
||||
+ logger.log(Level.INFO, "Max SIMD vector size on this system is " + ISPEC.vectorBitSize() + " bits (int)");
|
||||
+ logger.log(Level.INFO, "Max SIMD vector size on this system is " + FSPEC.vectorBitSize() + " bits (float)");
|
||||
+
|
||||
+
|
||||
+ if (ISPEC.elementSize() < 2 || FSPEC.elementSize() < 2) {
|
||||
+ logger.log(Level.WARNING, "SIMD is not properly supported on this system!");
|
||||
+ return false;
|
||||
@@ -256,11 +256,11 @@ index 0000000000000000000000000000000000000000..6d266ebf5e52745ad13e90e5754b5243
|
||||
+ } catch (NoClassDefFoundError | Exception ignored) {} // Basically, we don't do anything. This lets us detect if it's not functional and disable it.
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..fd708554d6dab2ddcd24c3024330b8ebf9462111
|
||||
index 0000000000000000000000000000000000000000..a84889d3e9cfc4d7ab5f867820a6484c6070711b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/SIMDDetection.java
|
||||
@@ -0,0 +1,35 @@
|
||||
@@ -270,11 +270,11 @@ index 0000000000000000000000000000000000000000..fd708554d6dab2ddcd24c3024330b8eb
|
||||
+
|
||||
+@Deprecated
|
||||
+public class SIMDDetection {
|
||||
+
|
||||
+
|
||||
+ public static boolean isEnabled = false;
|
||||
+ public static boolean versionLimited = false;
|
||||
+ public static boolean testRun = false;
|
||||
+
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static boolean canEnable(Logger logger) {
|
||||
+ try {
|
||||
@@ -283,7 +283,7 @@ index 0000000000000000000000000000000000000000..fd708554d6dab2ddcd24c3024330b8eb
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static int getJavaVersion() {
|
||||
+ // https://stackoverflow.com/a/2591122
|
||||
@@ -297,11 +297,11 @@ index 0000000000000000000000000000000000000000..fd708554d6dab2ddcd24c3024330b8eb
|
||||
+ version = version.split("-")[0]; // Azul is stupid
|
||||
+ return Integer.parseInt(version);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java b/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..20ec3b29b0cb4061cc89d635b3929ffe71008e22
|
||||
index 0000000000000000000000000000000000000000..ae2464920c9412ac90b819a540ee58be0741465f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/simd/VectorMapPalette.java
|
||||
@@ -0,0 +1,83 @@
|
||||
@@ -316,10 +316,10 @@ index 0000000000000000000000000000000000000000..20ec3b29b0cb4061cc89d635b3929ffe
|
||||
+
|
||||
+@Deprecated
|
||||
+public class VectorMapPalette {
|
||||
+
|
||||
+
|
||||
+ private static final VectorSpecies<Integer> I_SPEC = IntVector.SPECIES_PREFERRED;
|
||||
+ private static final VectorSpecies<Float> F_SPEC = FloatVector.SPECIES_PREFERRED;
|
||||
+
|
||||
+
|
||||
+ @Deprecated
|
||||
+ public static void matchColorVectorized(int[] in, byte[] out) {
|
||||
+ int speciesLength = I_SPEC.length();
|
||||
@@ -329,64 +329,64 @@ index 0000000000000000000000000000000000000000..20ec3b29b0cb4061cc89d635b3929ffe
|
||||
+ float[] bluesArr = new float[speciesLength];
|
||||
+ float[] greensArr = new float[speciesLength];
|
||||
+ int[] alphasArr = new int[speciesLength];
|
||||
+
|
||||
+
|
||||
+ for (int j = 0; j < speciesLength; j++) {
|
||||
+ alphasArr[j] = (in[i + j] >> 24) & 0xFF;
|
||||
+ redsArr[j] = (in[i + j] >> 16) & 0xFF;
|
||||
+ greensArr[j] = (in[i + j] >> 8) & 0xFF;
|
||||
+ bluesArr[j] = (in[i + j] >> 0) & 0xFF;
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ IntVector alphas = IntVector.fromArray(I_SPEC, alphasArr, 0);
|
||||
+ FloatVector reds = FloatVector.fromArray(F_SPEC, redsArr, 0);
|
||||
+ FloatVector greens = FloatVector.fromArray(F_SPEC, greensArr, 0);
|
||||
+ FloatVector blues = FloatVector.fromArray(F_SPEC, bluesArr, 0);
|
||||
+ IntVector resultIndex = IntVector.zero(I_SPEC);
|
||||
+ VectorMask<Integer> modificationMask = VectorMask.fromLong(I_SPEC, 0xffffffff);
|
||||
+
|
||||
+
|
||||
+ modificationMask = modificationMask.and(alphas.lt(128).not());
|
||||
+ FloatVector bestDistances = FloatVector.broadcast(F_SPEC, Float.MAX_VALUE);
|
||||
+
|
||||
+
|
||||
+ for (int c = 4; c < MapPalette.colors.length; c++) {
|
||||
+ // We're using 32-bit floats here because it's 2x faster and nobody will know the difference.
|
||||
+ // For correctness, the original algorithm uses 64-bit floats instead. Completely unnecessary.
|
||||
+ FloatVector compReds = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getRed());
|
||||
+ FloatVector compGreens = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getGreen());
|
||||
+ FloatVector compBlues = FloatVector.broadcast(F_SPEC, MapPalette.colors[c].getBlue());
|
||||
+
|
||||
+
|
||||
+ FloatVector rMean = reds.add(compReds).div(2.0f);
|
||||
+ FloatVector rDiff = reds.sub(compReds);
|
||||
+ FloatVector gDiff = greens.sub(compGreens);
|
||||
+ FloatVector bDiff = blues.sub(compBlues);
|
||||
+
|
||||
+
|
||||
+ FloatVector weightR = rMean.div(256.0f).add(2);
|
||||
+ FloatVector weightG = FloatVector.broadcast(F_SPEC, 4.0f);
|
||||
+ FloatVector weightB = FloatVector.broadcast(F_SPEC, 255.0f).sub(rMean).div(256.0f).add(2.0f);
|
||||
+
|
||||
+
|
||||
+ FloatVector distance = weightR.mul(rDiff).mul(rDiff).add(weightG.mul(gDiff).mul(gDiff)).add(weightB.mul(bDiff).mul(bDiff));
|
||||
+
|
||||
+
|
||||
+ // Now we compare to the best distance we've found.
|
||||
+ // This mask contains a "1" if better, and a "0" otherwise.
|
||||
+ VectorMask<Float> bestDistanceMask = distance.lt(bestDistances);
|
||||
+ bestDistances = bestDistances.blend(distance, bestDistanceMask); // Update the best distances
|
||||
+
|
||||
+
|
||||
+ // Update the result array
|
||||
+ // We also AND with the modification mask because we don't want to interfere if the alpha value isn't large enough.
|
||||
+ resultIndex = resultIndex.blend(c, bestDistanceMask.cast(I_SPEC).and(modificationMask)); // Update the results
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ for (int j = 0; j < speciesLength; j++) {
|
||||
+ int index = resultIndex.lane(j);
|
||||
+ out[i + j] = (byte) (index < 128 ? index : -129 + (index - 127));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ // For the final ones, fall back to the regular method
|
||||
+ for (; i < in.length; i++) {
|
||||
+ out[i] = MapPalette.matchColor(new Color(in[i], true));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/map/MapPalette.java b/src/main/java/org/bukkit/map/MapPalette.java
|
||||
index 3a9aaca2e76411a9c27f9f5e0f22d060d5a66d06..9584e245144b561b4f6745b2f26a4f69a6f92891 100644
|
||||
@@ -426,7 +426,7 @@ index 3a9aaca2e76411a9c27f9f5e0f22d060d5a66d06..9584e245144b561b4f6745b2f26a4f69
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 2b8308989fce7f8a16907f8711b362e671fdbfb6..bd4d1a40f53784662174d426533ef4b5433a15b7 100644
|
||||
index fc2dae69165776d08274e34a69962cc70445f411..899d67fa782fac639fe7fb096e05c551d75bd647 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -584,7 +584,9 @@ public final class SimplePluginManager implements PluginManager {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: AlphaKR93 <dev@alpha93.kr>
|
||||
Date: Mon, 27 Mar 2023 02:52:12 +0000
|
||||
Date: Fri, 14 Apr 2023 06:50:31 +0000
|
||||
Subject: [PATCH] Purpur API Changes
|
||||
|
||||
Original: PurpurMC
|
||||
@@ -25,7 +25,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index b83e2c5a0a094002d12aee55ec0cf8d12bf33f3e..b5835fa536f90b7f88a5ee4df78733cf43e1cb23 100644
|
||||
index a93b900889ddb56a2943c54a7fff6f60f42a78f1..417c4324af22c870de669e338a1eee5d540184a4 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -105,6 +105,8 @@ tasks.jar {
|
||||
@@ -38,10 +38,10 @@ index b83e2c5a0a094002d12aee55ec0cf8d12bf33f3e..b5835fa536f90b7f88a5ee4df78733cf
|
||||
options.overview = "src/main/javadoc/overview.html"
|
||||
options.use()
|
||||
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
index 34e43e56ccc663e05b9cae36643e8df5eee5cb17..2c15b67149d014fdce2dd74a550013d83b6e44c8 100644
|
||||
index 8f29c1561ba5916cb5634392edd8bd2a5a294a51..6fbc64e0f214d0c8e5afcbe385e414a4e1fe1c72 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
@@ -76,9 +76,9 @@ public class TimedEventExecutor implements EventExecutor {
|
||||
@@ -77,9 +77,9 @@ public class TimedEventExecutor implements EventExecutor {
|
||||
executor.execute(listener, event);
|
||||
return;
|
||||
}
|
||||
@@ -54,10 +54,10 @@ index 34e43e56ccc663e05b9cae36643e8df5eee5cb17..2c15b67149d014fdce2dd74a550013d8
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
|
||||
index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb662bf81b 100644
|
||||
index 7514fad26f955329f8bf17ff17db75f0c8301ee5..1d866e980abc542bdfee1ce082cd9cdd7761e9f7 100644
|
||||
--- a/src/main/java/co/aikar/timings/Timing.java
|
||||
+++ b/src/main/java/co/aikar/timings/Timing.java
|
||||
@@ -36,6 +36,7 @@ public interface Timing extends AutoCloseable {
|
||||
@@ -39,6 +39,7 @@ public interface Timing extends AutoCloseable {
|
||||
* @return Timing
|
||||
*/
|
||||
@NotNull
|
||||
@@ -65,7 +65,7 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
|
||||
Timing startTiming();
|
||||
|
||||
/**
|
||||
@@ -43,6 +44,7 @@ public interface Timing extends AutoCloseable {
|
||||
@@ -46,6 +47,7 @@ public interface Timing extends AutoCloseable {
|
||||
*
|
||||
* Will automatically be called when this Timing is used with try-with-resources
|
||||
*/
|
||||
@@ -73,7 +73,7 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
|
||||
void stopTiming();
|
||||
|
||||
/**
|
||||
@@ -53,6 +55,7 @@ public interface Timing extends AutoCloseable {
|
||||
@@ -56,6 +58,7 @@ public interface Timing extends AutoCloseable {
|
||||
* @return Timing
|
||||
*/
|
||||
@NotNull
|
||||
@@ -81,7 +81,7 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
|
||||
Timing startTimingIfSync();
|
||||
|
||||
/**
|
||||
@@ -62,12 +65,14 @@ public interface Timing extends AutoCloseable {
|
||||
@@ -65,12 +68,14 @@ public interface Timing extends AutoCloseable {
|
||||
*
|
||||
* But only if we are on the primary thread.
|
||||
*/
|
||||
@@ -96,7 +96,7 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
|
||||
void abort();
|
||||
|
||||
/**
|
||||
@@ -79,5 +84,6 @@ public interface Timing extends AutoCloseable {
|
||||
@@ -82,5 +87,6 @@ public interface Timing extends AutoCloseable {
|
||||
TimingHandler getTimingHandler();
|
||||
|
||||
@Override
|
||||
@@ -104,10 +104,10 @@ index a21e5ead5024fd0058c5e3302d8201dd249d32bc..505908e987a032a801ae03d7fb020dfb
|
||||
void close();
|
||||
}
|
||||
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
|
||||
index dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09..759e9cbcedb50894821dcb6dcc602af4f0c3453e 100644
|
||||
index 9812d668ad945aba486fbf6d5bf83c4292cb5d03..187672fdcb77081653335d20537fbd795c026245 100644
|
||||
--- a/src/main/java/co/aikar/timings/Timings.java
|
||||
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||||
@@ -114,7 +114,7 @@ public final class Timings {
|
||||
@@ -124,7 +124,7 @@ public final class Timings {
|
||||
@NotNull
|
||||
public static Timing ofStart(@NotNull Plugin plugin, @NotNull String name, @Nullable Timing groupHandler) {
|
||||
Timing timing = of(plugin, name, groupHandler);
|
||||
@@ -117,10 +117,10 @@ index dd72a34eaa4bedd9ea0b92eaa79091b00eb4dd09..759e9cbcedb50894821dcb6dcc602af4
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
index 3132dc98d26c54c5e46162e53aaed195d7335c8d..b461b5c50f97f11cb9ef68abc520271bb72440fa 100644
|
||||
index e801e79fa57c44b2e5d359647c920f88064826f1..1abfcee0f6d632f4cd8d74b4994a90c9ea9d254c 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
@@ -44,7 +44,7 @@ public class TimingsCommand extends BukkitCommand {
|
||||
@@ -45,7 +45,7 @@ public class TimingsCommand extends BukkitCommand {
|
||||
public TimingsCommand(@NotNull String name) {
|
||||
super(name);
|
||||
this.description = "Manages Spigot Timings data to see performance of the server.";
|
||||
@@ -129,21 +129,22 @@ index 3132dc98d26c54c5e46162e53aaed195d7335c8d..b461b5c50f97f11cb9ef68abc520271b
|
||||
this.setPermission("bukkit.command.timings");
|
||||
}
|
||||
|
||||
@@ -53,6 +53,13 @@ public class TimingsCommand extends BukkitCommand {
|
||||
@@ -54,8 +54,12 @@ public class TimingsCommand extends BukkitCommand {
|
||||
if (!testPermission(sender)) {
|
||||
return true;
|
||||
}
|
||||
- if (false) {
|
||||
- sender.sendMessage(Timings.deprecationMessage());
|
||||
+ if (true) {
|
||||
+ net.kyori.adventure.text.minimessage.MiniMessage mm = net.kyori.adventure.text.minimessage.MiniMessage.miniMessage();
|
||||
+ sender.sendMessage(mm.deserialize("<gold>Purpur has removed timings to save your performance. Please use <click:suggest_command:'/spark'><grey>/spark</grey></click> instead"));
|
||||
+ sender.sendMessage(mm.deserialize("<gold>For more information, view its documentation at"));
|
||||
+ sender.sendMessage(mm.deserialize("<gold><click:open_url:'https://spark.lucko.me/docs/Command-Usage'>https://spark.lucko.me/docs/Command-Usage</click>"));
|
||||
+ return true;
|
||||
+ }
|
||||
}
|
||||
if (args.length < 1) {
|
||||
sender.sendMessage(text("Usage: " + this.usageMessage, NamedTextColor.RED));
|
||||
return true;
|
||||
@@ -111,7 +118,7 @@ public class TimingsCommand extends BukkitCommand {
|
||||
@@ -115,7 +119,7 @@ public class TimingsCommand extends BukkitCommand {
|
||||
Preconditions.checkNotNull(args, "Arguments cannot be null");
|
||||
Preconditions.checkNotNull(alias, "Alias cannot be null");
|
||||
|
||||
@@ -193,10 +194,10 @@ index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48c
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index a6bdd42b38454fe481f9210e1a0f5f94023a0543..e58273032706f1b85e0d32991c27048733ffa9ad 100644
|
||||
index f1af93319d6b29d7bc709e7e273e8abe26c7b4af..78a9155e78178f1cc8da2a2d42fd3276565030f5 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -2464,4 +2464,127 @@ public final class Bukkit {
|
||||
@@ -2461,4 +2461,127 @@ public final class Bukkit {
|
||||
public static Server.Spigot spigot() {
|
||||
return server.spigot();
|
||||
}
|
||||
@@ -325,7 +326,7 @@ index a6bdd42b38454fe481f9210e1a0f5f94023a0543..e58273032706f1b85e0d32991c270487
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/ChatColor.java b/src/main/java/org/bukkit/ChatColor.java
|
||||
index e3f185dc982d1c38195a4e01ddd485c13ffa58c0..98c2f73ee5c921dab506fc933a0acff400201537 100644
|
||||
index ea4ceb643239c26851bacbf45fc3f2efef3bb4be..3b8395dcb73e3fb251adf7438cbc7e95c4185a3a 100644
|
||||
--- a/src/main/java/org/bukkit/ChatColor.java
|
||||
+++ b/src/main/java/org/bukkit/ChatColor.java
|
||||
@@ -3,6 +3,7 @@ package org.bukkit;
|
||||
@@ -336,7 +337,7 @@ index e3f185dc982d1c38195a4e01ddd485c13ffa58c0..98c2f73ee5c921dab506fc933a0acff4
|
||||
import java.util.regex.Pattern;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -454,4 +455,77 @@ public enum ChatColor {
|
||||
@@ -455,4 +456,77 @@ public enum ChatColor {
|
||||
BY_CHAR.put(color.code, color);
|
||||
}
|
||||
}
|
||||
@@ -415,10 +416,10 @@ index e3f185dc982d1c38195a4e01ddd485c13ffa58c0..98c2f73ee5c921dab506fc933a0acff4
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 3c5e90f039f0d2991be442168703526405e18e3d..df992c41d736ee4e89773c2621d261d6afcb2148 100644
|
||||
index adb2416887cc3b544ec36c552bdf7105328c24a5..d334c963e16590c68ecd9d1d27434c7af6f7e21c 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -11066,4 +11066,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -11156,4 +11156,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
public String getItemTranslationKey() {
|
||||
return Bukkit.getUnsafe().getItemTranslationKey(this);
|
||||
}
|
||||
@@ -579,10 +580,10 @@ index 69b50eee42e8c52063033705bd23a5ef5231ed83..3578ab0c3a413d56bc39af43b5d3201d
|
||||
+ // Purpur end - OfflinePlayer API
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index ce2ef5cff6ad10b64791e67f6d3cff328c2cf7dc..c293dbc96051a5a5d11dc445b8c389e2ce33ec84 100644
|
||||
index 8621dba7f10ab822b5b99ce0d05da58823605cb6..730caafaf9629664ba125f3884559da76616f655 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1971,6 +1971,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1968,6 +1968,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -601,7 +602,7 @@ index ce2ef5cff6ad10b64791e67f6d3cff328c2cf7dc..c293dbc96051a5a5d11dc445b8c389e2
|
||||
/**
|
||||
* Sends the component to the player
|
||||
*
|
||||
@@ -2139,4 +2151,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -2136,4 +2148,105 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
*/
|
||||
@NotNull org.bukkit.potion.PotionBrewer getPotionBrewer();
|
||||
// Paper end
|
||||
@@ -708,10 +709,10 @@ index ce2ef5cff6ad10b64791e67f6d3cff328c2cf7dc..c293dbc96051a5a5d11dc445b8c389e2
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
|
||||
index aa04d7df70d99402c91e920fd693d7d4fb655786..a38863ebd363f54994753937a10e041076846af0 100644
|
||||
index 0b8776355f724927ada826735d5e73f3fb6897d5..cf8b93aa5787e96f54e2ffe2a0f157b0e53e2c5c 100644
|
||||
--- a/src/main/java/org/bukkit/World.java
|
||||
+++ b/src/main/java/org/bukkit/World.java
|
||||
@@ -4010,6 +4010,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@@ -4018,6 +4018,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient
|
||||
@Nullable
|
||||
public DragonBattle getEnderDragonBattle();
|
||||
|
||||
@@ -932,10 +933,10 @@ index 138d2530de2410f4a9424dabd3e5ce0cd1c1dcd2..10a8d64ad2da0be2c14f34c3e7d1957c
|
||||
// Paper start
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 8c58018b155c52a7b2a139f784abceb6aa00a268..dc16fd3f342994dc3ea88b0980e4b3f56621ddf3 100644
|
||||
index a2a423d4e4c2702ba5967223cab0432dd7d04732..cc78ce7de88a9a404ed20d5bc61b98d3107f29b3 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -953,4 +953,55 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
@@ -954,4 +954,55 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
boolean wouldCollideUsing(@NotNull BoundingBox boundingBox);
|
||||
// Paper End - Collision API
|
||||
@@ -1084,10 +1085,10 @@ index 58017fce436cdbda255f7172fbdadb726d4b113c..05600fc8bf2a61aca8094029bc4c208a
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
index 059dfc40edc6c52f95a30e9ac72f45b6aaf5f9a8..216ad2cf780cc432e85cd59a8cd8deb33b701a70 100644
|
||||
index ffca32ae2464ea5a669029079a50585ca259a4f8..654dc0c6d98b29cf45d3826aece374726e3e9802 100644
|
||||
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
||||
@@ -1148,4 +1148,41 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
@@ -1150,4 +1150,41 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
||||
*/
|
||||
void setBodyYaw(float bodyYaw);
|
||||
// Paper end
|
||||
@@ -1155,10 +1156,10 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 5f11b2e9c1bca121ae72dd0ec94ae4a86f80a324..8d7ec62544f24bd71e4924f36fe1ee159927481d 100644
|
||||
index ee446bfb3e6c4b1d4428c00d6406bf9455c68ad5..43cef54d355c8a1b6a8cd6be89a6a805e9f88566 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -3000,4 +3000,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@@ -3035,4 +3035,139 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@Override
|
||||
Spigot spigot();
|
||||
// Spigot end
|
||||
@@ -1324,7 +1325,7 @@ index 7fbfdb07585c7b28acea1f0c1f58ada0cc744441..21fcca092e2e31baa5ece0de9e44e3fa
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index c61e7e41aeb3d4f5f4ac47da8890051d8e97340d..12b08318f78c8144cc809dbccf0feabdd31f0ee2 100644
|
||||
index 3bc24457d143449e6a338d79becf7c39b9f81054..4a5edf4e72e81b22c1abb2ade244f7f4292e993c 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -328,4 +328,14 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -1393,7 +1394,7 @@ index 84db38388bf7a58e66d6cd29620b4fe64b0a897e..82ebd99549ce9f9e6427a50cef424e90
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java b/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java
|
||||
index 01c5e8b71338fbb4b1605e45bf2a2e705188f6b5..118d53ec9d1dc9c01cedfbedaf0b8edcbda7b3a5 100644
|
||||
index c9f395064656dd0126410eb3c6e197baa450c063..13156a12e5df50cdc1e465dc0bd9d94108275629 100644
|
||||
--- a/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java
|
||||
+++ b/src/main/java/org/bukkit/event/entity/EntityPotionEffectEvent.java
|
||||
@@ -217,6 +217,12 @@ public class EntityPotionEffectEvent extends EntityEvent implements Cancellable
|
||||
@@ -1410,10 +1411,10 @@ index 01c5e8b71338fbb4b1605e45bf2a2e705188f6b5..118d53ec9d1dc9c01cedfbedaf0b8edc
|
||||
* When a player gets bad omen after killing a patrol captain.
|
||||
*/
|
||||
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
index 94f127fd6ba69ca48d03acbc9886ee499e9be4f3..1f958facfed766c401144b840e4369154c71d3c2 100644
|
||||
index a8e631315f2da68895a258cf0ba9875bc88fc48c..d5648ec745e3530aecf18c3e1f3185a5f63f3d11 100644
|
||||
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
|
||||
@@ -152,7 +152,7 @@ public enum InventoryType {
|
||||
@@ -155,7 +155,7 @@ public enum InventoryType {
|
||||
SMITHING_NEW(4, "Upgrade Gear"),
|
||||
;
|
||||
|
||||
@@ -1442,7 +1443,7 @@ index c60be4fd24c7fdf65251dd6169e5e1ac3b588d95..569deccd2f1cf21da9b5906433ac493c
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 9d68ad599a037748d033239f54cf95941b87766a..8216b53724bfad3c29bf6b75e17f4640e4915a00 100644
|
||||
index d15a74c38576c49df61cfab02c70fc5d8c0dd5f7..64055402076b62d32ba947830d935b79bae12d95 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -17,6 +17,18 @@ import org.bukkit.inventory.meta.ItemMeta;
|
||||
@@ -4062,7 +4063,7 @@ index 0000000000000000000000000000000000000000..38483d908ed830e97883733bee2370f8
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
index 123647bb10fc89508437d7a0bd3fd31d58ee7c82..ce209668dd7f11b284bd7f5688191a0b3ae86a09 100644
|
||||
index 12946bd55fcf7c40d39081779a7fa30049ee6165..9c2d605c50cbf9aefa56ec209df9f6cea1392e89 100644
|
||||
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
@@ -61,7 +61,7 @@ public final class CustomTimingsHandler {
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Plazma Configurations
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index e0f69edf603c2ec99bc92b16b18912272cc41bd9..188cd7b3270422719297a6fd3ecec4a20d9b4f3c 100644
|
||||
index 730caafaf9629664ba125f3884559da76616f655..bea2e55c79541939756012963452ca0436d39782 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1971,6 +1971,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1968,6 +1968,13 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Publish Packages
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 42de5c470a2fbb1e0bc9b809c033e3afe30502fa..c2c506afd44c7f14de51bd93004aa8a32ff2103e 100644
|
||||
index 7b38042c32295ef7c5ea3c212170cc8fcdf0d7a0..1e300e51fa3413f9846c686545f2b7deb0ac5160 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -155,3 +155,23 @@ tasks.check {
|
||||
@@ -156,3 +156,23 @@ tasks.check {
|
||||
dependsOn(scanJar)
|
||||
}
|
||||
// Paper end
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -175,10 +175,10 @@ index c6fa6bcd66d61359124a8426b919493c6ec43f06..e0eaa847526431ac58d00f18f0fca6b1
|
||||
/* CraftBukkit start - Replace everything
|
||||
OptionParser optionparser = new OptionParser();
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2cc20cc768bbbd386972c426d3a131af33612294..b81f8207348992761eac2aca8bae370c9b39f0f3 100644
|
||||
index beb05039926e1fb7a656dfcd0c503f82db67fc46..615c456de68a20d0e95b30e124a2bdf46039408f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -929,7 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -930,7 +930,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
if (!isSameThread()) {
|
||||
@@ -245,7 +245,7 @@ index bd502ca721de0cab438d995efa00ad0554c0d2fe..d72f61f545c3929825e628607b85e0d2
|
||||
|
||||
private static final int DEFAULT_SIZE_THRESHOLD = 1024 * 8;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bc1a2df0a7ddaf030917e4723994464d77e55d02..e59532dda47d0f9635b5393cb4ef0484fd6bb9ae 100644
|
||||
index b4d174e3603a45f768add973796d603f4ed8f976..57cbf7ca104aa7779bc1e705b60e71dcbfb680b8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -256,7 +256,7 @@ import javax.annotation.Nullable; // Paper
|
||||
@@ -258,10 +258,10 @@ index bc1a2df0a7ddaf030917e4723994464d77e55d02..e59532dda47d0f9635b5393cb4ef0484
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index cf7ba8724ab68f6955b5ebfa1ba46c4397da32b3..54cbe906619a30b5f7b5dbb344eebf3452e1b200 100644
|
||||
index 7ef5980f7321662aa7034a74c2f6926846425db9..00200576bad5a92c65df762239dbec9a6e9a239b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -883,7 +883,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -884,7 +884,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return EntityCategory.WATER;
|
||||
}
|
||||
|
||||
|
||||
@@ -169,10 +169,10 @@ index f6b9d216c24d8858802f85209fe1a869e5a9be31..746fdd880862e7dd8b53dec99b07ae62
|
||||
+ // Plazma end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b81f8207348992761eac2aca8bae370c9b39f0f3..9ba8bf1cc91494651a1855d12415f4ac3586cf9d 100644
|
||||
index 62ccafc3df9e2d25dbe7e2ad9322f306f8df8061..abf904a1d0dc7a5943cdba540c2b76eb0577954d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -308,6 +308,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -309,6 +309,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final double[] recentTps = new double[ 4 ]; // Purpur
|
||||
// Spigot end
|
||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||
@@ -180,7 +180,7 @@ index b81f8207348992761eac2aca8bae370c9b39f0f3..9ba8bf1cc91494651a1855d12415f4ac
|
||||
public static long currentTickLong = 0L; // Paper
|
||||
public boolean lagging = false; // Purpur
|
||||
protected boolean upnp = false; // Purpur
|
||||
@@ -414,6 +415,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -415,6 +416,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper
|
||||
|
||||
@@ -7,38 +7,43 @@ Original: YouHaveTrouble/minecraft-optimization, AkiraDevelopment/SimplyMC
|
||||
Copyright (C) 2023 YouHaveTrouble, AkiraDevelopment
|
||||
|
||||
diff --git a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
index 62b2a3a44929b80b813bc24a33cd1f5049fecbb2..cea33db916f9fd828f3cb131a4b2ebdd16866649 100644
|
||||
index 47e77541e558e18758ae0fcc2aa4e47261e928b6..dd3a29c49392910a38be14a638c6c9b6e825d772 100644
|
||||
--- a/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
+++ b/src/main/java/gg/pufferfish/pufferfish/PufferfishConfig.java
|
||||
@@ -211,7 +211,7 @@ public class PufferfishConfig {
|
||||
@@ -211,8 +211,8 @@ public class PufferfishConfig {
|
||||
public static int maxProjectileLoadsPerTick;
|
||||
public static int maxProjectileLoadsPerProjectile;
|
||||
private static void projectileLoading() {
|
||||
- maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", 10, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick.");
|
||||
+ maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10 : 8, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); // Plazma
|
||||
maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
|
||||
- maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
|
||||
+ maxProjectileLoadsPerTick = getInt("projectile.max-loads-per-tick", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 10 : 8, "Controls how many chunks are allowed", "to be sync loaded by projectiles in a tick."); // Plazma
|
||||
+ maxProjectileLoadsPerProjectile = getInt("projectile.max-loads-per-projectile", 10, "Controls how many chunks a projectile", "can load in its lifetime before it gets", "automatically removed.");
|
||||
|
||||
setComment("projectile", "Optimizes projectile settings");
|
||||
@@ -225,7 +225,7 @@ public class PufferfishConfig {
|
||||
}
|
||||
@@ -225,16 +225,16 @@ public class PufferfishConfig {
|
||||
public static int activationDistanceMod;
|
||||
|
||||
private static void dynamicActivationOfBrains() throws IOException {
|
||||
- dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", false); // Purpur
|
||||
+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", !Boolean.getBoolean("Plazma.disableConfigOptimization")); // Purpur // Plazma
|
||||
startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
|
||||
- startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
|
||||
+ dearEnabled = getBoolean("dab.enabled", "activation-range.enabled", !Boolean.getBoolean("Plazma.disableConfigOptimization")); // Purpur // Plazma
|
||||
+ startDistance = getInt("dab.start-distance", "activation-range.start-distance", 12,
|
||||
"This value determines how far away an entity has to be",
|
||||
"from the player to start being effected by DEAR.");
|
||||
@@ -233,7 +233,7 @@ public class PufferfishConfig {
|
||||
startDistanceSquared = startDistance * startDistance;
|
||||
maximumActivationPrio = getInt("dab.max-tick-freq", "activation-range.max-tick-freq", 20,
|
||||
"This value defines how often in ticks, the furthest entity",
|
||||
"will get their pathfinders and behaviors ticked. 20 = 1s");
|
||||
- activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", 8,
|
||||
+ activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 7, // Plazma
|
||||
"This value defines how much distance modifies an entity's",
|
||||
- "This value defines how much distance modifies an entity's",
|
||||
+ activationDistanceMod = getInt("dab.activation-dist-mod", "activation-range.activation-dist-mod", Boolean.getBoolean("Plazma.disableConfigOptimization") ? 8 : 7, // Plazma
|
||||
+ "This value defines how much distance modifies an entity's",
|
||||
"tick frequency. freq = (distanceToPlayer^2) / (2^value)",
|
||||
"If you want further away entities to tick less often, use 7.",
|
||||
@@ -269,16 +269,16 @@ public class PufferfishConfig {
|
||||
|
||||
"If you want further away entities to tick more often, try 9.");
|
||||
@@ -269,7 +269,7 @@ public class PufferfishConfig {
|
||||
|
||||
public static boolean throttleInactiveGoalSelectorTick;
|
||||
private static void inactiveGoalSelectorThrottle() {
|
||||
- getBoolean("inactive-goal-selector-throttle", "inactive-goal-selector-disable", false, // Purpur
|
||||
@@ -46,22 +51,11 @@ index 62b2a3a44929b80b813bc24a33cd1f5049fecbb2..cea33db916f9fd828f3cb131a4b2ebdd
|
||||
"Throttles the AI goal selector in entity inactive ticks.",
|
||||
"This can improve performance by a few percent, but has minor gameplay implications.");
|
||||
}
|
||||
|
||||
|
||||
- public static boolean disableMethodProfiler;
|
||||
+ public static boolean disableMethodProfiler = true; // Plazma
|
||||
public static boolean disableOutOfOrderChat;
|
||||
private static void miscSettings() {
|
||||
- disableMethodProfiler = getBoolean("misc.disable-method-profiler", true);
|
||||
+ //disableMethodProfiler = getBoolean("misc.disable-method-profiler", true); // Plazma
|
||||
disableOutOfOrderChat = getBoolean("misc.disable-out-of-order-chat", false);
|
||||
setComment("misc", "Settings for things that don't belong elsewhere");
|
||||
}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
index 6bf14183a3fcd2b3d166752ce33240d2ff1ffa7c..4398c1b992f53248bb13180d4a69e55c0e742387 100644
|
||||
index 8d442c5a498ecf288a0cc0c54889c6e2fda849ce..205ce3456a3f6d28cc2c7cbc131ec0f63a461527 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -114,7 +114,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
@@ -103,7 +103,7 @@ public class GlobalConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Watchdog extends ConfigurationPart {
|
||||
public int earlyWarningEvery = 5000;
|
||||
@@ -71,7 +65,7 @@ index 6bf14183a3fcd2b3d166752ce33240d2ff1ffa7c..4398c1b992f53248bb13180d4a69e55c
|
||||
|
||||
public SpamLimiter spamLimiter;
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7a65d5262 100644
|
||||
index ee430563b99e48cd722c2897e4729936457d3017..5a1be0fe6cd96dbb1c786b27ad3ac943ce13ed3c 100644
|
||||
--- a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
|
||||
@@ -84,15 +84,15 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -79,7 +73,7 @@ index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7
|
||||
public class AntiXray extends ConfigurationPart {
|
||||
public boolean enabled = false;
|
||||
- public EngineMode engineMode = EngineMode.HIDE;
|
||||
+ public EngineMode engineMode = Boolean.getBoolean("Plazma.disableConfigOptimization") ? EngineMode.HIDE : EngineMode.OBFUSCATE; // Plazma - Optimize Default Configurations
|
||||
+ public EngineMode engineMode = Boolean.getBoolean("Plazma.disableConfigOptimization") ? EngineMode.HIDE : EngineMode.OBFUSCATE_LAYER; // Plazma - Optimize Default Configurations
|
||||
public int maxBlockHeight = 64;
|
||||
public int updateRadius = 2;
|
||||
public boolean lavaObscures = false;
|
||||
@@ -95,7 +89,7 @@ index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -139,7 +139,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@MergeMap
|
||||
public Reference2IntMap<MobCategory> spawnLimits = Util.make(new Reference2IntOpenHashMap<>(NaturalSpawner.SPAWNING_CATEGORIES.length), map -> Arrays.stream(NaturalSpawner.SPAWNING_CATEGORIES).forEach(mobCategory -> map.put(mobCategory, -1)));
|
||||
@MergeMap
|
||||
@@ -104,7 +98,7 @@ index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7
|
||||
|
||||
@ConfigSerializable
|
||||
public record DespawnRange(@Required int soft, @Required int hard) {
|
||||
@@ -317,7 +317,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -323,7 +323,7 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Environment extends ConfigurationPart {
|
||||
public boolean disableThunder = false;
|
||||
public boolean disableIceAndSnow = false;
|
||||
@@ -113,7 +107,7 @@ index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7
|
||||
public boolean disableExplosionKnockback = false;
|
||||
public boolean generateFlatBedrock = false;
|
||||
public FrostedIce frostedIce;
|
||||
@@ -397,9 +397,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -403,9 +403,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public class Collisions extends ConfigurationPart {
|
||||
public boolean onlyPlayersCollide = false;
|
||||
public boolean allowVehicleCollisions = true;
|
||||
@@ -125,7 +119,7 @@ index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7
|
||||
public boolean allowPlayerCrammingDamage = false;
|
||||
}
|
||||
|
||||
@@ -407,18 +407,40 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -413,18 +413,40 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Chunks extends ConfigurationPart {
|
||||
public AutosavePeriod autoSaveInterval = AutosavePeriod.def();
|
||||
@@ -175,7 +169,7 @@ index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7
|
||||
});
|
||||
}
|
||||
|
||||
@@ -432,11 +454,30 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -438,9 +460,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
public TickRates tickRates;
|
||||
|
||||
public class TickRates extends ConfigurationPart {
|
||||
@@ -183,34 +177,11 @@ index 51cf0014c4229fc8671804d885b6381996810130..9b7fbdb170c9d936b874f7462b1eeff7
|
||||
+ public int grassSpread = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1 : 4; // Plazma - Optimize Default Configurations
|
||||
public int containerUpdate = 1;
|
||||
- public int mobSpawner = 1;
|
||||
- public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40));
|
||||
- public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "validatenearbypoi", -1));
|
||||
+ public int mobSpawner = Boolean.getBoolean("Plazma.disableConfigOptimization") ? 1 : 2; // Plazma - Optimize Default Configurations
|
||||
+ // Plazma start - Optimize Default Configurations
|
||||
+ public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> {
|
||||
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
|
||||
+ table.put(EntityType.VILLAGER, "secondarypoisensor", 80);
|
||||
+ table.put(EntityType.VILLAGER, "nearestbedsensor", 80);
|
||||
+ table.put(EntityType.VILLAGER, "villagerbabiessensor", 40);
|
||||
+ table.put(EntityType.VILLAGER, "playersensor", 40);
|
||||
+ table.put(EntityType.VILLAGER, "nearestlivingentitysensor", 40);
|
||||
+ } else {
|
||||
+ table.put(EntityType.VILLAGER, "secondarypoisensor", 40);
|
||||
+ }
|
||||
+ });
|
||||
+ public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> {
|
||||
+ if (!Boolean.getBoolean("Plazma.disableConfigOptimization")) {
|
||||
+ table.put(EntityType.VILLAGER, "acquirepoi", 120);
|
||||
+ table.put(EntityType.VILLAGER, "validatenearbypoi", 60);
|
||||
+ } else {
|
||||
+ table.put(EntityType.VILLAGER, "validatenearbypoi", -1);
|
||||
+ }
|
||||
+ });
|
||||
+ // Plazma end
|
||||
public Table<EntityType<?>, String, Integer> sensor = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "secondarypoisensor", 40));
|
||||
public Table<EntityType<?>, String, Integer> behavior = Util.make(HashBasedTable.create(), table -> table.put(EntityType.VILLAGER, "validatenearbypoi", -1));
|
||||
}
|
||||
|
||||
@Setting(FeatureSeedsGeneration.FEATURE_SEEDS_KEY)
|
||||
@@ -458,9 +499,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
@@ -464,9 +486,9 @@ public class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
public class Misc extends ConfigurationPart {
|
||||
public int lightQueueSize = 20;
|
||||
@@ -290,7 +261,7 @@ index 1ea3012995c738c67b31e997c138f824f9e69ba1..8ed00a650b712cbf4bc8796165a539d7
|
||||
this.enableStatus = this.get("enable-status", true);
|
||||
this.hideOnlinePlayers = this.get("hide-online-players", false);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7b7c9c8aa1bb949b6076161f5b175941e407b9b6..5f06d41d74d769281a05d98db806172c92b88388 100644
|
||||
index a694d01b32bff939eb82d3c659158454af75225c..9760095f77b6425610f93abac467f92742eb2178 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -346,7 +346,7 @@ public final class CraftServer implements Server {
|
||||
@@ -328,7 +299,7 @@ index ac238eeea791180b66677870401c0b756f0db07b..ce960bc620d84e56c4e7fc9b721fd45c
|
||||
useAlternateKeepAlive = getBoolean("settings.use-alternate-keepalive", useAlternateKeepAlive);
|
||||
}
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index d3f2002759ac4788feca1e62c90c2e64596eb2f2..47f2c8f23e318b89324bfcb1342dadc325f53afc 100644
|
||||
index 9159e790533f06582a521f11103e6cbcbc72978b..ebe966834337740fa5f918bf66fc3be1c3f5c588 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -425,7 +425,7 @@ public class PurpurWorldConfig {
|
||||
|
||||
@@ -8,7 +8,7 @@ Original by Irochi <me@irochi.moe>
|
||||
Licensed under the GPL 3.0
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
index 4d9bc4a62ebae0f3707900503576c64733de639f..20265e7c71c125bc5b77039f4901e230738e849f 100644
|
||||
index 951a7df30bd70bb3051c04f592529d560be6948e..461dbcac2f1265be7b23960f4422f69d5c8c42a9 100644
|
||||
--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||
@@ -353,7 +353,7 @@ public final class ChatProcessor {
|
||||
@@ -73,10 +73,10 @@ index 429ccd583ecd136a63862e94b8eb36b371e28d0f..efcee39cd7154493de04ca903edbd32b
|
||||
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 1a288ebcaade0cc44c7d09478f4f2f8eee7a4269..916b42ffaf5d60aebc0cc3f3c0ee37bdb7b5ca2d 100644
|
||||
index 33d4c1af86382cc3343d5db42283b27f69f52374..030166f46b2ce23976a679685ffccf8b5439ce48 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1426,7 +1426,7 @@ public abstract class PlayerList {
|
||||
@@ -1431,7 +1431,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
public void broadcastChatMessage(PlayerChatMessage message, Predicate<ServerPlayer> shouldSendFiltered, @Nullable ServerPlayer sender, ChatType.Bound params, @Nullable Function<net.kyori.adventure.audience.Audience, Component> unsignedFunction) {
|
||||
// Paper end
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Add permission to bypass reducedDebugInfo gamerule
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 916b42ffaf5d60aebc0cc3f3c0ee37bdb7b5ca2d..0615c92894f42ccc320a5a6f5e6c5289a2dee5f9 100644
|
||||
index 030166f46b2ce23976a679685ffccf8b5439ce48..427a50198c80459fb4d2364a859ed978b1ec7871 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -268,7 +268,7 @@ public abstract class PlayerList {
|
||||
@@ -273,7 +273,7 @@ public abstract class PlayerList {
|
||||
ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player);
|
||||
GameRules gamerules = worldserver1.getGameRules();
|
||||
boolean flag = gamerules.getBoolean(GameRules.RULE_DO_IMMEDIATE_RESPAWN);
|
||||
@@ -17,7 +17,7 @@ index 916b42ffaf5d60aebc0cc3f3c0ee37bdb7b5ca2d..0615c92894f42ccc320a5a6f5e6c5289
|
||||
|
||||
// Spigot - view distance
|
||||
playerconnection.send(new ClientboundLoginPacket(player.getId(), worlddata.isHardcore(), player.gameMode.getGameModeForPlayer(), player.gameMode.getPreviousGameModeForPlayer(), this.server.levelKeys(), this.synchronizedRegistries, worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), this.getMaxPlayers(), worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetSendDistance(), worldserver1.getChunkSource().chunkMap.playerChunkManager.getTargetTickViewDistance(), flag1, !flag, worldserver1.isDebug(), worldserver1.isFlat(), player.getLastDeathLocation())); // Paper - replace old player chunk management
|
||||
@@ -1293,7 +1293,7 @@ public abstract class PlayerList {
|
||||
@@ -1298,7 +1298,7 @@ public abstract class PlayerList {
|
||||
player.getEntityData().refresh(player); // CraftBukkkit - SPIGOT-7218: sync metadata
|
||||
player.connection.send(new ClientboundSetCarriedItemPacket(player.getInventory().selected));
|
||||
// CraftBukkit start - from GameRules
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration to disable moved to quickly check for
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ae3c1bd67c144fe971d4df6df2ca171b431b6fc5..dee076d1e6e30f108a79565546182b4751737baa 100644
|
||||
index 177090697e42fcca84dbfdf04ca5118a2c5e7be2..32e91b8866dd2aa5e4d26ef6ca77dc3f1206781b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1534,7 +1534,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1543,7 +1543,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
if (!this.player.isChangingDimension() && (!this.player.getLevel().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) {
|
||||
float f2 = this.player.isFallFlying() ? 300.0F : 100.0F;
|
||||
|
||||
|
||||
@@ -18,10 +18,10 @@ index e5ea9f27a1936ed9e329e74317c91c5df89b9fbd..7e7a4d872983cd2efdc575bc33353f94
|
||||
private long lastFill = -1;
|
||||
private long nextRefill = -1;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9ba8bf1cc91494651a1855d12415f4ac3586cf9d..17cd928af104d74704d61ca26084bd60014af800 100644
|
||||
index cc6968a064b30f7250d18c20efb2bb8602bb0cdd..3c80e14392ee7a6bf5040d7cb81b7d894e162eff 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -693,7 +693,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -694,7 +694,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition());
|
||||
// CraftBukkit start
|
||||
if (world.generator != null) {
|
||||
@@ -31,10 +31,10 @@ index 9ba8bf1cc91494651a1855d12415f4ac3586cf9d..17cd928af104d74704d61ca26084bd60
|
||||
|
||||
if (spawn != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index c6a3b59c65466f9f2b16cefe0059a6e5dd84044c..a3499de4efb45f598b3fae796618531164e0b209 100644
|
||||
index b5415f0c65db728f4a935b87b54fa14b68d31bc4..27474beb980afcb92cace1e1c37e7a2aa5060daf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -226,7 +226,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -227,7 +227,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
|
||||
@@ -71,10 +71,10 @@ index efcee39cd7154493de04ca903edbd32b5901b191..a398b71c52817bd68a05613ec037ed6d
|
||||
|
||||
protected boolean convertOldUsers() {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index dee076d1e6e30f108a79565546182b4751737baa..c18f953950fd2c00a3880fa20c9904a940191666 100644
|
||||
index 32e91b8866dd2aa5e4d26ef6ca77dc3f1206781b..48f66a67c251d1183d59a3b8ad417980419a9906 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2224,10 +2224,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2234,10 +2234,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
|
||||
@Override
|
||||
public void send(Packet<?> packet) {
|
||||
@@ -96,10 +96,10 @@ index dee076d1e6e30f108a79565546182b4751737baa..c18f953950fd2c00a3880fa20c9904a9
|
||||
if (packet == null || this.processedDisconnect) { // Spigot
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 0615c92894f42ccc320a5a6f5e6c5289a2dee5f9..e9728c2b14462e7a8ce196bc59d8829d42177ef0 100644
|
||||
index 427a50198c80459fb4d2364a859ed978b1ec7871..6d3e66f91f6ba47a2cde29e68f6961fdf0bde4de 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1457,7 +1457,7 @@ public abstract class PlayerList {
|
||||
@@ -1462,7 +1462,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean verifyChatTrusted(PlayerChatMessage message) { // Paper - private -> public
|
||||
|
||||
30
patches/server/0029-Implement-MemoryLeakFix.patch
Normal file
30
patches/server/0029-Implement-MemoryLeakFix.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: IPECTER <ipectert@gmail.com>
|
||||
Date: Tue, 28 Mar 2023 12:42:17 +0900
|
||||
Subject: [PATCH] Implement MemoryLeakFix
|
||||
|
||||
Original: fxmorin/MemoryLeakFix
|
||||
Copyright (C) 2023 fxmorin
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
index ed439b7e94646141c93a7dd3704d1cdeb5c27e16..2bddcaf8762ee7834c32622402a976bfad12d127 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||
@@ -67,7 +67,7 @@ public final class Biome {
|
||||
private final MobSpawnSettings mobSettings;
|
||||
private final BiomeSpecialEffects specialEffects;
|
||||
// Pufferfish start - use our cache
|
||||
- private final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> {
|
||||
+ private static final ThreadLocal<gg.airplane.structs.Long2FloatAgingCache> temperatureCache = ThreadLocal.withInitial(() -> { // Plazma - MemoryLeakFix
|
||||
return Util.make(() -> {
|
||||
/*
|
||||
Long2FloatLinkedOpenHashMap long2FloatLinkedOpenHashMap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
|
||||
@@ -125,7 +125,7 @@ public final class Biome {
|
||||
public float getTemperature(BlockPos blockPos) {
|
||||
long l = blockPos.asLong();
|
||||
// Pufferfish start
|
||||
- gg.airplane.structs.Long2FloatAgingCache cache = this.temperatureCache.get();
|
||||
+ gg.airplane.structs.Long2FloatAgingCache cache = temperatureCache.get(); // Plazma - MemoryLeakFix
|
||||
float f = cache.getValue(l);
|
||||
if (!Float.isNaN(f)) {
|
||||
return f;
|
||||
@@ -9,7 +9,7 @@ pluginManagement {
|
||||
|
||||
rootProject.name = "plazma"
|
||||
for (name in listOf("Plazma-API", "Plazma-Server")) {
|
||||
val projName = name.toLowerCase(Locale.ENGLISH)
|
||||
val projName = name.lowercase(Locale.ENGLISH)
|
||||
include(projName)
|
||||
findProject(":$projName")!!.projectDir = file(name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user