mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-23 08:49:28 +00:00
Update patches for 1.19.4
This commit is contained in:
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index c16ebc233bce9fd2020d3dde6253c3b90000c0f3..96191e3d1b0c8f3be37daa02a719ddad883dd95f 100644
|
index cad12a2632b9ebb569280441c42869685db1f31a..dce9befdddf18048384b828dfe52593d5b0eaa99 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -84,6 +84,15 @@ val generateApiVersioningFile by tasks.registering {
|
@@ -85,6 +85,15 @@ val generateApiVersioningFile by tasks.registering {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ index c16ebc233bce9fd2020d3dde6253c3b90000c0f3..96191e3d1b0c8f3be37daa02a719ddad
|
|||||||
tasks.jar {
|
tasks.jar {
|
||||||
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
|
from(generateApiVersioningFile.map { it.outputs.files.singleFile }) {
|
||||||
into("META-INF/maven/${project.group}/${project.name}")
|
into("META-INF/maven/${project.group}/${project.name}")
|
||||||
@@ -132,6 +141,8 @@ tasks.withType<Javadoc> {
|
@@ -133,6 +142,8 @@ tasks.withType<Javadoc> {
|
||||||
into("build/docs/javadoc")
|
into("build/docs/javadoc")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 96191e3d1b0c8f3be37daa02a719ddad883dd95f..1f8ce35cbc0802917d6fb166fe276a22b03835ed 100644
|
index dce9befdddf18048384b828dfe52593d5b0eaa99..8af9efe2dbc9563a2c327002cf05c5d2fd8fc68b 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -90,6 +90,7 @@ tasks.withType<JavaCompile> {
|
@@ -91,6 +91,7 @@ tasks.withType<JavaCompile> {
|
||||||
compilerArgs.add("-Xlint:-module")
|
compilerArgs.add("-Xlint:-module")
|
||||||
compilerArgs.add("-Xlint:-removal")
|
compilerArgs.add("-Xlint:-removal")
|
||||||
compilerArgs.add("-Xlint:-dep-ann")
|
compilerArgs.add("-Xlint:-dep-ann")
|
||||||
@@ -24,7 +24,7 @@ index 96191e3d1b0c8f3be37daa02a719ddad883dd95f..1f8ce35cbc0802917d6fb166fe276a22
|
|||||||
}
|
}
|
||||||
// Gale end - hide irrelevant compilation warnings
|
// Gale end - hide irrelevant compilation warnings
|
||||||
|
|
||||||
@@ -143,6 +144,7 @@ tasks.withType<Javadoc> {
|
@@ -144,6 +145,7 @@ tasks.withType<Javadoc> {
|
||||||
}
|
}
|
||||||
|
|
||||||
options.addStringOption("Xdoclint:none", "-quiet") // Gale - hide irrelevant compilation warnings
|
options.addStringOption("Xdoclint:none", "-quiet") // Gale - hide irrelevant compilation warnings
|
||||||
|
|||||||
@@ -13,31 +13,26 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||||
index b012ce40d82389c29d1b841ff685425ac10a7f9e..7903554958f567c7b566a47fa4b49852a837898e 100644
|
index 2b8308989fce7f8a16907f8711b362e671fdbfb6..623c683563a5fb5dcf3b8478873ef2a27307b289 100644
|
||||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||||
@@ -653,6 +653,14 @@ public final class SimplePluginManager implements PluginManager {
|
@@ -633,6 +633,19 @@ public final class SimplePluginManager implements PluginManager {
|
||||||
*/
|
HandlerList handlers = event.getHandlers();
|
||||||
@Override
|
RegisteredListener[] listeners = handlers.getRegisteredListeners();
|
||||||
public void callEvent(@NotNull Event event) {
|
|
||||||
+ // Gale start - JettPack - skip events without listeners
|
+ // Gale start - JettPack - skip events without listeners
|
||||||
+ HandlerList handlers = event.getHandlers();
|
|
||||||
+ RegisteredListener[] listeners = handlers.getRegisteredListeners();
|
|
||||||
+ if (listeners.length == 0) {
|
+ if (listeners.length == 0) {
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ // Gale end - JettPack - skip events without listeners
|
+ // Gale end - JettPack - skip events without listeners
|
||||||
+
|
+
|
||||||
// Paper - replace callEvent by merging to below method
|
+ // Paper - replace callEvent by merging to below method
|
||||||
if (event.isAsynchronous() && server.isPrimaryThread()) {
|
+ if (event.isAsynchronous() && server.isPrimaryThread()) {
|
||||||
throw new IllegalStateException(event.getEventName() + " may only be triggered asynchronously.");
|
+ throw new IllegalStateException(event.getEventName() + " may only be triggered asynchronously.");
|
||||||
@@ -660,9 +668,6 @@ public final class SimplePluginManager implements PluginManager {
|
+ } else if (!event.isAsynchronous() && !server.isPrimaryThread() && !server.isStopping() ) {
|
||||||
throw new IllegalStateException(event.getEventName() + " may only be triggered synchronously.");
|
+ throw new IllegalStateException(event.getEventName() + " may only be triggered synchronously.");
|
||||||
}
|
+ }
|
||||||
|
+
|
||||||
- HandlerList handlers = event.getHandlers();
|
|
||||||
- RegisteredListener[] listeners = handlers.getRegisteredListeners();
|
|
||||||
-
|
|
||||||
for (RegisteredListener registration : listeners) {
|
for (RegisteredListener registration : listeners) {
|
||||||
if (!registration.getPlugin().isEnabled()) {
|
if (!registration.getPlugin().isEnabled()) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||||
index d7d94b954262da0cbe11850cbc3ebd45e32c8c76..6acdd0c9a6ea65b06ad5dad4758efb64884daaf3 100644
|
index 660f28e371176c62e38a84b187958aceb235c8e3..b8c1dd6bf4d68f8274da6499262fd6925241e394 100644
|
||||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||||
@@ -1563,6 +1563,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
@@ -1587,6 +1587,16 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||||
@org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
@org.jetbrains.annotations.ApiStatus.Experimental // Paper
|
||||||
public boolean canSee(@NotNull Entity entity);
|
public boolean canSee(@NotNull Entity entity);
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/TextFilterClient.java b/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
diff --git a/src/main/java/net/minecraft/server/network/TextFilterClient.java b/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
||||||
index e0c6783071b1a6ff841842f8a88a990d0fe83180..4b3d2280326c7eeda4952c36edff141cbff90e16 100644
|
index 1b617a64f2f7a48a8b505ee87b61a040b80d8cc6..92f56e29ffb7386cbbf7893c000ff330eb997ba5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
--- a/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
+++ b/src/main/java/net/minecraft/server/network/TextFilterClient.java
|
||||||
@@ -98,38 +98,44 @@ public class TextFilterClient implements AutoCloseable {
|
@@ -98,38 +98,44 @@ public class TextFilterClient implements AutoCloseable {
|
||||||
@@ -93,10 +93,10 @@ index 50a9f33aa31e9273c7c52d4bb2b02f0f884f7ba5..19779298b2b2ecbe30f9308dad1d8037
|
|||||||
});
|
});
|
||||||
return Collections.unmodifiableCollection(list);
|
return Collections.unmodifiableCollection(list);
|
||||||
diff --git a/src/main/java/net/minecraft/util/ExtraCodecs.java b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
diff --git a/src/main/java/net/minecraft/util/ExtraCodecs.java b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||||
index 0e30e20eca4dfd7c9b3f1ec49333cff809ab1b8a..7591002e07271389f9ac8decea25747c0cd8a213 100644
|
index cf64c2bed790da41a2e524e75d60a069765f035a..57fae84be749bd4a61a0c700a5cefce7122643e6 100644
|
||||||
--- a/src/main/java/net/minecraft/util/ExtraCodecs.java
|
--- a/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||||
+++ b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
+++ b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||||
@@ -174,7 +174,7 @@ public class ExtraCodecs {
|
@@ -228,7 +228,7 @@ public class ExtraCodecs {
|
||||||
return ImmutableList.of(leftFunction.apply(pair), rightFunction.apply(pair));
|
return ImmutableList.of(leftFunction.apply(pair), rightFunction.apply(pair));
|
||||||
});
|
});
|
||||||
Codec<I> codec3 = RecordCodecBuilder.<Pair>create((instance) -> {
|
Codec<I> codec3 = RecordCodecBuilder.<Pair>create((instance) -> {
|
||||||
@@ -105,16 +105,16 @@ index 0e30e20eca4dfd7c9b3f1ec49333cff809ab1b8a..7591002e07271389f9ac8decea25747c
|
|||||||
}).comapFlatMap((pair) -> {
|
}).comapFlatMap((pair) -> {
|
||||||
return combineFunction.apply((P)pair.getFirst(), (P)pair.getSecond());
|
return combineFunction.apply((P)pair.getFirst(), (P)pair.getSecond());
|
||||||
}, (pair) -> {
|
}, (pair) -> {
|
||||||
@@ -203,7 +203,7 @@ public class ExtraCodecs {
|
@@ -259,7 +259,7 @@ public class ExtraCodecs {
|
||||||
public <T> DataResult<Pair<A, T>> apply(DynamicOps<T> dynamicOps, T objectx, DataResult<Pair<A, T>> dataResult) {
|
|
||||||
MutableObject<String> mutableObject = new MutableObject<>();
|
|
||||||
Optional<Pair<A, T>> optional = dataResult.resultOrPartial(mutableObject::setValue);
|
Optional<Pair<A, T>> optional = dataResult.resultOrPartial(mutableObject::setValue);
|
||||||
- return optional.isPresent() ? dataResult : DataResult.error("(" + (String)mutableObject.getValue() + " -> using default)", Pair.of(object, object));
|
return optional.isPresent() ? dataResult : DataResult.error(() -> {
|
||||||
+ return optional.isPresent() ? dataResult : DataResult.error("(" + (String)mutableObject.getValue() + " -> using default)", Pair.of(object, (T) object)); // Gale - dev import deobfuscation fixes
|
return "(" + (String)mutableObject.getValue() + " -> using default)";
|
||||||
|
- }, Pair.of(object, object));
|
||||||
|
+ }, Pair.of(object, (T) object)); // Gale - dev import deobfuscation fixes
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T> DataResult<T> coApply(DynamicOps<T> dynamicOps, A objectx, DataResult<T> dataResult) {
|
public <T> DataResult<T> coApply(DynamicOps<T> dynamicOps, A objectx, DataResult<T> dataResult) {
|
||||||
@@ -459,7 +459,7 @@ public class ExtraCodecs {
|
@@ -542,7 +542,7 @@ public class ExtraCodecs {
|
||||||
|
|
||||||
static record LazyInitializedCodec<A>(Supplier<Codec<A>> delegate) implements Codec<A> {
|
static record LazyInitializedCodec<A>(Supplier<Codec<A>> delegate) implements Codec<A> {
|
||||||
LazyInitializedCodec {
|
LazyInitializedCodec {
|
||||||
|
|||||||
@@ -7,13 +7,13 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 7ed5c129d24d56dd90083c5a52721d359f617159..3a8f82fdbecb34b32054cd5bdd30759f5ecab7fa 100644
|
index 337003cf37ee544903c0800f7118dbd5c5a40a63..0b3f1508c2d461a11cf26e9e298e15e3650daccf 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -56,6 +56,16 @@ dependencies {
|
@@ -56,6 +56,16 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
val craftbukkitPackageVersion = "1_19_R2" // Paper
|
val craftbukkitPackageVersion = "1_19_R3" // Paper
|
||||||
+
|
+
|
||||||
+// Gale start - hide irrelevant compilation warnings
|
+// Gale start - hide irrelevant compilation warnings
|
||||||
+tasks.withType<JavaCompile> {
|
+tasks.withType<JavaCompile> {
|
||||||
|
|||||||
@@ -7,17 +7,19 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 172644d99e3632a3c5f0fdb5d1d847f2796b4230..f3b0a2d1a8675013f3af0ed03bc6df12b2be88e2 100644
|
index 1f7d0aa2d36b59c23a04e94dc117da987bc1a0b2..2d031cf2b1f481b0812ea2e60e69b9a29f78d497 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -182,6 +182,10 @@ fun TaskContainer.registerRunTask(
|
@@ -182,6 +182,12 @@ fun TaskContainer.registerRunTask(
|
||||||
val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2")
|
val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2")
|
||||||
val modifiedJvmArgs = jvmArgs ?: arrayListOf()
|
minHeapSize = "${memoryGb}G"
|
||||||
modifiedJvmArgs.addAll(listOf("-Xms${memoryGb}G", "-Xmx${memoryGb}G"))
|
maxHeapSize = "${memoryGb}G"
|
||||||
|
+ val modifiedJvmArgs = jvmArgs ?: arrayListOf()
|
||||||
+ // Gale start - enable virtual threads for development runs
|
+ // Gale start - enable virtual threads for development runs
|
||||||
+ modifiedJvmArgs.add("--enable-preview")
|
+ modifiedJvmArgs.add("--enable-preview")
|
||||||
+ modifiedJvmArgs.addAll(listOf("--add-opens=java.base/java.lang=ALL-UNNAMED"))
|
+ modifiedJvmArgs.addAll(listOf("--add-opens=java.base/java.lang=ALL-UNNAMED"))
|
||||||
+ // Gale end - enable virtual threads for development runs
|
+ // Gale end - enable virtual threads for development runs
|
||||||
jvmArgs = modifiedJvmArgs
|
+ jvmArgs = modifiedJvmArgs
|
||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
|
workingDir.mkdirs()
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index 595957438cc6321d11d1178a74846397b7d30aaa..21dde8d45c98fc57b97d847908c011808d2e3b85 100644
|
index 2d031cf2b1f481b0812ea2e60e69b9a29f78d497..f6bc72697ca7e7cf4b573a95492a2278b7dcb6a0 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -78,7 +78,7 @@ tasks.jar {
|
@@ -78,7 +78,7 @@ tasks.jar {
|
||||||
@@ -190,10 +190,10 @@ index c5d5648f4ca603ef2b1df723b58f9caf4dd3c722..e45e6b44b2a8f2cdae6e0048a812b921
|
|||||||
.completer(new ConsoleCommandCompleter(this.server))
|
.completer(new ConsoleCommandCompleter(this.server))
|
||||||
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
.option(LineReader.Option.COMPLETE_IN_WORD, true);
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 710ca7d3a5659953f64bc6dccdd93b43300961cc..83e161c50f12e10afa481a85001c1d223cba6d89 100644
|
index e67c4a7aaa11f5c67f926f92e0a174af526c2ec3..7806dc9d725e115b6d4b3bc5368e1a24e03b4cc0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -922,7 +922,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -924,7 +924,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
shutdownThread = Thread.currentThread();
|
shutdownThread = Thread.currentThread();
|
||||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||||
if (!isSameThread()) {
|
if (!isSameThread()) {
|
||||||
@@ -208,7 +208,7 @@ index 710ca7d3a5659953f64bc6dccdd93b43300961cc..83e161c50f12e10afa481a85001c1d22
|
|||||||
while (this.getRunningThread().isAlive()) {
|
while (this.getRunningThread().isAlive()) {
|
||||||
this.getRunningThread().stop();
|
this.getRunningThread().stop();
|
||||||
try {
|
try {
|
||||||
@@ -1654,7 +1660,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1681,7 +1687,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
@@ -218,10 +218,10 @@ index 710ca7d3a5659953f64bc6dccdd93b43300961cc..83e161c50f12e10afa481a85001c1d22
|
|||||||
|
|
||||||
public SystemReport fillSystemReport(SystemReport details) {
|
public SystemReport fillSystemReport(SystemReport details) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index f938095d999412d88fa3fcf76b87253034124cb9..715ca54906ce0f7ce738e805cc74750dc521c63f 100644
|
index f9a9d2bb7b6d1bf4a0931438de4d8c7ee0757479..c5ead5947d0ede35060e25876df43aa488ab0121 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -261,7 +261,7 @@ import javax.annotation.Nullable; // Paper
|
@@ -256,7 +256,7 @@ import javax.annotation.Nullable; // Paper
|
||||||
import javax.annotation.Nonnull; // Paper
|
import javax.annotation.Nonnull; // Paper
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
@@ -244,10 +244,10 @@ index cdefb2025eedea7e204d70d568adaf1c1ec4c03c..3997a7fec43e05b455644b4d58c68995
|
|||||||
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 287e8c4c57ea1737460fdaf114e7eed627a25b2d..6d7e14ac2f28cff95c6995a7fc06956cd5c1bd25 100644
|
index 64c50c52c11214740de7903e5592b8b6b2c170b3..963f81196ef0af7cf51496d92e5d1c4363398589 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -462,7 +462,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -464,7 +464,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||||
|
|||||||
@@ -225,11 +225,11 @@ index 9fde9ccb5d069ddce8dd837ef1bc68b93ce66434..a82be9c7226348b6c8ed5edfa8dd8262
|
|||||||
+ // Gale end - Gale configuration
|
+ // Gale end - Gale configuration
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 83e161c50f12e10afa481a85001c1d223cba6d89..3898e8a92edca52bc7d4e9ac061e24baceaec608 100644
|
index 7806dc9d725e115b6d4b3bc5368e1a24e03b4cc0..0455ab74ec39d93ec72a2aa40e952de5369c1faa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -2,9 +2,6 @@ package net.minecraft.server;
|
@@ -3,9 +3,6 @@ package net.minecraft.server;
|
||||||
|
import com.google.common.base.Preconditions;
|
||||||
import com.google.common.base.Splitter;
|
import com.google.common.base.Splitter;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
-import co.aikar.timings.Timings;
|
-import co.aikar.timings.Timings;
|
||||||
@@ -238,7 +238,7 @@ index 83e161c50f12e10afa481a85001c1d223cba6d89..3898e8a92edca52bc7d4e9ac061e24ba
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
@@ -85,7 +82,6 @@ import net.minecraft.server.level.ServerChunkCache;
|
@@ -86,7 +83,6 @@ import net.minecraft.server.level.ServerChunkCache;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.server.level.ServerPlayerGameMode;
|
import net.minecraft.server.level.ServerPlayerGameMode;
|
||||||
@@ -246,7 +246,7 @@ index 83e161c50f12e10afa481a85001c1d223cba6d89..3898e8a92edca52bc7d4e9ac061e24ba
|
|||||||
import net.minecraft.server.level.progress.ChunkProgressListener;
|
import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||||
import net.minecraft.server.level.progress.ChunkProgressListenerFactory;
|
import net.minecraft.server.level.progress.ChunkProgressListenerFactory;
|
||||||
import net.minecraft.server.network.ServerConnectionListener;
|
import net.minecraft.server.network.ServerConnectionListener;
|
||||||
@@ -109,7 +105,6 @@ import net.minecraft.util.NativeModuleLister;
|
@@ -110,7 +106,6 @@ import net.minecraft.util.NativeModuleLister;
|
||||||
import net.minecraft.util.ProgressListener;
|
import net.minecraft.util.ProgressListener;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
import net.minecraft.util.SignatureValidator;
|
import net.minecraft.util.SignatureValidator;
|
||||||
@@ -254,15 +254,15 @@ index 83e161c50f12e10afa481a85001c1d223cba6d89..3898e8a92edca52bc7d4e9ac061e24ba
|
|||||||
import net.minecraft.util.datafix.DataFixers;
|
import net.minecraft.util.datafix.DataFixers;
|
||||||
import net.minecraft.util.profiling.EmptyProfileResults;
|
import net.minecraft.util.profiling.EmptyProfileResults;
|
||||||
import net.minecraft.util.profiling.ProfileResults;
|
import net.minecraft.util.profiling.ProfileResults;
|
||||||
@@ -164,6 +159,7 @@ import net.minecraft.world.level.storage.loot.PredicateManager;
|
@@ -164,6 +159,7 @@ import net.minecraft.world.level.storage.loot.LootTables;
|
||||||
|
import net.minecraft.world.level.storage.loot.PredicateManager;
|
||||||
import net.minecraft.world.phys.Vec2;
|
import net.minecraft.world.phys.Vec2;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import org.apache.commons.lang3.Validate;
|
|
||||||
+import org.galemc.gale.configuration.GaleConfigurations;
|
+import org.galemc.gale.configuration.GaleConfigurations;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -304,6 +300,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -307,6 +303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public final double[] recentTps = new double[ 3 ];
|
public final double[] recentTps = new double[ 3 ];
|
||||||
// Spigot end
|
// Spigot end
|
||||||
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;
|
||||||
@@ -270,7 +270,7 @@ index 83e161c50f12e10afa481a85001c1d223cba6d89..3898e8a92edca52bc7d4e9ac061e24ba
|
|||||||
public static long currentTickLong = 0L; // Paper
|
public static long currentTickLong = 0L; // Paper
|
||||||
|
|
||||||
public volatile Thread shutdownThread; // Paper
|
public volatile Thread shutdownThread; // Paper
|
||||||
@@ -407,6 +404,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -409,6 +406,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
// Paper end
|
// Paper end
|
||||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||||
this.paperConfigurations = services.paperConfigurations(); // Paper
|
this.paperConfigurations = services.paperConfigurations(); // Paper
|
||||||
@@ -360,10 +360,10 @@ index a7e133f3495e9132a5fdae2c24f225e7b026295a..b98fb8afdadbda47db5924299d90082e
|
|||||||
if (this.convertOldUsers()) {
|
if (this.convertOldUsers()) {
|
||||||
this.getProfileCache().save(false); // Paper
|
this.getProfileCache().save(false); // Paper
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 54c2b7fba83d6f06dba95b1bb5b487a02048d6e6..4b1b828b72a8ddef240d005fc514ae0a54b22982 100644
|
index 5a5ff40df37db9cbd53c584ed26a3ce4888b29c0..512da79de8c9476c7289f4857c8bb966ff1a11c6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -128,12 +128,10 @@ import net.minecraft.world.level.chunk.storage.EntityStorage;
|
@@ -130,12 +130,10 @@ import net.minecraft.world.level.chunk.storage.EntityStorage;
|
||||||
import net.minecraft.world.level.dimension.BuiltinDimensionTypes;
|
import net.minecraft.world.level.dimension.BuiltinDimensionTypes;
|
||||||
import net.minecraft.world.level.dimension.LevelStem;
|
import net.minecraft.world.level.dimension.LevelStem;
|
||||||
import net.minecraft.world.level.dimension.end.EndDragonFight;
|
import net.minecraft.world.level.dimension.end.EndDragonFight;
|
||||||
@@ -377,16 +377,16 @@ index 54c2b7fba83d6f06dba95b1bb5b487a02048d6e6..4b1b828b72a8ddef240d005fc514ae0a
|
|||||||
import net.minecraft.world.level.gameevent.GameEvent;
|
import net.minecraft.world.level.gameevent.GameEvent;
|
||||||
import net.minecraft.world.level.gameevent.GameEventDispatcher;
|
import net.minecraft.world.level.gameevent.GameEventDispatcher;
|
||||||
@@ -527,7 +525,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -527,7 +525,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
|
||||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||||
|
|
||||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||||
- super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor
|
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor
|
||||||
+ super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), spigotConfig -> minecraftserver.galeConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration
|
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), spigotConfig -> minecraftserver.galeConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration
|
||||||
this.pvpMode = minecraftserver.isPvpAllowed();
|
this.pvpMode = minecraftserver.isPvpAllowed();
|
||||||
this.convertable = convertable_conversionsession;
|
this.convertable = convertable_conversionsession;
|
||||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 3cbf801b2e5420c0e870f73788deb550e49ad54d..6b5740e4e73a753c9516d7cbde575c1826afa22a 100644
|
index 973ecd50f9cb6b86c353586e84d15dcb118ccb60..63122fb74a51547e23232a5409295369ee3aa353 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -1,10 +1,7 @@
|
@@ -1,10 +1,7 @@
|
||||||
@@ -408,16 +408,16 @@ index 3cbf801b2e5420c0e870f73788deb550e49ad54d..6b5740e4e73a753c9516d7cbde575c18
|
|||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.core.Holder;
|
import net.minecraft.core.Holder;
|
||||||
@@ -42,8 +38,6 @@ import net.minecraft.util.profiling.ProfilerFiller;
|
@@ -44,8 +40,6 @@ import net.minecraft.world.DifficultyInstance;
|
||||||
import net.minecraft.world.DifficultyInstance;
|
|
||||||
import net.minecraft.world.damagesource.DamageSource;
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
|
import net.minecraft.world.damagesource.DamageSources;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
-import net.minecraft.world.entity.boss.EnderDragonPart;
|
-import net.minecraft.world.entity.boss.EnderDragonPart;
|
||||||
-import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
|
-import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
|
||||||
import net.minecraft.world.entity.item.ItemEntity;
|
import net.minecraft.world.entity.item.ItemEntity;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
@@ -89,17 +83,15 @@ import net.minecraft.network.protocol.game.ClientboundSetBorderSizePacket;
|
@@ -91,17 +85,15 @@ import net.minecraft.network.protocol.game.ClientboundSetBorderSizePacket;
|
||||||
import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDelayPacket;
|
import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDelayPacket;
|
||||||
import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePacket;
|
import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePacket;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
@@ -436,7 +436,7 @@ index 3cbf801b2e5420c0e870f73788deb550e49ad54d..6b5740e4e73a753c9516d7cbde575c18
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public abstract class Level implements LevelAccessor, AutoCloseable {
|
public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
@@ -171,6 +163,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -175,6 +167,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
return this.paperConfig;
|
return this.paperConfig;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -449,12 +449,12 @@ index 3cbf801b2e5420c0e870f73788deb550e49ad54d..6b5740e4e73a753c9516d7cbde575c18
|
|||||||
|
|
||||||
public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
|
||||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||||
@@ -270,9 +268,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -274,9 +272,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||||
|
|
||||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor
|
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor
|
||||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, GaleWorldConfiguration> galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration
|
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, GaleWorldConfiguration> galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration
|
||||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
||||||
+ this.galeConfig = galeWorldConfigCreator.apply(this.spigotConfig); // Gale - Gale configuration
|
+ this.galeConfig = galeWorldConfigCreator.apply(this.spigotConfig); // Gale - Gale configuration
|
||||||
@@ -462,10 +462,10 @@ index 3cbf801b2e5420c0e870f73788deb550e49ad54d..6b5740e4e73a753c9516d7cbde575c18
|
|||||||
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 715ca54906ce0f7ce738e805cc74750dc521c63f..ef1ab585c27df057c330d47a12cc21875f04659f 100644
|
index c5ead5947d0ede35060e25876df43aa488ab0121..670d66fb0bc64aab7473f92c25f69e91c1c0f226 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -980,6 +980,7 @@ public final class CraftServer implements Server {
|
@@ -956,6 +956,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||||
@@ -473,7 +473,7 @@ index 715ca54906ce0f7ce738e805cc74750dc521c63f..ef1ab585c27df057c330d47a12cc2187
|
|||||||
for (ServerLevel world : this.console.getAllLevels()) {
|
for (ServerLevel world : this.console.getAllLevels()) {
|
||||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||||
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
||||||
@@ -2764,6 +2765,14 @@ public final class CraftServer implements Server {
|
@@ -2744,6 +2745,14 @@ public final class CraftServer implements Server {
|
||||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 190e17eb28d166aedee06e9578561ba402d1b6d2..fab5d1c1531fa89113bef6d17df8437b0aec4582 100644
|
index d51650d3e37eb76a0cf991e95d28a552aa567af9..7c38d14671b8a9a671deece654d2f89426b26081 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -2,6 +2,7 @@ package org.bukkit.craftbukkit;
|
@@ -2,6 +2,7 @@ package org.bukkit.craftbukkit;
|
||||||
@@ -18,7 +18,7 @@ index 190e17eb28d166aedee06e9578561ba402d1b6d2..fab5d1c1531fa89113bef6d17df8437b
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@@ -26,6 +27,26 @@ public class Main {
|
@@ -24,6 +25,26 @@ public class Main {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ index 190e17eb28d166aedee06e9578561ba402d1b6d2..fab5d1c1531fa89113bef6d17df8437b
|
|||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
// Paper start
|
// Paper start
|
||||||
final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");
|
final String warnWhenLegacyFormattingDetected = String.join(".", "net", "kyori", "adventure", "text", "warnWhenLegacyFormattingDetected");
|
||||||
@@ -292,13 +313,13 @@ public class Main {
|
@@ -299,13 +320,13 @@ public class Main {
|
||||||
String javaInfo = "Java " + runtimeMX.getSpecVersion() + " (" + runtimeMX.getVmName() + " " + runtimeMX.getVmVersion() + ")";
|
String javaInfo = "Java " + runtimeMX.getSpecVersion() + " (" + runtimeMX.getVmName() + " " + runtimeMX.getVmVersion() + ")";
|
||||||
String osInfo = "Host: " + osMX.getName() + " " + osMX.getVersion() + " (" + osMX.getArch() + ")";
|
String osInfo = "Host: " + osMX.getName() + " " + osMX.getVersion() + " (" + osMX.getArch() + ")";
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 3898e8a92edca52bc7d4e9ac061e24baceaec608..dae9146b50ad430c815877a81cfe1111a42ccc80 100644
|
index 0455ab74ec39d93ec72a2aa40e952de5369c1faa..9000dc3498ea22ef379908eb3c997467ffba82b4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1385,7 +1385,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1384,7 +1384,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public void onServerExit() {}
|
public void onServerExit() {}
|
||||||
|
|
||||||
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
public void tickServer(BooleanSupplier shouldKeepTicking) {
|
||||||
@@ -19,12 +19,12 @@ index 3898e8a92edca52bc7d4e9ac061e24baceaec608..dae9146b50ad430c815877a81cfe1111
|
|||||||
long i = Util.getNanos();
|
long i = Util.getNanos();
|
||||||
|
|
||||||
// Paper start - move oversleep into full server tick
|
// Paper start - move oversleep into full server tick
|
||||||
@@ -1469,7 +1469,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1450,7 +1450,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.frameTimer.logFrameDuration(i1 - i);
|
this.frameTimer.logFrameDuration(k - i);
|
||||||
this.profiler.pop();
|
this.profiler.pop();
|
||||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||||
- co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
- co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper
|
||||||
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTimingFullServerTick(); // Paper // Gale - final timings calls
|
+ co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTimingFullServerTick(); // Paper // Gale - final timings calls
|
||||||
}
|
}
|
||||||
|
|
||||||
public void tickChildren(BooleanSupplier shouldKeepTicking) {
|
private ServerStatus buildServerStatus() {
|
||||||
|
|||||||
@@ -37,18 +37,18 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
index 330f6c79417378da855326b4da665f9d240e748d..6f7b5884a82cd3a3483fbbd478c0e92987f0d833 100644
|
index 87cc7562e4a166d078fe11b7f6980497fc0bd33e..28d78c5d593302d8fe376686db6402cafa5ccb86 100644
|
||||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
@@ -144,7 +144,6 @@ public class Commands {
|
@@ -149,7 +149,6 @@ public class Commands {
|
||||||
CloneCommands.register(this.dispatcher, commandRegistryAccess);
|
DamageCommand.register(this.dispatcher, commandRegistryAccess);
|
||||||
DataCommands.register(this.dispatcher);
|
DataCommands.register(this.dispatcher);
|
||||||
DataPackCommand.register(this.dispatcher);
|
DataPackCommand.register(this.dispatcher);
|
||||||
- DebugCommand.register(this.dispatcher);
|
- DebugCommand.register(this.dispatcher);
|
||||||
DefaultGameModeCommands.register(this.dispatcher);
|
DefaultGameModeCommands.register(this.dispatcher);
|
||||||
DifficultyCommand.register(this.dispatcher);
|
DifficultyCommand.register(this.dispatcher);
|
||||||
EffectCommands.register(this.dispatcher, commandRegistryAccess);
|
EffectCommands.register(this.dispatcher, commandRegistryAccess);
|
||||||
@@ -300,13 +299,9 @@ public class Commands {
|
@@ -309,13 +308,9 @@ public class Commands {
|
||||||
public int performCommand(ParseResults<CommandSourceStack> parseresults, String s, String label) { // CraftBukkit
|
public int performCommand(ParseResults<CommandSourceStack> parseresults, String s, String label) { // CraftBukkit
|
||||||
CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource();
|
CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource();
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ index 330f6c79417378da855326b4da665f9d240e748d..6f7b5884a82cd3a3483fbbd478c0e929
|
|||||||
byte b1;
|
byte b1;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -364,8 +359,6 @@ public class Commands {
|
@@ -393,8 +388,6 @@ public class Commands {
|
||||||
|
|
||||||
b0 = 0;
|
b0 = 0;
|
||||||
}
|
}
|
||||||
@@ -73,7 +73,7 @@ index 330f6c79417378da855326b4da665f9d240e748d..6f7b5884a82cd3a3483fbbd478c0e929
|
|||||||
|
|
||||||
return b0;
|
return b0;
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5c02b2f30 100644
|
index 9000dc3498ea22ef379908eb3c997467ffba82b4..6d32eff11c0be994003624fc12b337c9102dfd57 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -213,14 +213,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -213,14 +213,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
@@ -90,8 +90,8 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
- private boolean debugCommandProfilerDelayStart;
|
- private boolean debugCommandProfilerDelayStart;
|
||||||
private ServerConnectionListener connection;
|
private ServerConnectionListener connection;
|
||||||
public final ChunkProgressListenerFactory progressListenerFactory;
|
public final ChunkProgressListenerFactory progressListenerFactory;
|
||||||
private final ServerStatus status;
|
@Nullable
|
||||||
@@ -331,13 +323,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -334,13 +326,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
|
||||||
super("Server");
|
super("Server");
|
||||||
SERVER = this; // Paper - better singleton
|
SERVER = this; // Paper - better singleton
|
||||||
@@ -102,10 +102,10 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
- };
|
- };
|
||||||
- this.onMetricsRecordingFinished = (path) -> {
|
- this.onMetricsRecordingFinished = (path) -> {
|
||||||
- };
|
- };
|
||||||
this.status = new ServerStatus();
|
|
||||||
this.random = RandomSource.create();
|
this.random = RandomSource.create();
|
||||||
this.port = -1;
|
this.port = -1;
|
||||||
@@ -936,9 +921,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
this.levels = Maps.newLinkedHashMap();
|
||||||
|
@@ -938,9 +923,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@@ -147,7 +147,7 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
super.doRunTask(ticktask);
|
super.doRunTask(ticktask);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1426,7 +1397,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1408,7 +1379,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
if (playerSaveInterval < 0) {
|
if (playerSaveInterval < 0) {
|
||||||
playerSaveInterval = autosavePeriod;
|
playerSaveInterval = autosavePeriod;
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
||||||
try {
|
try {
|
||||||
this.isSaving = true;
|
this.isSaving = true;
|
||||||
@@ -1441,7 +1411,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1423,7 +1393,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
} finally {
|
} finally {
|
||||||
this.isSaving = false;
|
this.isSaving = false;
|
||||||
}
|
}
|
||||||
@@ -163,26 +163,26 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
// Paper end
|
// Paper end
|
||||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||||
// Paper start - move executeAll() into full server tick timing
|
// Paper start - move executeAll() into full server tick timing
|
||||||
@@ -1454,7 +1423,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1436,7 +1405,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||||
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||||
// Paper end
|
// Paper end
|
||||||
- this.profiler.push("tallying");
|
- this.profiler.push("tallying");
|
||||||
long l = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
long j = this.tickTimes[this.tickCount % 100] = Util.getNanos() - i;
|
||||||
|
|
||||||
this.averageTickTime = this.averageTickTime * 0.8F + (float) l / 1000000.0F * 0.19999999F;
|
this.averageTickTime = this.averageTickTime * 0.8F + (float) j / 1000000.0F * 0.19999999F;
|
||||||
@@ -1467,7 +1435,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1448,7 +1416,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
tickTimes60s.add(this.tickCount, j);
|
||||||
// Paper end
|
// Paper end
|
||||||
|
this.frameTimer.logFrameDuration(k - i);
|
||||||
this.frameTimer.logFrameDuration(i1 - i);
|
|
||||||
- this.profiler.pop();
|
- this.profiler.pop();
|
||||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||||
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTimingFullServerTick(); // Paper // Gale - final timings calls
|
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTimingFullServerTick(); // Paper // Gale - final timings calls
|
||||||
}
|
}
|
||||||
@@ -1476,11 +1443,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1486,11 +1453,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
|
||||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
||||||
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
||||||
|
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||||
- this.profiler.push("commandFunctions");
|
- this.profiler.push("commandFunctions");
|
||||||
MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
|
||||||
this.getFunctions().tick();
|
this.getFunctions().tick();
|
||||||
@@ -191,9 +191,9 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - moved down
|
//Iterator iterator = this.getAllLevels().iterator(); // Paper - moved down
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -1521,9 +1486,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1531,9 +1496,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
|
||||||
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
||||||
|
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||||
|
|
||||||
- this.profiler.push(() -> {
|
- this.profiler.push(() -> {
|
||||||
- return worldserver + " " + worldserver.dimension().location();
|
- return worldserver + " " + worldserver.dimension().location();
|
||||||
@@ -201,7 +201,7 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
/* Drop global time updates
|
/* Drop global time updates
|
||||||
if (this.tickCount % 20 == 0) {
|
if (this.tickCount % 20 == 0) {
|
||||||
this.profiler.push("timeSync");
|
this.profiler.push("timeSync");
|
||||||
@@ -1532,8 +1494,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1542,8 +1504,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
// CraftBukkit end */
|
// CraftBukkit end */
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
try {
|
try {
|
||||||
worldserver.timings.doTick.startTiming(); // Spigot
|
worldserver.timings.doTick.startTiming(); // Spigot
|
||||||
worldserver.tick(shouldKeepTicking);
|
worldserver.tick(shouldKeepTicking);
|
||||||
@@ -1558,17 +1518,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1568,17 +1528,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
throw new ReportedException(crashreport);
|
throw new ReportedException(crashreport);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +228,7 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper
|
||||||
this.playerList.tick();
|
this.playerList.tick();
|
||||||
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
||||||
@@ -1576,15 +1532,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1586,15 +1542,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
GameTestTicker.SINGLETON.tick();
|
GameTestTicker.SINGLETON.tick();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -243,8 +243,8 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
- this.profiler.pop();
|
- this.profiler.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isNetherEnabled() {
|
private void synchronizeTime(ServerLevel world) {
|
||||||
@@ -2242,10 +2194,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2269,10 +2221,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
return this.frameTimer;
|
return this.frameTimer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,7 +255,7 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
public abstract boolean isSingleplayerOwner(GameProfile profile);
|
public abstract boolean isSingleplayerOwner(GameProfile profile);
|
||||||
|
|
||||||
public void dumpServerProperties(Path file) throws IOException {}
|
public void dumpServerProperties(Path file) throws IOException {}
|
||||||
@@ -2481,53 +2429,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2508,53 +2456,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -309,7 +309,7 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
public Path getWorldPath(LevelResource worldSavePath) {
|
public Path getWorldPath(LevelResource worldSavePath) {
|
||||||
return this.storageSource.getLevelPath(worldSavePath);
|
return this.storageSource.getLevelPath(worldSavePath);
|
||||||
}
|
}
|
||||||
@@ -2573,25 +2474,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2600,25 +2501,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
return this.isSaving;
|
return this.isSaving;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -335,7 +335,7 @@ index dae9146b50ad430c815877a81cfe1111a42ccc80..cdac47539c8989c21e6a5edf5f63f7f5
|
|||||||
public int getMaxChainedNeighborUpdates() {
|
public int getMaxChainedNeighborUpdates() {
|
||||||
return 1000000;
|
return 1000000;
|
||||||
}
|
}
|
||||||
@@ -2628,56 +2510,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2655,56 +2537,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -453,10 +453,10 @@ index 6483a1d461904a0584b6808b2f86ac7329bba963..a4e5fdd5c4667c51ecfea0e4d3139594
|
|||||||
|
|
||||||
++j;
|
++j;
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 2212f9f48636357265d8e44aba415ea4f09f1fe7..d1e8123a114ea45846234535155df6cd039ba305 100644
|
index fbe209a66c77c47935ad026dd3e45e682af91fd8..d7a8b1ee9c3efda2c8463d6e06e54eb59b1b4dc4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -73,7 +73,6 @@ import net.minecraft.server.level.progress.ChunkProgressListener;
|
@@ -76,7 +76,6 @@ import net.minecraft.server.level.progress.ChunkProgressListener;
|
||||||
import net.minecraft.server.network.ServerPlayerConnection;
|
import net.minecraft.server.network.ServerPlayerConnection;
|
||||||
import net.minecraft.util.CsvOutput;
|
import net.minecraft.util.CsvOutput;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
@@ -464,7 +464,7 @@ index 2212f9f48636357265d8e44aba415ea4f09f1fe7..d1e8123a114ea45846234535155df6cd
|
|||||||
import net.minecraft.util.thread.BlockableEventLoop;
|
import net.minecraft.util.thread.BlockableEventLoop;
|
||||||
import net.minecraft.util.thread.ProcessorHandle;
|
import net.minecraft.util.thread.ProcessorHandle;
|
||||||
import net.minecraft.util.thread.ProcessorMailbox;
|
import net.minecraft.util.thread.ProcessorMailbox;
|
||||||
@@ -618,20 +617,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -621,20 +620,14 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void tick(BooleanSupplier shouldKeepTicking) {
|
protected void tick(BooleanSupplier shouldKeepTicking) {
|
||||||
@@ -611,23 +611,25 @@ index ca84eddbdb1e198b899750e5f6b3eafd25ce970f..d95c3b14c06421c03c99f84efb3a5319
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e021a11385 100644
|
index 512da79de8c9476c7289f4857c8bb966ff1a11c6..95c66ddf051017cd235a159886f02709122fe288 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -76,7 +76,6 @@ import net.minecraft.util.CsvOutput;
|
@@ -76,9 +76,6 @@ import net.minecraft.util.CsvOutput;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.util.ProgressListener;
|
import net.minecraft.util.ProgressListener;
|
||||||
import net.minecraft.util.Unit;
|
import net.minecraft.util.Unit;
|
||||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||||
|
-import net.minecraft.util.valueproviders.IntProvider;
|
||||||
|
-import net.minecraft.util.valueproviders.UniformInt;
|
||||||
import net.minecraft.world.DifficultyInstance;
|
import net.minecraft.world.DifficultyInstance;
|
||||||
import net.minecraft.world.damagesource.DamageSource;
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
@@ -525,15 +524,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -525,15 +522,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
|
|
||||||
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
// Holder holder = worlddimension.type(); // CraftBukkit - decompile error
|
||||||
|
|
||||||
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
// Objects.requireNonNull(minecraftserver); // CraftBukkit - decompile error
|
||||||
- super(iworlddataserver, resourcekey, worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), spigotConfig -> minecraftserver.galeConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration
|
- super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), minecraftserver::getProfiler, false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), spigotConfig -> minecraftserver.galeConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration
|
||||||
+ super(iworlddataserver, resourcekey, worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), spigotConfig -> minecraftserver.galeConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration// Gale - Purpur - remove vanilla profiler
|
+ super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env, spigotConfig -> minecraftserver.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), spigotConfig -> minecraftserver.galeConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(convertable_conversionsession.levelDirectory.path(), iworlddataserver.getLevelName(), resourcekey.location(), spigotConfig)), executor); // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration // Gale - Purpur - remove vanilla profiler
|
||||||
this.pvpMode = minecraftserver.isPvpAllowed();
|
this.pvpMode = minecraftserver.isPvpAllowed();
|
||||||
this.convertable = convertable_conversionsession;
|
this.convertable = convertable_conversionsession;
|
||||||
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
|
||||||
@@ -643,7 +645,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
this.navigatingMobs = new ObjectOpenHashSet();
|
this.navigatingMobs = new ObjectOpenHashSet();
|
||||||
this.blockEvents = new ObjectLinkedOpenHashSet();
|
this.blockEvents = new ObjectLinkedOpenHashSet();
|
||||||
this.blockEventsToReschedule = new ArrayList(64);
|
this.blockEventsToReschedule = new ArrayList(64);
|
||||||
@@ -631,12 +632,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -631,12 +630,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper end - optimise checkDespawn
|
// Paper end - optimise checkDespawn
|
||||||
@@ -656,7 +658,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
this.advanceWeatherCycle();
|
this.advanceWeatherCycle();
|
||||||
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
|
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
|
||||||
long j;
|
long j;
|
||||||
@@ -663,32 +660,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -663,32 +658,24 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
this.updateSkyBrightness();
|
this.updateSkyBrightness();
|
||||||
this.tickTime();
|
this.tickTime();
|
||||||
@@ -689,7 +691,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
boolean flag = true || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
|
boolean flag = true || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
@@ -696,12 +685,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -696,12 +683,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag || this.emptyTime++ < 300) {
|
if (flag || this.emptyTime++ < 300) {
|
||||||
@@ -702,7 +704,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
}
|
}
|
||||||
|
|
||||||
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
||||||
@@ -711,9 +697,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -711,9 +695,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
|
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
|
||||||
entity.discard();
|
entity.discard();
|
||||||
} else {
|
} else {
|
||||||
@@ -712,7 +714,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - now always true if in the ticking list
|
if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - now always true if in the ticking list
|
||||||
Entity entity1 = entity.getVehicle();
|
Entity entity1 = entity.getVehicle();
|
||||||
|
|
||||||
@@ -725,22 +709,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -725,22 +707,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
entity.stopRiding();
|
entity.stopRiding();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,7 +737,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -799,9 +778,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -799,9 +776,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
boolean flag = this.isRaining();
|
boolean flag = this.isRaining();
|
||||||
int j = chunkcoordintpair.getMinBlockX();
|
int j = chunkcoordintpair.getMinBlockX();
|
||||||
int k = chunkcoordintpair.getMinBlockZ();
|
int k = chunkcoordintpair.getMinBlockZ();
|
||||||
@@ -745,7 +747,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||||
|
|
||||||
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - disable thunder
|
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - disable thunder
|
||||||
@@ -831,7 +807,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -831,7 +805,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -753,7 +755,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
int l;
|
int l;
|
||||||
|
|
||||||
if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow
|
if (!this.paperConfig().environment.disableIceAndSnow && this.random.nextInt(16) == 0) { // Paper - Disable ice and snow
|
||||||
@@ -883,7 +858,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -882,7 +855,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start - optimise random block ticking
|
// Paper start - optimise random block ticking
|
||||||
@@ -761,7 +763,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
timings.chunkTicksBlocks.startTiming(); // Paper
|
timings.chunkTicksBlocks.startTiming(); // Paper
|
||||||
if (randomTickSpeed > 0) {
|
if (randomTickSpeed > 0) {
|
||||||
LevelChunkSection[] sections = chunk.getSections();
|
LevelChunkSection[] sections = chunk.getSections();
|
||||||
@@ -919,7 +893,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -918,7 +890,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
// Paper end - optimise random block ticking
|
// Paper end - optimise random block ticking
|
||||||
timings.chunkTicksBlocks.stopTiming(); // Paper
|
timings.chunkTicksBlocks.stopTiming(); // Paper
|
||||||
@@ -769,7 +771,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Optional<BlockPos> findLightningRod(BlockPos pos) {
|
public Optional<BlockPos> findLightningRod(BlockPos pos) {
|
||||||
@@ -1197,19 +1170,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1196,19 +1167,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
try {
|
try {
|
||||||
// Paper end - timings
|
// Paper end - timings
|
||||||
entity.setOldPosAndRot();
|
entity.setOldPosAndRot();
|
||||||
@@ -789,7 +791,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
} finally { timer.stopTiming(); } // Paper - timings
|
} finally { timer.stopTiming(); } // Paper - timings
|
||||||
Iterator iterator = entity.getPassengers().iterator();
|
Iterator iterator = entity.getPassengers().iterator();
|
||||||
|
|
||||||
@@ -1238,12 +1205,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1237,12 +1202,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// Paper end
|
// Paper end
|
||||||
passenger.setOldPosAndRot();
|
passenger.setOldPosAndRot();
|
||||||
++passenger.tickCount;
|
++passenger.tickCount;
|
||||||
@@ -802,7 +804,7 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
// Paper start - EAR 2
|
// Paper start - EAR 2
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
passenger.rideTick();
|
passenger.rideTick();
|
||||||
@@ -1255,7 +1216,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1254,7 +1213,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
vehicle.positionRider(passenger);
|
vehicle.positionRider(passenger);
|
||||||
}
|
}
|
||||||
// Paper end - EAR 2
|
// Paper end - EAR 2
|
||||||
@@ -811,10 +813,10 @@ index 4b1b828b72a8ddef240d005fc514ae0a54b22982..e8658ed3784444991c5a6c8f03d2a5e0
|
|||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 9160725f031c9698a00229c3dfa19d39b4a826c1..8a548616885149fe23763b3b2cd46dc8323e5803 100644
|
index ca5291a9573a62cb5c19539cf5c7aceff11f9829..3c92e6fb78cce27572709cd767fb191f9107e0eb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -1149,7 +1149,6 @@ public class ServerPlayer extends Player {
|
@@ -1161,7 +1161,6 @@ public class ServerPlayer extends Player {
|
||||||
PortalInfo shapedetectorshape = this.findDimensionEntryPoint(worldserver);
|
PortalInfo shapedetectorshape = this.findDimensionEntryPoint(worldserver);
|
||||||
|
|
||||||
if (shapedetectorshape != null) {
|
if (shapedetectorshape != null) {
|
||||||
@@ -822,7 +824,7 @@ index 9160725f031c9698a00229c3dfa19d39b4a826c1..8a548616885149fe23763b3b2cd46dc8
|
|||||||
worldserver = shapedetectorshape.world; // CraftBukkit
|
worldserver = shapedetectorshape.world; // CraftBukkit
|
||||||
if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event
|
if (worldserver == null) { } else // CraftBukkit - empty to fall through to null to event
|
||||||
if (resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit
|
if (resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit
|
||||||
@@ -1172,8 +1171,6 @@ public class ServerPlayer extends Player {
|
@@ -1184,8 +1183,6 @@ public class ServerPlayer extends Player {
|
||||||
worldserver = ((CraftWorld) exit.getWorld()).getHandle();
|
worldserver = ((CraftWorld) exit.getWorld()).getHandle();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -831,7 +833,7 @@ index 9160725f031c9698a00229c3dfa19d39b4a826c1..8a548616885149fe23763b3b2cd46dc8
|
|||||||
if (true) { // CraftBukkit
|
if (true) { // CraftBukkit
|
||||||
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||||
|
|
||||||
@@ -1191,7 +1188,6 @@ public class ServerPlayer extends Player {
|
@@ -1203,7 +1200,6 @@ public class ServerPlayer extends Player {
|
||||||
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event
|
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event
|
||||||
this.connection.resetPosition();
|
this.connection.resetPosition();
|
||||||
worldserver.addDuringPortalTeleport(this);
|
worldserver.addDuringPortalTeleport(this);
|
||||||
@@ -840,10 +842,10 @@ index 9160725f031c9698a00229c3dfa19d39b4a826c1..8a548616885149fe23763b3b2cd46dc8
|
|||||||
this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities()));
|
this.connection.send(new ClientboundPlayerAbilitiesPacket(this.getAbilities()));
|
||||||
playerlist.sendLevelInfo(this, worldserver);
|
playerlist.sendLevelInfo(this, worldserver);
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 9b0b42add71172bd154226e51d62cebd8de3542e..c3c048ec2c8be72e0f5494f423bfafbd9b572b88 100644
|
index 2d8488b9aa088b6d5f0c7e557b8ad0b29bc4cd88..d56ed157045184d51a0af7cb722dbf5f01320b8f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -390,7 +390,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -392,7 +392,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
this.aboveGroundVehicleTickCount = 0;
|
this.aboveGroundVehicleTickCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -851,7 +853,7 @@ index 9b0b42add71172bd154226e51d62cebd8de3542e..c3c048ec2c8be72e0f5494f423bfafbd
|
|||||||
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
// Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings
|
||||||
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
|
// This should effectively place the keepalive handling back to "as it was" before 1.12.2
|
||||||
long currentTime = Util.getMillis();
|
long currentTime = Util.getMillis();
|
||||||
@@ -411,7 +410,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -413,7 +412,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -936,10 +938,10 @@ index 7ab57748b2f2aea1003d9b7e70e76c372aa1e432..47e75ec4a01f8a456ec6ebc13031c1f0
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb5970ce23 100644
|
index 9a1e8589e6b371869b2199650172d61ae186c907..389e382ba6197c224b0829b5b98f3c22f443e56f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -788,7 +788,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -789,7 +789,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public void baseTick() {
|
public void baseTick() {
|
||||||
@@ -947,7 +949,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking
|
||||||
this.feetBlockState = null;
|
this.feetBlockState = null;
|
||||||
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
if (this.isPassenger() && this.getVehicle().isRemoved()) {
|
||||||
@@ -849,7 +848,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -850,7 +849,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.firstTick = false;
|
this.firstTick = false;
|
||||||
@@ -955,7 +957,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setSharedFlagOnFire(boolean onFire) {
|
public void setSharedFlagOnFire(boolean onFire) {
|
||||||
@@ -1023,7 +1021,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1024,7 +1022,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -963,7 +965,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
if (this.stuckSpeedMultiplier.lengthSqr() > 1.0E-7D) {
|
||||||
movement = movement.multiply(this.stuckSpeedMultiplier);
|
movement = movement.multiply(this.stuckSpeedMultiplier);
|
||||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||||
@@ -1032,7 +1029,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1033,7 +1030,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// Paper start - ignore movement changes while inactive.
|
// Paper start - ignore movement changes while inactive.
|
||||||
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
if (isTemporarilyActive && !(this instanceof ItemEntity || this instanceof net.minecraft.world.entity.vehicle.AbstractMinecart) && movement == getDeltaMovement() && movementType == MoverType.SELF) {
|
||||||
setDeltaMovement(Vec3.ZERO);
|
setDeltaMovement(Vec3.ZERO);
|
||||||
@@ -971,7 +973,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -1053,8 +1049,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1054,8 +1050,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
this.setPos(this.getX() + vec3d1.x, this.getY() + vec3d1.y, this.getZ() + vec3d1.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -980,7 +982,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
boolean flag = !Mth.equal(movement.x, vec3d1.x);
|
||||||
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
boolean flag1 = !Mth.equal(movement.z, vec3d1.z);
|
||||||
|
|
||||||
@@ -1072,9 +1066,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1073,9 +1067,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
BlockState iblockdata = this.level.getBlockState(blockposition);
|
BlockState iblockdata = this.level.getBlockState(blockposition);
|
||||||
|
|
||||||
this.checkFallDamage(vec3d1.y, this.onGround, iblockdata, blockposition);
|
this.checkFallDamage(vec3d1.y, this.onGround, iblockdata, blockposition);
|
||||||
@@ -991,7 +993,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
if (this.horizontalCollision) {
|
if (this.horizontalCollision) {
|
||||||
Vec3 vec3d2 = this.getDeltaMovement();
|
Vec3 vec3d2 = this.getDeltaMovement();
|
||||||
|
|
||||||
@@ -1213,8 +1205,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1214,8 +1206,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
if (this.isOnFire() && (this.isInPowderSnow || this.isInWaterRainOrBubble())) {
|
if (this.isOnFire() && (this.isInPowderSnow || this.isInWaterRainOrBubble())) {
|
||||||
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
||||||
}
|
}
|
||||||
@@ -1000,7 +1002,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper start - detailed watchdog information
|
// Paper start - detailed watchdog information
|
||||||
@@ -2894,7 +2884,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2911,7 +2901,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
|
ServerLevel worldserver1 = minecraftserver.getLevel(resourcekey);
|
||||||
|
|
||||||
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
|
||||||
@@ -1008,7 +1010,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
this.portalTime = i;
|
this.portalTime = i;
|
||||||
// Paper start
|
// Paper start
|
||||||
io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
|
io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER);
|
||||||
@@ -2912,7 +2901,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -2929,7 +2918,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
} // Paper
|
} // Paper
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@@ -1016,7 +1018,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.isInsidePortal = false;
|
this.isInsidePortal = false;
|
||||||
@@ -3377,14 +3365,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3396,14 +3384,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
if (this.level instanceof ServerLevel && !this.isRemoved()) {
|
||||||
@@ -1031,7 +1033,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit
|
PortalInfo shapedetectorshape = (location == null) ? this.findDimensionEntryPoint(worldserver) : new PortalInfo(new Vec3(location.x(), location.y(), location.z()), Vec3.ZERO, this.yRot, this.xRot, worldserver, null); // CraftBukkit
|
||||||
|
|
||||||
if (shapedetectorshape == null) {
|
if (shapedetectorshape == null) {
|
||||||
@@ -3418,7 +3404,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3437,7 +3423,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.unRide();
|
this.unRide();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -1039,7 +1041,7 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
// Paper start - Change lead drop timing to prevent dupe
|
// Paper start - Change lead drop timing to prevent dupe
|
||||||
if (this instanceof Mob) {
|
if (this instanceof Mob) {
|
||||||
((Mob) this).dropLeash(true, true); // Paper drop lead
|
((Mob) this).dropLeash(true, true); // Paper drop lead
|
||||||
@@ -3441,10 +3426,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3460,10 +3445,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.removeAfterChangingDimensions();
|
this.removeAfterChangingDimensions();
|
||||||
@@ -1051,10 +1053,10 @@ index 1eaab1f6923e6aa34b643293347348e5cc19af3c..aaa5af793ae0c177bcde75880445a3eb
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 42eb78830855d7282b7f3f1bdbe85e632d489784..763b3a46e922c3db26507d2975f4b3e105f30838 100644
|
index dcfb71b5a53df789e366fea2080921d677549a2e..b4b916f2929d83aaa160a69a198836ed53430e23 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -393,7 +393,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -388,7 +388,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
super.baseTick();
|
super.baseTick();
|
||||||
@@ -1062,7 +1064,7 @@ index 42eb78830855d7282b7f3f1bdbe85e632d489784..763b3a46e922c3db26507d2975f4b3e1
|
|||||||
if (this.fireImmune() || this.level.isClientSide) {
|
if (this.fireImmune() || this.level.isClientSide) {
|
||||||
this.clearFire();
|
this.clearFire();
|
||||||
}
|
}
|
||||||
@@ -495,7 +494,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -490,7 +489,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.yHeadRotO = this.yHeadRot;
|
this.yHeadRotO = this.yHeadRot;
|
||||||
this.yRotO = this.getYRot();
|
this.yRotO = this.getYRot();
|
||||||
this.xRotO = this.getXRot();
|
this.xRotO = this.getXRot();
|
||||||
@@ -1070,7 +1072,7 @@ index 42eb78830855d7282b7f3f1bdbe85e632d489784..763b3a46e922c3db26507d2975f4b3e1
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean canSpawnSoulSpeedParticle() {
|
public boolean canSpawnSoulSpeedParticle() {
|
||||||
@@ -3040,10 +3038,7 @@ public abstract class LivingEntity extends Entity {
|
@@ -3006,10 +3004,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.run += (f3 - this.run) * 0.3F;
|
this.run += (f3 - this.run) * 0.3F;
|
||||||
@@ -1081,7 +1083,7 @@ index 42eb78830855d7282b7f3f1bdbe85e632d489784..763b3a46e922c3db26507d2975f4b3e1
|
|||||||
|
|
||||||
// Paper start - stop large pitch and yaw changes from crashing the server
|
// Paper start - stop large pitch and yaw changes from crashing the server
|
||||||
this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F;
|
this.yRotO += Math.round((this.getYRot() - this.yRotO) / 360.0F) * 360.0F;
|
||||||
@@ -3055,7 +3050,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -3021,7 +3016,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F;
|
this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F;
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -1089,7 +1091,7 @@ index 42eb78830855d7282b7f3f1bdbe85e632d489784..763b3a46e922c3db26507d2975f4b3e1
|
|||||||
this.animStep += f2;
|
this.animStep += f2;
|
||||||
if (this.isFallFlying()) {
|
if (this.isFallFlying()) {
|
||||||
++this.fallFlyTicks;
|
++this.fallFlyTicks;
|
||||||
@@ -3352,19 +3346,14 @@ public abstract class LivingEntity extends Entity {
|
@@ -3310,19 +3304,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setDeltaMovement(d4, d5, d6);
|
this.setDeltaMovement(d4, d5, d6);
|
||||||
@@ -1109,7 +1111,7 @@ index 42eb78830855d7282b7f3f1bdbe85e632d489784..763b3a46e922c3db26507d2975f4b3e1
|
|||||||
if (this.jumping && this.isAffectedByFluids()) {
|
if (this.jumping && this.isAffectedByFluids()) {
|
||||||
double d7;
|
double d7;
|
||||||
|
|
||||||
@@ -3391,8 +3380,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -3349,8 +3338,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.noJumpDelay = 0;
|
this.noJumpDelay = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1118,17 +1120,17 @@ index 42eb78830855d7282b7f3f1bdbe85e632d489784..763b3a46e922c3db26507d2975f4b3e1
|
|||||||
this.xxa *= 0.98F;
|
this.xxa *= 0.98F;
|
||||||
this.zza *= 0.98F;
|
this.zza *= 0.98F;
|
||||||
this.updateFallFlying();
|
this.updateFallFlying();
|
||||||
@@ -3401,8 +3388,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -3366,8 +3353,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
// SpigotTimings.timerEntityAIMove.startTiming(); // Spigot // Paper
|
}
|
||||||
this.travel(new Vec3((double) this.xxa, (double) this.yya, (double) this.zza));
|
//SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot // Paper
|
||||||
// SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot // Paper
|
|
||||||
- this.level.getProfiler().pop();
|
- this.level.getProfiler().pop();
|
||||||
- this.level.getProfiler().push("freezing");
|
- this.level.getProfiler().push("freezing");
|
||||||
boolean flag1 = this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES);
|
if (!this.level.isClientSide && !this.isDeadOrDying() && !freezeLocked) { // Paper - Freeze Tick Lock API
|
||||||
int i;
|
int i = this.getTicksFrozen();
|
||||||
|
|
||||||
@@ -3422,15 +3407,12 @@ public abstract class LivingEntity extends Entity {
|
@@ -3384,15 +3369,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
this.hurt(DamageSource.FREEZE, (float) i);
|
this.hurt(this.damageSources().freeze(), 1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.level.getProfiler().pop();
|
- this.level.getProfiler().pop();
|
||||||
@@ -1144,10 +1146,10 @@ index 42eb78830855d7282b7f3f1bdbe85e632d489784..763b3a46e922c3db26507d2975f4b3e1
|
|||||||
if (((ServerLevel) this.level).hasEntityMoveEvent && !(this instanceof net.minecraft.world.entity.player.Player)) {
|
if (((ServerLevel) this.level).hasEntityMoveEvent && !(this instanceof net.minecraft.world.entity.player.Player)) {
|
||||||
if (this.xo != getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
|
if (this.xo != getX() || this.yo != this.getY() || this.zo != this.getZ() || this.yRotO != this.getYRot() || this.xRotO != this.getXRot()) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index 49b983064ea810382b6112f5dc7f93ba4e5710bd..c61b13268166f1f9f4a6f39391c3458410e62edc 100644
|
index 02cb6b8c1d59855ff4a8aad3024fe12007eca0ee..a19956dbbb43f64043381bd968af74550b8a359a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -144,8 +144,10 @@ public abstract class Mob extends LivingEntity {
|
@@ -144,8 +144,10 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
this.pathfindingMalus = Maps.newEnumMap(BlockPathTypes.class);
|
this.pathfindingMalus = Maps.newEnumMap(BlockPathTypes.class);
|
||||||
this.restrictCenter = BlockPos.ZERO;
|
this.restrictCenter = BlockPos.ZERO;
|
||||||
this.restrictRadius = -1.0F;
|
this.restrictRadius = -1.0F;
|
||||||
@@ -1160,7 +1162,7 @@ index 49b983064ea810382b6112f5dc7f93ba4e5710bd..c61b13268166f1f9f4a6f39391c34584
|
|||||||
this.lookControl = new LookControl(this);
|
this.lookControl = new LookControl(this);
|
||||||
this.moveControl = new MoveControl(this);
|
this.moveControl = new MoveControl(this);
|
||||||
this.jumpControl = new JumpControl(this);
|
this.jumpControl = new JumpControl(this);
|
||||||
@@ -327,13 +329,10 @@ public abstract class Mob extends LivingEntity {
|
@@ -357,13 +359,10 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
@Override
|
@Override
|
||||||
public void baseTick() {
|
public void baseTick() {
|
||||||
super.baseTick();
|
super.baseTick();
|
||||||
@@ -1174,7 +1176,7 @@ index 49b983064ea810382b6112f5dc7f93ba4e5710bd..c61b13268166f1f9f4a6f39391c34584
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -638,7 +637,6 @@ public abstract class Mob extends LivingEntity {
|
@@ -668,7 +667,6 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
@Override
|
@Override
|
||||||
public void aiStep() {
|
public void aiStep() {
|
||||||
super.aiStep();
|
super.aiStep();
|
||||||
@@ -1182,7 +1184,7 @@ index 49b983064ea810382b6112f5dc7f93ba4e5710bd..c61b13268166f1f9f4a6f39391c34584
|
|||||||
if (!this.level.isClientSide && this.canPickUpLoot() && this.isAlive() && !this.dead && this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
if (!this.level.isClientSide && this.canPickUpLoot() && this.isAlive() && !this.dead && this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
||||||
Vec3i baseblockposition = this.getPickupReach();
|
Vec3i baseblockposition = this.getPickupReach();
|
||||||
List<ItemEntity> list = this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ()));
|
List<ItemEntity> list = this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ()));
|
||||||
@@ -657,8 +655,6 @@ public abstract class Mob extends LivingEntity {
|
@@ -687,8 +685,6 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1191,7 +1193,7 @@ index 49b983064ea810382b6112f5dc7f93ba4e5710bd..c61b13268166f1f9f4a6f39391c34584
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected Vec3i getPickupReach() {
|
protected Vec3i getPickupReach() {
|
||||||
@@ -871,42 +867,22 @@ public abstract class Mob extends LivingEntity {
|
@@ -900,42 +896,22 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -1308,10 +1310,10 @@ index b738ee2d3801fadfd09313f05ae24593e56b0ec6..ce2804271bb67803c60c9121aec6c8dc
|
|||||||
|
|
||||||
public Set<WrappedGoal> getAvailableGoals() {
|
public Set<WrappedGoal> getAvailableGoals() {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
index 97257b450e848f53fdb9b5b7affa57b03ea5f459..dcdd0125c6a520ae8f7fa7be5b7c7d43a51aa473 100644
|
index 7ffe5bef3778d5971ea4ceadf3102725fd0d08cd..ec797e7ab5185ae9f4ccae53023785ce780d89ad 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||||
@@ -171,12 +171,10 @@ public abstract class PathNavigation {
|
@@ -172,12 +172,10 @@ public abstract class PathNavigation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -1339,10 +1341,10 @@ index 288c6627906d07c0d223eacd84ae4eb31a349998..ed440b9a84ac0e4619c075491515fa07
|
|||||||
this.seen.add(i);
|
this.seen.add(i);
|
||||||
} else {
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
index c0084b1f146a4697194c421519537e612ff737c0..fb20ba0a8a89d486476e8eac47f642209b4906a4 100644
|
index 9b57d2b766f2de2d3fb4a3b5ef4df8d6756a1942..068c6904599f57b70b9cf166a5fe949362a7b23f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/allay/Allay.java
|
||||||
@@ -230,12 +230,8 @@ public class Allay extends PathfinderMob implements InventoryCarrier {
|
@@ -225,12 +225,8 @@ public class Allay extends PathfinderMob implements InventoryCarrier {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
@@ -1356,7 +1358,7 @@ index c0084b1f146a4697194c421519537e612ff737c0..fb20ba0a8a89d486476e8eac47f64220
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||||
index 0d7f951e3837de7553d93f3d4525276048feb405..ebae68d28e9c97dcdf9630db124ff1a96adcd566 100644
|
index a4e98b02175da96472474b8d7ad5975ce4d2fc43..c513138be4b343ee1868a9ef541130a637fa0744 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/axolotl/Axolotl.java
|
||||||
@@ -287,12 +287,8 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
|
@@ -287,12 +287,8 @@ public class Axolotl extends Animal implements LerpingModel, VariantHolder<Axolo
|
||||||
@@ -1373,10 +1375,10 @@ index 0d7f951e3837de7553d93f3d4525276048feb405..ebae68d28e9c97dcdf9630db124ff1a9
|
|||||||
Optional<Integer> optional = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS);
|
Optional<Integer> optional = this.getBrain().getMemory(MemoryModuleType.PLAY_DEAD_TICKS);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||||
index d9104d996c854cce1ff167706c93747cd69c3969..156323ebdb823d59bc8c23b675fb59da2133d21f 100644
|
index 05c7680569346bb863b896bcc9515f3e7cfb8114..8fd496e3d51fc55caff764981654347d33357004 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
||||||
@@ -146,13 +146,9 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
@@ -149,13 +149,9 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
@@ -1391,10 +1393,10 @@ index d9104d996c854cce1ff167706c93747cd69c3969..156323ebdb823d59bc8c23b675fb59da
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
index f2e84e832ad95df26fe3b9ba439ce38fc59b3585..831bd88383e48f704d6cb4f8f5137114705dbcc7 100644
|
index a65cec3c9837882df5b61de58f03d276d4db6bfc..c7b08018dbfb7d210ea4102518ea7e592ad01452 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||||
@@ -179,12 +179,8 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
@@ -169,12 +169,8 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void customServerAiStep() {
|
protected void customServerAiStep() {
|
||||||
@@ -1425,7 +1427,7 @@ index 9058f9f2e561cda9f475f33218bf7a78297de4bc..09240841cd9216c06da8dc4059f8a60e
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
index e9f7c08ae3ea9c578971b1ede88788572c20e277..c42e9924b417ef0b2a0f6a325357d59cb3628edf 100644
|
index cfa904d42734d0fb0c1ed8b18f4d8bc131027962..ef584de97ba678176ab9bf61365d97ca61ff07cf 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java
|
||||||
@@ -190,12 +190,8 @@ public class Goat extends Animal {
|
@@ -190,12 +190,8 @@ public class Goat extends Animal {
|
||||||
@@ -1498,7 +1500,7 @@ index e44eec821eaa1cd77569814000d4aa36253fb13d..edee6a47e67a9e02ac269dcc16b1932c
|
|||||||
PiglinBruteAi.maybePlayActivitySound(this);
|
PiglinBruteAi.maybePlayActivitySound(this);
|
||||||
super.customServerAiStep();
|
super.customServerAiStep();
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||||
index 1ae7408048f951cb94d7cfbea60efc5567b1af84..d9799e7010ec879100ccacf2e4a4c160a47777a1 100644
|
index b2b63d9df3c07696f47281e9be74f1799f50b93e..4544ce7e0f33b13a56cd4d4a3c905f71d370bbe6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
--- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
+++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
|
||||||
@@ -274,9 +274,7 @@ public class Warden extends Monster implements VibrationListener.VibrationListen
|
@@ -274,9 +274,7 @@ public class Warden extends Monster implements VibrationListener.VibrationListen
|
||||||
@@ -1512,7 +1514,7 @@ index 1ae7408048f951cb94d7cfbea60efc5567b1af84..d9799e7010ec879100ccacf2e4a4c160
|
|||||||
if ((this.tickCount + this.getId()) % 120 == 0) {
|
if ((this.tickCount + this.getId()) % 120 == 0) {
|
||||||
Warden.applyDarknessAround(worldserver, this.position(), this, 20);
|
Warden.applyDarknessAround(worldserver, this.position(), this, 20);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
index 18eac340386a396c9850f53f30d20a41c1437788..a4029cd16d964cd3a58f9f6e8471fbdf07de578b 100644
|
index 6023b9eb3001e1a98ab8b970d853c4e7c7603f4d..cf865df0763ebbe9ebbe74f32b0863e2636de63f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
@@ -246,9 +246,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -246,9 +246,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
@@ -1526,10 +1528,10 @@ index 18eac340386a396c9850f53f30d20a41c1437788..a4029cd16d964cd3a58f9f6e8471fbdf
|
|||||||
this.assignProfessionWhenSpawned = false;
|
this.assignProfessionWhenSpawned = false;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
index a213f4098859858a73ddd601bbe8c7511972e0d5..5c7f2be28fbb5d2f7b48c04bb862fb15440dda03 100644
|
index 59837144c2c0460aca6e8c349eb3d6528111d1dc..aa6ea4ebaa6777815f3a2245f260c5e58a7a3b21 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
@@ -360,7 +360,6 @@ public class Explosion {
|
@@ -372,7 +372,6 @@ public class Explosion {
|
||||||
if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper
|
if (!iblockdata.isAir() && iblockdata.isDestroyable()) { // Paper
|
||||||
BlockPos blockposition1 = blockposition.immutable();
|
BlockPos blockposition1 = blockposition.immutable();
|
||||||
|
|
||||||
@@ -1537,7 +1539,7 @@ index a213f4098859858a73ddd601bbe8c7511972e0d5..5c7f2be28fbb5d2f7b48c04bb862fb15
|
|||||||
if (block.dropFromExplosion(this)) {
|
if (block.dropFromExplosion(this)) {
|
||||||
Level world = this.level;
|
Level world = this.level;
|
||||||
|
|
||||||
@@ -382,7 +381,6 @@ public class Explosion {
|
@@ -394,7 +393,6 @@ public class Explosion {
|
||||||
|
|
||||||
this.level.setBlock(blockposition, Blocks.AIR.defaultBlockState(), 3);
|
this.level.setBlock(blockposition, Blocks.AIR.defaultBlockState(), 3);
|
||||||
block.wasExploded(this.level, blockposition, this);
|
block.wasExploded(this.level, blockposition, this);
|
||||||
@@ -1546,18 +1548,18 @@ index a213f4098859858a73ddd601bbe8c7511972e0d5..5c7f2be28fbb5d2f7b48c04bb862fb15
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab2a95ae48 100644
|
index 63122fb74a51547e23232a5409295369ee3aa353..262626a0a01ed05f3f49cebec8b31266b2c441e7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -34,7 +34,6 @@ import net.minecraft.sounds.SoundSource;
|
@@ -35,7 +35,6 @@ import net.minecraft.sounds.SoundSource;
|
||||||
import net.minecraft.util.AbortableIterationConsumer;
|
import net.minecraft.util.AbortableIterationConsumer;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
-import net.minecraft.util.profiling.ProfilerFiller;
|
-import net.minecraft.util.profiling.ProfilerFiller;
|
||||||
import net.minecraft.world.DifficultyInstance;
|
import net.minecraft.world.DifficultyInstance;
|
||||||
import net.minecraft.world.damagesource.DamageSource;
|
import net.minecraft.world.damagesource.DamageSource;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.damagesource.DamageSources;
|
||||||
@@ -128,7 +127,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -130,7 +129,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
private final ResourceKey<DimensionType> dimensionTypeId;
|
private final ResourceKey<DimensionType> dimensionTypeId;
|
||||||
private final Holder<DimensionType> dimensionTypeRegistration;
|
private final Holder<DimensionType> dimensionTypeRegistration;
|
||||||
public final WritableLevelData levelData;
|
public final WritableLevelData levelData;
|
||||||
@@ -1565,16 +1567,16 @@ index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab
|
|||||||
public final boolean isClientSide;
|
public final boolean isClientSide;
|
||||||
private final WorldBorder worldBorder;
|
private final WorldBorder worldBorder;
|
||||||
private final BiomeManager biomeManager;
|
private final BiomeManager biomeManager;
|
||||||
@@ -268,7 +266,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -272,7 +270,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||||
|
|
||||||
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, GaleWorldConfiguration> galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration
|
- protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, GaleWorldConfiguration> galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration
|
||||||
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, GaleWorldConfiguration> galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration // Gale - Purpur - remove vanilla profiler
|
+ protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, GaleWorldConfiguration> galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration // Gale - Purpur - remove vanilla profiler
|
||||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
||||||
this.galeConfig = galeWorldConfigCreator.apply(this.spigotConfig); // Gale - Gale configuration
|
this.galeConfig = galeWorldConfigCreator.apply(this.spigotConfig); // Gale - Gale configuration
|
||||||
@@ -283,7 +281,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -287,7 +285,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@@ -1582,7 +1584,7 @@ index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab
|
|||||||
this.levelData = worlddatamutable;
|
this.levelData = worlddatamutable;
|
||||||
this.dimensionTypeRegistration = holder;
|
this.dimensionTypeRegistration = holder;
|
||||||
this.dimensionTypeId = (ResourceKey) holder.unwrapKey().orElseThrow(() -> {
|
this.dimensionTypeId = (ResourceKey) holder.unwrapKey().orElseThrow(() -> {
|
||||||
@@ -560,9 +557,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -568,9 +565,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
BlockState iblockdata2 = this.getBlockState(pos);
|
BlockState iblockdata2 = this.getBlockState(pos);
|
||||||
|
|
||||||
if ((flags & 128) == 0 && iblockdata2 != iblockdata1 && (iblockdata2.getLightBlock(this, pos) != iblockdata1.getLightBlock(this, pos) || iblockdata2.getLightEmission() != iblockdata1.getLightEmission() || iblockdata2.useShapeForLightOcclusion() || iblockdata1.useShapeForLightOcclusion())) {
|
if ((flags & 128) == 0 && iblockdata2 != iblockdata1 && (iblockdata2.getLightBlock(this, pos) != iblockdata1.getLightBlock(this, pos) || iblockdata2.getLightEmission() != iblockdata1.getLightEmission() || iblockdata2.useShapeForLightOcclusion() || iblockdata1.useShapeForLightOcclusion())) {
|
||||||
@@ -1592,7 +1594,7 @@ index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -861,9 +856,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -869,9 +864,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void tickBlockEntities() {
|
protected void tickBlockEntities() {
|
||||||
@@ -1602,7 +1604,7 @@ index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab
|
|||||||
timings.tileEntityPending.startTiming(); // Spigot
|
timings.tileEntityPending.startTiming(); // Spigot
|
||||||
this.tickingBlockEntities = true;
|
this.tickingBlockEntities = true;
|
||||||
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
||||||
@@ -908,7 +900,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -916,7 +908,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
timings.tileEntityTick.stopTiming(); // Spigot
|
timings.tileEntityTick.stopTiming(); // Spigot
|
||||||
this.tickingBlockEntities = false;
|
this.tickingBlockEntities = false;
|
||||||
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
|
co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
|
||||||
@@ -1610,7 +1612,7 @@ index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab
|
|||||||
spigotConfig.currentPrimedTnt = 0; // Spigot
|
spigotConfig.currentPrimedTnt = 0; // Spigot
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1101,7 +1092,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -1109,7 +1100,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
public List<Entity> getEntities(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate) {
|
||||||
@@ -1618,7 +1620,7 @@ index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab
|
|||||||
List<Entity> list = Lists.newArrayList();
|
List<Entity> list = Lists.newArrayList();
|
||||||
((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call
|
((ServerLevel)this).getEntityLookup().getEntities(except, box, list, predicate); // Paper - optimise this call
|
||||||
return list;
|
return list;
|
||||||
@@ -1120,7 +1110,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -1128,7 +1118,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate, List<? super T> result, int limit) {
|
public <T extends Entity> void getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate, List<? super T> result, int limit) {
|
||||||
@@ -1626,7 +1628,7 @@ index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab
|
|||||||
// Paper start - optimise this call
|
// Paper start - optimise this call
|
||||||
//TODO use limit
|
//TODO use limit
|
||||||
if (filter instanceof net.minecraft.world.entity.EntityType entityTypeTest) {
|
if (filter instanceof net.minecraft.world.entity.EntityType entityTypeTest) {
|
||||||
@@ -1448,14 +1437,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -1452,14 +1441,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1642,7 +1644,7 @@ index 6b5740e4e73a753c9516d7cbde575c1826afa22a..d92a2ac99b22ae8617c295b44e6b8cab
|
|||||||
public BiomeManager getBiomeManager() {
|
public BiomeManager getBiomeManager() {
|
||||||
return this.biomeManager;
|
return this.biomeManager;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||||
index 01b21f520ef1c834b9bafc3de85c1fa4fcf539d6..88ae013bdb94c228860c6e7869608a2777d52f3e 100644
|
index 15d266fc97eb73338f4f6fb2cfe25d6861e79810..eebc251467ddc141b2ae0408941740f6b01d11f2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||||
@@ -132,7 +132,6 @@ public final class NaturalSpawner {
|
@@ -132,7 +132,6 @@ public final class NaturalSpawner {
|
||||||
@@ -1675,7 +1677,7 @@ index 0f1025495237aebe30132ace0832aa5718d6f9bb..efe922810507c96183a56a5e81a7b142
|
|||||||
- }
|
- }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 28e4b302284f955a73e75d0f4276d55fb51826f5..40e0c951604875ce96b200561cbbf51bab97e188 100644
|
index 206dc04086a218b510930739a6c573f2653ab0fa..d46ca5eb581bdf4b64bdb875a93238ef6343090c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -28,7 +28,6 @@ import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
|
@@ -28,7 +28,6 @@ import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
|
||||||
@@ -1686,7 +1688,7 @@ index 28e4b302284f955a73e75d0f4276d55fb51826f5..40e0c951604875ce96b200561cbbf51b
|
|||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.level.ChunkPos;
|
import net.minecraft.world.level.ChunkPos;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
@@ -1294,9 +1293,6 @@ public class LevelChunk extends ChunkAccess {
|
@@ -1306,9 +1305,6 @@ public class LevelChunk extends ChunkAccess {
|
||||||
|
|
||||||
if (LevelChunk.this.isTicking(blockposition)) {
|
if (LevelChunk.this.isTicking(blockposition)) {
|
||||||
try {
|
try {
|
||||||
@@ -1696,7 +1698,7 @@ index 28e4b302284f955a73e75d0f4276d55fb51826f5..40e0c951604875ce96b200561cbbf51b
|
|||||||
this.blockEntity.tickTimer.startTiming(); // Spigot
|
this.blockEntity.tickTimer.startTiming(); // Spigot
|
||||||
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
||||||
|
|
||||||
@@ -1307,8 +1303,6 @@ public class LevelChunk extends ChunkAccess {
|
@@ -1319,8 +1315,6 @@ public class LevelChunk extends ChunkAccess {
|
||||||
this.loggedInvalidBlockState = true;
|
this.loggedInvalidBlockState = true;
|
||||||
LevelChunk.LOGGER.warn("Block entity {} @ {} state {} invalid for ticking:", new Object[]{LogUtils.defer(this::getType), LogUtils.defer(this::getPos), iblockdata});
|
LevelChunk.LOGGER.warn("Block entity {} @ {} state {} invalid for ticking:", new Object[]{LogUtils.defer(this::getType), LogUtils.defer(this::getPos), iblockdata});
|
||||||
}
|
}
|
||||||
@@ -1738,7 +1740,7 @@ index d23481453717f715124156b5d83f6448f720d049..c4052d1a7c2903564a8a6226c1b019d2
|
|||||||
startNode.g = 0.0F;
|
startNode.g = 0.0F;
|
||||||
startNode.h = this.getBestH(startNode, positions); // Paper - optimize collection
|
startNode.h = this.getBestH(startNode, positions); // Paper - optimize collection
|
||||||
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
diff --git a/src/main/java/net/minecraft/world/ticks/LevelTicks.java b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||||
index 7f1ac2cb29eb84833c0895442d611dfa0504527e..5447a3a4f0e4ca05377ba4f91811fd85b4f06f16 100644
|
index 1d7c663fa0e550bd0cfb9a4b83ccd7e2968666f0..cf685940e09251bef1a3d06f1e2468ce4ff46cc5 100644
|
||||||
--- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
--- a/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||||
+++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
+++ b/src/main/java/net/minecraft/world/ticks/LevelTicks.java
|
||||||
@@ -23,7 +23,6 @@ import net.minecraft.Util;
|
@@ -23,7 +23,6 @@ import net.minecraft.Util;
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 763b3a46e922c3db26507d2975f4b3e105f30838..365a740881e60d86c2ede8b1f498e9222a827f9a 100644
|
index b4b916f2929d83aaa160a69a198836ed53430e23..517a4cde947b51195ca7e99afc330d8b40fae235 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3629,7 +3629,7 @@ public abstract class LivingEntity extends Entity {
|
@@ -3591,7 +3591,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());
|
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());
|
||||||
|
|
||||||
// Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
|
// Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
|
||||||
@@ -53,7 +53,7 @@ index 763b3a46e922c3db26507d2975f4b3e105f30838..365a740881e60d86c2ede8b1f498e922
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
diff --git a/src/main/java/net/minecraft/world/level/BlockGetter.java b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||||
index d1eefa6ef3e9abfe7af4d8310aa64465fa2d5463..c970be55461f3063ec22ec0490781b974db134f6 100644
|
index 2ee9e8e3c1a28c1823de8e1fe421cc1f3e72f384..9d41fc2ed4fa623d5fac62fbb3340d13c78a746d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
|
--- a/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
+++ b/src/main/java/net/minecraft/world/level/BlockGetter.java
|
||||||
@@ -73,6 +73,16 @@ public interface BlockGetter extends LevelHeightAccessor {
|
@@ -73,6 +73,16 @@ public interface BlockGetter extends LevelHeightAccessor {
|
||||||
@@ -74,10 +74,10 @@ index d1eefa6ef3e9abfe7af4d8310aa64465fa2d5463..c970be55461f3063ec22ec0490781b97
|
|||||||
default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
|
default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
|
||||||
// Paper start - Prevent raytrace from loading chunks
|
// Paper start - Prevent raytrace from loading chunks
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index d92a2ac99b22ae8617c295b44e6b8cab2a95ae48..924e507a67e87c56346e7ae0ba6ef3fd8f72f853 100644
|
index 262626a0a01ed05f3f49cebec8b31266b2c441e7..c512c37439fa2b40bbd1d40301686bd13fa0469e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -403,6 +403,91 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -409,6 +409,91 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
index e7c06d98532160499f2610f69de27e30a326b16f..548f960a4cb3f0f023534c6ba22cbd5e48d863c4 100644
|
index f4f3f3a19d3cadaef1ae1a47daa68251a983dcf2..04f8e7709c52654241ff5f9403e2d58e42b47550 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
--- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java
|
||||||
@@ -26,8 +26,15 @@ public class ShapelessRecipe implements CraftingRecipe {
|
@@ -27,8 +27,15 @@ public class ShapelessRecipe implements CraftingRecipe {
|
||||||
final CraftingBookCategory category;
|
final CraftingBookCategory category;
|
||||||
final ItemStack result;
|
final ItemStack result;
|
||||||
final NonNullList<Ingredient> ingredients;
|
final NonNullList<Ingredient> ingredients;
|
||||||
@@ -56,7 +56,7 @@ index e7c06d98532160499f2610f69de27e30a326b16f..548f960a4cb3f0f023534c6ba22cbd5e
|
|||||||
this.id = id;
|
this.id = id;
|
||||||
this.group = group;
|
this.group = group;
|
||||||
this.category = category;
|
this.category = category;
|
||||||
@@ -81,6 +88,28 @@ public class ShapelessRecipe implements CraftingRecipe {
|
@@ -82,6 +89,28 @@ public class ShapelessRecipe implements CraftingRecipe {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(CraftingContainer inventory, Level world) {
|
public boolean matches(CraftingContainer inventory, Level world) {
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
index 893975e8587b9036f622e2088c302e33004496d2..93f722537a6b479561d79ba2e980c50a324f9486 100644
|
index 8b2a3a8482018b7db7de81bc295862f783e17ce5..64f6555372ba5c97891fd6742f51fa6680c690a2 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
@@ -43,6 +43,44 @@ public abstract class Projectile extends Entity {
|
@@ -44,6 +44,44 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||||
index 320c558bbe80d4bbc641e895ec43cfa2b45e8d70..bf62750c31ffba6c2aa4f6d17c1c71c62385e584 100644
|
index f5efdf59617d43de18a2267351fa784c0be3ae83..c1d6ba5bddf5a473ba746975fd323ea90b60ee8d 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
@@ -18,7 +18,7 @@ index 320c558bbe80d4bbc641e895ec43cfa2b45e8d70..bf62750c31ffba6c2aa4f6d17c1c71c6
|
|||||||
import java.time.temporal.ChronoField;
|
import java.time.temporal.ChronoField;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
@@ -256,12 +256,62 @@ public class Bat extends AmbientCreature {
|
@@ -251,12 +251,62 @@ public class Bat extends AmbientCreature {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ require it to be initialized earlier. By moving it to the superclass, we
|
|||||||
initialize it earlier, ensuring that it is available sooner.
|
initialize it earlier, ensuring that it is available sooner.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index e8658ed3784444991c5a6c8f03d2a5e021a11385..b8c4a0177b69dc3f79560e7ca5e80e681c73f698 100644
|
index 95c66ddf051017cd235a159886f02709122fe288..866213a1d3f2d1817cfd2798e92f2b512aef8840 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -770,7 +770,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -768,7 +768,6 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
// Paper start - optimise random block ticking
|
// Paper start - optimise random block ticking
|
||||||
private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos();
|
private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos();
|
||||||
@@ -31,10 +31,10 @@ index e8658ed3784444991c5a6c8f03d2a5e021a11385..b8c4a0177b69dc3f79560e7ca5e80e68
|
|||||||
|
|
||||||
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 924e507a67e87c56346e7ae0ba6ef3fd8f72f853..860d398c2228b14000dcf8bf2460e7c2eaa56739 100644
|
index c512c37439fa2b40bbd1d40301686bd13fa0469e..67de286dd6a569da9f8b36a4c7bd673830c17a2b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -177,6 +177,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -181,6 +181,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
|
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
|
||||||
public java.util.ArrayDeque<net.minecraft.world.level.block.RedstoneTorchBlock.Toggle> redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here
|
public java.util.ArrayDeque<net.minecraft.world.level.block.RedstoneTorchBlock.Toggle> redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here
|
||||||
|
|
||||||
|
|||||||
@@ -64,10 +64,10 @@ index d95c3b14c06421c03c99f84efb3a5319200f8a57..8ed18a158a13dceca7cd342125c09e52
|
|||||||
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index b8c4a0177b69dc3f79560e7ca5e80e681c73f698..afdc242861a05acfade89e01dfeaad0fa9a13e0a 100644
|
index 866213a1d3f2d1817cfd2798e92f2b512aef8840..8a1e9fe9f88ce551a0944103f061638804acb5f7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -772,6 +772,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -770,6 +770,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos();
|
private final BlockPos.MutableBlockPos chunkTickMutablePosition = new BlockPos.MutableBlockPos();
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ index b8c4a0177b69dc3f79560e7ca5e80e681c73f698..afdc242861a05acfade89e01dfeaad0f
|
|||||||
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
public void tickChunk(LevelChunk chunk, int randomTickSpeed) {
|
||||||
ChunkPos chunkcoordintpair = chunk.getPos();
|
ChunkPos chunkcoordintpair = chunk.getPos();
|
||||||
boolean flag = this.isRaining();
|
boolean flag = this.isRaining();
|
||||||
@@ -779,7 +781,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -777,7 +779,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
int k = chunkcoordintpair.getMinBlockZ();
|
int k = chunkcoordintpair.getMinBlockZ();
|
||||||
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
final BlockPos.MutableBlockPos blockposition = this.chunkTickMutablePosition; // Paper - use mutable to reduce allocation rate, final to force compile fail on change
|
||||||
|
|
||||||
@@ -85,7 +85,7 @@ index b8c4a0177b69dc3f79560e7ca5e80e681c73f698..afdc242861a05acfade89e01dfeaad0f
|
|||||||
blockposition.set(this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15))); // Paper
|
blockposition.set(this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15))); // Paper
|
||||||
if (this.isRainingAt(blockposition)) {
|
if (this.isRainingAt(blockposition)) {
|
||||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
||||||
@@ -808,7 +810,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -806,7 +808,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ index b8c4a0177b69dc3f79560e7ca5e80e681c73f698..afdc242861a05acfade89e01dfeaad0f
|
|||||||
this.getRandomBlockPosition(j, 0, k, 15, blockposition);
|
this.getRandomBlockPosition(j, 0, k, 15, blockposition);
|
||||||
int normalY = chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, blockposition.getX() & 15, blockposition.getZ() & 15) + 1;
|
int normalY = chunk.getHeight(Heightmap.Types.MOTION_BLOCKING, blockposition.getX() & 15, blockposition.getZ() & 15) + 1;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index 40e0c951604875ce96b200561cbbf51bab97e188..bca581f2a192015f5461e5bf776234687e5ae9fc 100644
|
index d46ca5eb581bdf4b64bdb875a93238ef6343090c..8e76062dc8f9411bc2b8b76b14d21ae6aa738a3a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -87,6 +87,18 @@ public class LevelChunk extends ChunkAccess {
|
@@ -87,6 +87,18 @@ public class LevelChunk extends ChunkAccess {
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Inventory.java b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
||||||
index 5bc033bf59d49eda1f8f2574165bbcbeab7faa0f..b59185cff16528b2e5a0c52807db9f21e2a68dda 100644
|
index 27c028ab6b1edb6e413af3bbaa27bf30f2d85540..5e0e5a59fced422b931009f98550fd0f8729d9f4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Inventory.java
|
||||||
@@ -681,6 +681,8 @@ public class Inventory implements Container, Nameable {
|
@@ -682,6 +682,8 @@ public class Inventory implements Container, Nameable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean contains(ItemStack stack) {
|
public boolean contains(ItemStack stack) {
|
||||||
@@ -43,7 +43,7 @@ index 5bc033bf59d49eda1f8f2574165bbcbeab7faa0f..b59185cff16528b2e5a0c52807db9f21
|
|||||||
Iterator iterator = this.compartments.iterator();
|
Iterator iterator = this.compartments.iterator();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
@@ -695,7 +697,18 @@ public class Inventory implements Container, Nameable {
|
@@ -696,7 +698,18 @@ public class Inventory implements Container, Nameable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index ef1ab585c27df057c330d47a12cc21875f04659f..ab078ac735a7820b1d191fc90e51cc1b55da1303 100644
|
index 670d66fb0bc64aab7473f92c25f69e91c1c0f226..02b51a9eca5796825c5d500220ff18895dea3299 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1067,6 +1067,13 @@ public final class CraftServer implements Server {
|
@@ -1044,6 +1044,13 @@ public final class CraftServer implements Server {
|
||||||
plugin.getDescription().getName(),
|
plugin.getDescription().getName(),
|
||||||
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
|
"This plugin is not properly shutting down its async tasks when it is being shut down. This task may throw errors during the final shutdown logs and might not complete before process dies."
|
||||||
));
|
));
|
||||||
|
|||||||
@@ -31,18 +31,18 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 365a740881e60d86c2ede8b1f498e9222a827f9a..e68eef2c5c8d3aea186beb5997122b8371fa11ae 100644
|
index 517a4cde947b51195ca7e99afc330d8b40fae235..db64a50dd929d64418cfd81176377b3a1d5d1acc 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -143,7 +143,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
@@ -141,7 +141,6 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
-import co.aikar.timings.MinecraftTimings; // Paper
|
-import co.aikar.timings.MinecraftTimings; // Paper
|
||||||
|
|
||||||
public abstract class LivingEntity extends Entity {
|
public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
@@ -1932,6 +1931,20 @@ public abstract class LivingEntity extends Entity {
|
@@ -1927,6 +1926,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
return this.lastClimbablePos;
|
return this.lastClimbablePos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,18 +31,18 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
index 663c1d8c1611af915a1bae733920dd75ad73feb1..19bdb2c717718f074ab2b4c5fb934ea29dd80c53 100644
|
index edd2c9d0cf5a81c779011cb4215d496a8987b784..6a21a12694d7c9277e1661dfcd1fd143fd5ebcfb 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
@@ -98,6 +98,7 @@ public class GameRules {
|
@@ -100,6 +100,7 @@ public class GameRules {
|
||||||
public static final GameRules.Key<GameRules.BooleanValue> RULE_LAVA_SOURCE_CONVERSION = GameRules.register("lavaSourceConversion", GameRules.Category.UPDATES, GameRules.BooleanValue.create(false));
|
|
||||||
public static final GameRules.Key<GameRules.BooleanValue> RULE_GLOBAL_SOUND_EVENTS = GameRules.register("globalSoundEvents", GameRules.Category.MISC, GameRules.BooleanValue.create(true));
|
public static final GameRules.Key<GameRules.BooleanValue> RULE_GLOBAL_SOUND_EVENTS = GameRules.register("globalSoundEvents", GameRules.Category.MISC, GameRules.BooleanValue.create(true));
|
||||||
|
public static final GameRules.Key<GameRules.BooleanValue> RULE_DO_VINES_SPREAD = GameRules.register("doVinesSpread", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
|
||||||
private final Map<GameRules.Key<?>, GameRules.Value<?>> rules;
|
private final Map<GameRules.Key<?>, GameRules.Value<?>> rules;
|
||||||
+ private final GameRules.Value<?>[] gameruleArray; // Gale - Airplane - use array for gamerule storage
|
+ private final GameRules.Value<?>[] gameruleArray; // Gale - Airplane - use array for gamerule storage
|
||||||
|
|
||||||
private static <T extends GameRules.Value<T>> GameRules.Key<T> register(String name, GameRules.Category category, GameRules.Type<T> type) {
|
private static <T extends GameRules.Value<T>> GameRules.Key<T> register(String name, GameRules.Category category, GameRules.Type<T> type) {
|
||||||
GameRules.Key<T> gamerules_gamerulekey = new GameRules.Key<>(name, category);
|
GameRules.Key<T> gamerules_gamerulekey = new GameRules.Key<>(name, category);
|
||||||
@@ -116,17 +117,33 @@ public class GameRules {
|
@@ -118,17 +119,33 @@ public class GameRules {
|
||||||
}
|
}
|
||||||
|
|
||||||
public GameRules() {
|
public GameRules() {
|
||||||
@@ -79,7 +79,7 @@ index 663c1d8c1611af915a1bae733920dd75ad73feb1..19bdb2c717718f074ab2b4c5fb934ea2
|
|||||||
}
|
}
|
||||||
|
|
||||||
public CompoundTag createTag() {
|
public CompoundTag createTag() {
|
||||||
@@ -185,6 +202,10 @@ public class GameRules {
|
@@ -187,6 +204,10 @@ public class GameRules {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class Key<T extends GameRules.Value<T>> {
|
public static final class Key<T extends GameRules.Value<T>> {
|
||||||
|
|||||||
@@ -188,19 +188,19 @@ index 241fec02e6869c638d3a160819b32173a081467b..1380f521de979b8734ebd13dd420b312
|
|||||||
public int getContainerSize() {
|
public int getContainerSize() {
|
||||||
return this.container1.getContainerSize() + this.container2.getContainerSize();
|
return this.container1.getContainerSize() + this.container2.getContainerSize();
|
||||||
diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java
|
diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java
|
||||||
index 540bc9500c35c0db719b00aa26f6fb3a1b08ed9f..f5bed0f18b2a3dbe7d52c1b83717298fa5acf561 100644
|
index 04b1531572e8fff1e46fe1c94e7fc863841e0f66..0d22bce549c46d686ab3402a1cad87307d0e1c00 100644
|
||||||
--- a/src/main/java/net/minecraft/world/Container.java
|
--- a/src/main/java/net/minecraft/world/Container.java
|
||||||
+++ b/src/main/java/net/minecraft/world/Container.java
|
+++ b/src/main/java/net/minecraft/world/Container.java
|
||||||
@@ -2,6 +2,8 @@ package net.minecraft.world;
|
@@ -3,6 +3,8 @@ package net.minecraft.world;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
+
|
+
|
||||||
+import net.minecraft.core.Direction;
|
+import net.minecraft.core.Direction;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
@@ -10,6 +12,63 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
@@ -13,6 +15,63 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public interface Container extends Clearable {
|
public interface Container extends Clearable {
|
||||||
@@ -263,9 +263,9 @@ index 540bc9500c35c0db719b00aa26f6fb3a1b08ed9f..f5bed0f18b2a3dbe7d52c1b83717298f
|
|||||||
+ // Gale end - Airplane - improve container checking with a bitset - allow the inventory to override and optimize these frequent calls
|
+ // Gale end - Airplane - improve container checking with a bitset - allow the inventory to override and optimize these frequent calls
|
||||||
|
|
||||||
int LARGE_MAX_STACK_SIZE = 64;
|
int LARGE_MAX_STACK_SIZE = 64;
|
||||||
|
int DEFAULT_DISTANCE_LIMIT = 8;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||||
index cc74eeb45913fab03e85969957215d2811252a83..33801e0725f023d077dbd91a593453d8af367cc2 100644
|
index 08f027cdcaeeca7b545483cb8c5eb8d13e4933b9..ef02bd4948c8c6bcf1d3da1a7e1c94d6628cd505 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||||
@@ -27,7 +27,10 @@ import org.bukkit.inventory.InventoryHolder;
|
@@ -27,7 +27,10 @@ import org.bukkit.inventory.InventoryHolder;
|
||||||
@@ -390,10 +390,10 @@ index a71414397bd45ee7bcacfeef0041d80dfa25f114..7743f185672e977520218c3ce6b8ddc9
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
index ccad692aba2ed77259f6814d88f01b91ed9d229b..877e07c62a6235670c756edef3eebb385bccccd4 100644
|
index cba114f554644a37339c93026630c66c43f524b9..b925173cba818e740f490e5b9f21ffafb043a217 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
@@ -43,7 +43,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -47,7 +47,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
|
|
||||||
public static final int MOVE_ITEM_SPEED = 8;
|
public static final int MOVE_ITEM_SPEED = 8;
|
||||||
public static final int HOPPER_CONTAINER_SIZE = 5;
|
public static final int HOPPER_CONTAINER_SIZE = 5;
|
||||||
@@ -404,7 +404,7 @@ index ccad692aba2ed77259f6814d88f01b91ed9d229b..877e07c62a6235670c756edef3eebb38
|
|||||||
private int cooldownTime;
|
private int cooldownTime;
|
||||||
private long tickedGameTime;
|
private long tickedGameTime;
|
||||||
|
|
||||||
@@ -79,14 +82,37 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -83,14 +86,37 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
|
|
||||||
public HopperBlockEntity(BlockPos pos, BlockState state) {
|
public HopperBlockEntity(BlockPos pos, BlockState state) {
|
||||||
super(BlockEntityType.HOPPER, pos, state);
|
super(BlockEntityType.HOPPER, pos, state);
|
||||||
@@ -444,7 +444,7 @@ index ccad692aba2ed77259f6814d88f01b91ed9d229b..877e07c62a6235670c756edef3eebb38
|
|||||||
if (!this.tryLoadLootTable(nbt)) {
|
if (!this.tryLoadLootTable(nbt)) {
|
||||||
ContainerHelper.loadAllItems(nbt, this.items);
|
ContainerHelper.loadAllItems(nbt, this.items);
|
||||||
}
|
}
|
||||||
@@ -158,7 +184,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -162,7 +188,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
flag = HopperBlockEntity.ejectItems(world, pos, state, (Container) blockEntity, blockEntity); // CraftBukkit
|
flag = HopperBlockEntity.ejectItems(world, pos, state, (Container) blockEntity, blockEntity); // CraftBukkit
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -453,37 +453,30 @@ index ccad692aba2ed77259f6814d88f01b91ed9d229b..877e07c62a6235670c756edef3eebb38
|
|||||||
flag |= booleansupplier.getAsBoolean();
|
flag |= booleansupplier.getAsBoolean();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,7 +223,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -202,7 +228,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
skipPushModeEventFire = skipHopperEvents;
|
skipPushModeEventFire = skipHopperEvents;
|
||||||
boolean foundItem = false;
|
boolean foundItem = false;
|
||||||
for (int i = 0; i < hopper.getContainerSize(); ++i) {
|
for (int i = 0; i < hopper.getContainerSize(); ++i) {
|
||||||
- ItemStack item = hopper.getItem(i);
|
- final ItemStack item = hopper.getItem(i);
|
||||||
+ ItemStack item = hopper.getItem(i); // Gale - Airplane - improve container checking with a bitset
|
+ final ItemStack item = hopper.getItem(i); // Gale - Airplane - improve container checking with a bitset
|
||||||
if (!item.isEmpty()) {
|
if (!item.isEmpty()) {
|
||||||
foundItem = true;
|
foundItem = true;
|
||||||
ItemStack origItemStack = item;
|
ItemStack origItemStack = item;
|
||||||
@@ -400,12 +426,18 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -451,11 +477,11 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isFullContainer(Container inventory, Direction direction) {
|
private static boolean isFullContainer(Container inventory, Direction direction) {
|
||||||
- return allMatch(inventory, direction, STACK_SIZE_TEST); // Paper - no streams
|
- return allMatch(inventory, direction, STACK_SIZE_TEST); // Paper - no streams
|
||||||
+ // Gale start - Airplane - improve container checking with a bitset - use bitsets
|
+ return inventory.isCompletelyFull(direction); // Gale - Airplane - improve container checking with a bitset - use bitsets
|
||||||
+ //return allMatch(inventory, direction, STACK_SIZE_TEST); // Paper - no streams
|
|
||||||
+ return inventory.isCompletelyFull(direction);
|
|
||||||
+ // Gale end - Airplane - improve container checking with a bitset - use bitsets
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isEmptyContainer(Container inv, Direction facing) {
|
private static boolean isEmptyContainer(Container inv, Direction facing) {
|
||||||
// Paper start
|
|
||||||
- return allMatch(inv, facing, IS_EMPTY_TEST);
|
- return allMatch(inv, facing, IS_EMPTY_TEST);
|
||||||
+ // Gale start - Airplane - improve container checking with a bitset - use bitsets
|
+ return inv.isCompletelyEmpty(facing); // Gale - Airplane - improve container checking with a bitset - use bitsets
|
||||||
+ //return allMatch(inv, facing, IS_EMPTY_TEST);
|
|
||||||
+ return inv.isCompletelyEmpty(facing);
|
|
||||||
+ // Gale start - Airplane - improve container checking with a bitset - use bitsets
|
|
||||||
}
|
}
|
||||||
private static boolean allMatch(Container iinventory, Direction enumdirection, java.util.function.BiPredicate<ItemStack, Integer> test) {
|
|
||||||
if (iinventory instanceof WorldlyContainer) {
|
public static boolean suckInItems(Level world, Hopper hopper) {
|
||||||
@@ -582,7 +614,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -636,7 +662,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
|
|
||||||
if (HopperBlockEntity.canPlaceItemInContainer(to, stack, slot, side)) {
|
if (HopperBlockEntity.canPlaceItemInContainer(to, stack, slot, side)) {
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
@@ -492,7 +485,7 @@ index ccad692aba2ed77259f6814d88f01b91ed9d229b..877e07c62a6235670c756edef3eebb38
|
|||||||
|
|
||||||
if (itemstack1.isEmpty()) {
|
if (itemstack1.isEmpty()) {
|
||||||
// Spigot start - SPIGOT-6693, InventorySubcontainer#setItem
|
// Spigot start - SPIGOT-6693, InventorySubcontainer#setItem
|
||||||
@@ -730,7 +762,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -813,7 +839,10 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void setItems(NonNullList<ItemStack> list) {
|
protected void setItems(NonNullList<ItemStack> list) {
|
||||||
@@ -505,21 +498,20 @@ index ccad692aba2ed77259f6814d88f01b91ed9d229b..877e07c62a6235670c756edef3eebb38
|
|||||||
|
|
||||||
public static void entityInside(Level world, BlockPos pos, BlockState state, Entity entity, HopperBlockEntity blockEntity) {
|
public static void entityInside(Level world, BlockPos pos, BlockState state, Entity entity, HopperBlockEntity blockEntity) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
index d559f93a9a09bac414dd5d58afccad42c127f09b..2175ed0c05a92d89db1cdae6983674efc4a8be08 100644
|
index 79b01e32f89defb6b78f4764600d33d4945af592..a05f7c8815d564bf1b95b6ce35ca2ac71ec84c9f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
@@ -96,13 +96,8 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
@@ -97,12 +97,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||||
public boolean isEmpty() {
|
public boolean isEmpty() {
|
||||||
this.unpackLootTable((Player)null);
|
this.unpackLootTable((Player)null);
|
||||||
// Paper start
|
// Paper start
|
||||||
- for (ItemStack itemStack : this.getItems()) {
|
- for (final ItemStack itemStack : this.getItems()) {
|
||||||
- if (!itemStack.isEmpty()) {
|
- if (!itemStack.isEmpty()) {
|
||||||
- return false;
|
- return false;
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
|
- return true;
|
||||||
+ return this.isCompletelyEmpty(null); // Gale - Airplane - improve container checking with a bitset - use super
|
+ return this.isCompletelyEmpty(null); // Gale - Airplane - improve container checking with a bitset - use super
|
||||||
// Paper end
|
// Paper end
|
||||||
- return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
|
|||||||
@@ -31,20 +31,20 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
index 190e9761087baec5827d722a8281f0ffb6798341..590b756842f5f9d1c2f0aed6517f9b46e3dc74db 100644
|
index b7fd8e70413c38923d0719aff803449e392383ac..48adbfbb8a55f6719c92a1fe83c64d87f1b236d5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
@@ -170,6 +170,7 @@ public class ServerEntity {
|
@@ -185,6 +185,7 @@ public class ServerEntity {
|
||||||
boolean flag4 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L;
|
boolean flag6 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L;
|
||||||
|
|
||||||
if (!flag4 && this.teleportDelay <= 400 && !this.wasRiding && this.wasOnGround == this.entity.isOnGround() && !(io.papermc.paper.configuration.GlobalConfiguration.get().collisions.sendFullPosForHardCollidingEntities && this.entity.hardCollides())) { // Paper - send full pos for hard colliding entities to prevent collision problems due to desync
|
if (!flag6 && this.teleportDelay <= 400 && !this.wasRiding && this.wasOnGround == this.entity.isOnGround() && !(io.papermc.paper.configuration.GlobalConfiguration.get().collisions.sendFullPosForHardCollidingEntities && this.entity.hardCollides())) { // Paper - send full pos for hard colliding entities to prevent collision problems due to desync
|
||||||
+ if (flag2 || flag3 || this.entity instanceof AbstractArrow) { // Gale - Airplane - better checking for useless move packets
|
+ if (flag2 || flag3 || this.entity instanceof AbstractArrow) { // Gale - Airplane - better checking for useless move packets
|
||||||
if ((!flag2 || !flag3) && !(this.entity instanceof AbstractArrow)) {
|
if ((!flag2 || !flag3) && !(this.entity instanceof AbstractArrow)) {
|
||||||
if (flag2) {
|
if (flag2) {
|
||||||
packet1 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.isOnGround());
|
packet1 = new ClientboundMoveEntityPacket.Pos(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), this.entity.isOnGround());
|
||||||
@@ -179,6 +180,7 @@ public class ServerEntity {
|
@@ -198,6 +199,7 @@ public class ServerEntity {
|
||||||
} else {
|
flag4 = true;
|
||||||
packet1 = new ClientboundMoveEntityPacket.PosRot(this.entity.getId(), (short) ((int) k), (short) ((int) l), (short) ((int) i1), (byte) i, (byte) j, this.entity.isOnGround());
|
flag5 = true;
|
||||||
}
|
}
|
||||||
+ } // Gale - Airplane - better checking for useless move packets
|
+ } // Gale - Airplane - better checking for useless move packets
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index f0ccdfbd7d7be8c6e302609accf8fe9cac8885c4..893eb4904df79a5fc629a0fc7a0c018548eeffb1 100644
|
index d47b3ac633e7936d30abfda6fc46c2c7412d76fe..036d7d29d7c85390b9658ddd70f17447648c265a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -255,10 +255,16 @@ public class ItemEntity extends Entity {
|
@@ -264,10 +264,16 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
if (entityitem.isMergable()) {
|
if (entityitem.isMergable()) {
|
||||||
// Paper Start - Fix items merging through walls
|
// Paper Start - Fix items merging through walls
|
||||||
if (this.level.paperConfig().fixes.fixItemsMergingThroughWalls) {
|
if (this.level.paperConfig().fixes.fixItemsMergingThroughWalls) {
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ index 0000000000000000000000000000000000000000..f3835d6934f4d82980eb068c0b8c238f
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/biome/Biome.java b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
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 c4f1173aab1e53412a65793e06238e637910475a..e0e7d61b985b93d169694f015e6cc49ded5a6bdc 100644
|
index 65012a12e1430956ef55ced56773e6354ac26444..e79404cfb0a04912a61583539aba51dc778bc729 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
|
--- a/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
+++ b/src/main/java/net/minecraft/world/level/biome/Biome.java
|
||||||
@@ -66,14 +66,20 @@ public final class Biome {
|
@@ -66,14 +66,20 @@ public final class Biome {
|
||||||
@@ -183,7 +183,7 @@ index c4f1173aab1e53412a65793e06238e637910475a..e0e7d61b985b93d169694f015e6cc49d
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -114,17 +120,15 @@ public final class Biome {
|
@@ -118,17 +124,15 @@ public final class Biome {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public float getTemperature(BlockPos blockPos) {
|
public float getTemperature(BlockPos blockPos) {
|
||||||
long l = blockPos.asLong();
|
long l = blockPos.asLong();
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 860d398c2228b14000dcf8bf2460e7c2eaa56739..70a4cabf3cc5a1d2fb4db462374f8d3aaf17487e 100644
|
index 67de286dd6a569da9f8b36a4c7bd673830c17a2b..901bd7f723b2c57ee5bbff0735fd6b47947f4383 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -268,6 +268,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -272,6 +272,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
|
|
||||||
public abstract ResourceKey<LevelStem> getTypeKey();
|
public abstract ResourceKey<LevelStem> getTypeKey();
|
||||||
|
|
||||||
@@ -47,10 +47,10 @@ index 860d398c2228b14000dcf8bf2460e7c2eaa56739..70a4cabf3cc5a1d2fb4db462374f8d3a
|
|||||||
+ @Override public final int getHeight() { return this.height; }
|
+ @Override public final int getHeight() { return this.height; }
|
||||||
+ // Gale end - Airplane - inline level height
|
+ // Gale end - Airplane - inline level height
|
||||||
+
|
+
|
||||||
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, Holder<DimensionType> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, GaleWorldConfiguration> galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration // Gale - Purpur - remove vanilla profiler
|
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.function.Function<org.spigotmc.SpigotWorldConfig, GaleWorldConfiguration> galeWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - Async-Anti-Xray - Pass executor // Gale - Gale configuration // Gale - Purpur - remove vanilla profiler
|
||||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
|
||||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper
|
||||||
@@ -290,6 +299,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -294,6 +303,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
});
|
});
|
||||||
final DimensionType dimensionmanager = (DimensionType) holder.value();
|
final DimensionType dimensionmanager = (DimensionType) holder.value();
|
||||||
|
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index d1e8123a114ea45846234535155df6cd039ba305..41140fbf32fc4db1b2460e453420e538290f4f99 100644
|
index d7a8b1ee9c3efda2c8463d6e06e54eb59b1b4dc4..014ca25e17915d2a3a8e2a8d37265a4d7bc09d24 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -1617,8 +1617,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1630,8 +1630,30 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
return ChunkMap.this.level.getServer().getScaledTrackingDistance(initialDistance);
|
return ChunkMap.this.level.getServer().getScaledTrackingDistance(initialDistance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ index d1e8123a114ea45846234535155df6cd039ba305..41140fbf32fc4db1b2460e453420e538
|
|||||||
Iterator iterator = this.entity.getIndirectPassengers().iterator();
|
Iterator iterator = this.entity.getIndirectPassengers().iterator();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
@@ -1630,6 +1652,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -1643,6 +1665,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
i = j;
|
i = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index aaa5af793ae0c177bcde75880445a3eb5970ce23..35affcc64e84c2daca72735271268eebde2eb25f 100644
|
index 389e382ba6197c224b0829b5b98f3c22f443e56f..0d2d5b4119b592acca62f9a637bd1dccf850b946 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -488,17 +488,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -489,17 +489,37 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
this.isLegacyTrackingEntity = isLegacyTrackingEntity;
|
this.isLegacyTrackingEntity = isLegacyTrackingEntity;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ index aaa5af793ae0c177bcde75880445a3eb5970ce23..35affcc64e84c2daca72735271268eeb
|
|||||||
for (Entity passenger : passengers) {
|
for (Entity passenger : passengers) {
|
||||||
org.spigotmc.TrackingRange.TrackingRangeType passengerType = passenger.trackingRangeType;
|
org.spigotmc.TrackingRange.TrackingRangeType passengerType = passenger.trackingRangeType;
|
||||||
int passengerRange = chunkMap.getEntityTrackerRange(passengerType.ordinal());
|
int passengerRange = chunkMap.getEntityTrackerRange(passengerType.ordinal());
|
||||||
@@ -507,6 +527,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -508,6 +528,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
range = passengerRange;
|
range = passengerRange;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 35affcc64e84c2daca72735271268eebde2eb25f..22ac029452a24199a90576c9456d4ba5eaaeb594 100644
|
index 0d2d5b4119b592acca62f9a637bd1dccf850b946..33e994d2a675e7677c1245dabd88a2b516020756 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -414,6 +414,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -415,6 +415,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return this.originWorld;
|
return this.originWorld;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index afdc242861a05acfade89e01dfeaad0fa9a13e0a..89aaa846d5cb1cfd8ccf634f85bdc4180013cfd0 100644
|
index 8a1e9fe9f88ce551a0944103f061638804acb5f7..118dfc8c87dd8f4d43332dd57addb46ddf99cc0d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -709,7 +709,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -707,7 +707,20 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
entity.stopRiding();
|
entity.stopRiding();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,10 +57,10 @@ index afdc242861a05acfade89e01dfeaad0fa9a13e0a..89aaa846d5cb1cfd8ccf634f85bdc418
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 70a4cabf3cc5a1d2fb4db462374f8d3aaf17487e..95d8883fabc6a7ea6f9e6dfcff9e2f2fce917dfe 100644
|
index 901bd7f723b2c57ee5bbff0735fd6b47947f4383..d4527b0f11893925c93b1846305fb3b17ba8e89a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -1010,13 +1010,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -1018,13 +1018,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
try {
|
try {
|
||||||
tickConsumer.accept(entity);
|
tickConsumer.accept(entity);
|
||||||
MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
MinecraftServer.getServer().executeMidTickTasks(); // Paper - execute chunk tasks mid tick
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ You should have received a copy of the GNU General Public License
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 22ac029452a24199a90576c9456d4ba5eaaeb594..72a0b1b084aafb8bb07eae4c9587a786766e24f2 100644
|
index 33e994d2a675e7677c1245dabd88a2b516020756..f4355116028f13d7b50821d60eeeb34a734e388b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4099,16 +4099,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4163,16 +4163,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
public boolean updateFluidHeightAndDoFluidPushing(TagKey<Fluid> tag, double speed) {
|
||||||
@@ -60,7 +60,7 @@ index 22ac029452a24199a90576c9456d4ba5eaaeb594..72a0b1b084aafb8bb07eae4c9587a786
|
|||||||
double d1 = 0.0D;
|
double d1 = 0.0D;
|
||||||
boolean flag = this.isPushedByFluid();
|
boolean flag = this.isPushedByFluid();
|
||||||
boolean flag1 = false;
|
boolean flag1 = false;
|
||||||
@@ -4116,14 +4118,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4180,14 +4182,61 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
int k1 = 0;
|
int k1 = 0;
|
||||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ index 22ac029452a24199a90576c9456d4ba5eaaeb594..72a0b1b084aafb8bb07eae4c9587a786
|
|||||||
|
|
||||||
if (d2 >= axisalignedbb.minY) {
|
if (d2 >= axisalignedbb.minY) {
|
||||||
flag1 = true;
|
flag1 = true;
|
||||||
@@ -4145,9 +4194,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4209,9 +4258,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -142,7 +142,7 @@ index 22ac029452a24199a90576c9456d4ba5eaaeb594..72a0b1b084aafb8bb07eae4c9587a786
|
|||||||
if (vec3d.length() > 0.0D) {
|
if (vec3d.length() > 0.0D) {
|
||||||
if (k1 > 0) {
|
if (k1 > 0) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||||
index b0c9fce9d4e06cac139e341d218d0b6aac1f1943..0ab7485f77c8d3bb0f5f16058027dc7b67965a64 100644
|
index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..2b376a73a2f3c38fa1774f79f975fc580460194e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||||
@@ -27,6 +27,7 @@ public class LevelChunkSection {
|
@@ -27,6 +27,7 @@ public class LevelChunkSection {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index b7cac76808d22a4f8e389c0f476e2825404b6e59..ef633f7d1d48f8c2447c7d191f31ec646d641dca 100644
|
index f6bc72697ca7e7cf4b573a95492a2278b7dcb6a0..fddbb312444fdc561c3795076c2874c195f29473 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -63,6 +63,7 @@ tasks.withType<JavaCompile> {
|
@@ -63,6 +63,7 @@ tasks.withType<JavaCompile> {
|
||||||
@@ -24,7 +24,7 @@ index b7cac76808d22a4f8e389c0f476e2825404b6e59..ef633f7d1d48f8c2447c7d191f31ec64
|
|||||||
}
|
}
|
||||||
// Gale end - hide irrelevant compilation warnings
|
// Gale end - hide irrelevant compilation warnings
|
||||||
|
|
||||||
@@ -186,6 +187,7 @@ fun TaskContainer.registerRunTask(
|
@@ -187,6 +188,7 @@ fun TaskContainer.registerRunTask(
|
||||||
modifiedJvmArgs.add("--enable-preview")
|
modifiedJvmArgs.add("--enable-preview")
|
||||||
modifiedJvmArgs.addAll(listOf("--add-opens=java.base/java.lang=ALL-UNNAMED"))
|
modifiedJvmArgs.addAll(listOf("--add-opens=java.base/java.lang=ALL-UNNAMED"))
|
||||||
// Gale end - enable virtual threads for development runs
|
// Gale end - enable virtual threads for development runs
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ you to easily disable books, should you want to preemptively remove this
|
|||||||
functionality before additional exploits are found.
|
functionality before additional exploits are found.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index c3c048ec2c8be72e0f5494f423bfafbd9b572b88..d3ada447bc1e83627b112886ed229bb2b50bd1f1 100644
|
index d56ed157045184d51a0af7cb722dbf5f01320b8f..f8e333288e7629a59c05e07bf754b2ed565d0aec 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -182,6 +182,8 @@ import net.minecraft.world.phys.Vec3;
|
@@ -184,6 +184,8 @@ import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.world.phys.shapes.BooleanOp;
|
import net.minecraft.world.phys.shapes.BooleanOp;
|
||||||
import net.minecraft.world.phys.shapes.Shapes;
|
import net.minecraft.world.phys.shapes.Shapes;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
@@ -34,7 +34,7 @@ index c3c048ec2c8be72e0f5494f423bfafbd9b572b88..d3ada447bc1e83627b112886ed229bb2
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -1202,6 +1204,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1204,6 +1206,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleEditBook(ServerboundEditBookPacket packet) {
|
public void handleEditBook(ServerboundEditBookPacket packet) {
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ data is already available in the blockPosition struct, so we use that
|
|||||||
instead of re-doing the casting.
|
instead of re-doing the casting.
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
index d1a59c2af0557a816c094983ec60097fb4de060c..3fad7e58a1461d897526d63efd27075f044f2962 100644
|
index 6efb8b10f17c70b05128039376d254e6beda3841..fe8d2fa5fdb116762b644b08020fee23e517e57c 100644
|
||||||
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
@@ -209,7 +209,7 @@ public final class MCUtil {
|
@@ -210,7 +210,7 @@ public final class MCUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long getCoordinateKey(final Entity entity) {
|
public static long getCoordinateKey(final Entity entity) {
|
||||||
@@ -35,7 +35,7 @@ index d1a59c2af0557a816c094983ec60097fb4de060c..3fad7e58a1461d897526d63efd27075f
|
|||||||
|
|
||||||
public static long getCoordinateKey(final ChunkPos pair) {
|
public static long getCoordinateKey(final ChunkPos pair) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 72a0b1b084aafb8bb07eae4c9587a786766e24f2..cd705a59d63eaaf090c63f5c3d088db3cb1afa16 100644
|
index f4355116028f13d7b50821d60eeeb34a734e388b..bd16880ba0efc2f3232431ac0a8df3c49915bafb 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -291,7 +291,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -291,7 +291,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ but is so much cheaper than the suffocation check that it's worth
|
|||||||
keeping it.
|
keeping it.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index e68eef2c5c8d3aea186beb5997122b8371fa11ae..6b1fb422d68f3b83fef66a8af997b2140f1d0897 100644
|
index db64a50dd929d64418cfd81176377b3a1d5d1acc..5629a2f7f0806475b5cc661894f5a915a08d9f15 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -400,7 +400,10 @@ public abstract class LivingEntity extends Entity {
|
@@ -395,7 +395,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
boolean flag = this instanceof net.minecraft.world.entity.player.Player;
|
boolean flag = this instanceof net.minecraft.world.entity.player.Player;
|
||||||
|
|
||||||
if (!this.level.isClientSide) {
|
if (!this.level.isClientSide) {
|
||||||
@@ -40,10 +40,10 @@ index e68eef2c5c8d3aea186beb5997122b8371fa11ae..6b1fb422d68f3b83fef66a8af997b214
|
|||||||
+ long checkStuckInWallInterval = this.level.galeConfig().smallOptimizations.reducedIntervals.checkStuckInWall;
|
+ long checkStuckInWallInterval = this.level.galeConfig().smallOptimizations.reducedIntervals.checkStuckInWall;
|
||||||
+ if ((checkStuckInWallInterval <= 1 || (tickCount % checkStuckInWallInterval == 0 && couldPossiblyBeHurt(1.0F))) && this.isInWall()) {
|
+ if ((checkStuckInWallInterval <= 1 || (tickCount % checkStuckInWallInterval == 0 && couldPossiblyBeHurt(1.0F))) && this.isInWall()) {
|
||||||
+ // Gale end - Pufferfish - reduce in wall checks
|
+ // Gale end - Pufferfish - reduce in wall checks
|
||||||
this.hurt(DamageSource.IN_WALL, 1.0F);
|
this.hurt(this.damageSources().inWall(), 1.0F);
|
||||||
} else if (flag && !this.level.getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
} else if (flag && !this.level.getWorldBorder().isWithinBounds(this.getBoundingBox())) {
|
||||||
double d0 = this.level.getWorldBorder().getDistanceToBorder(this) + this.level.getWorldBorder().getDamageSafeZone();
|
double d0 = this.level.getWorldBorder().getDistanceToBorder(this) + this.level.getWorldBorder().getDamageSafeZone();
|
||||||
@@ -1324,6 +1327,15 @@ public abstract class LivingEntity extends Entity {
|
@@ -1318,6 +1321,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
return this.getHealth() <= 0.0F;
|
return this.getHealth() <= 0.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: Pufferfish (https://github.com/pufferfish-gg/Pufferfish)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index d3ada447bc1e83627b112886ed229bb2b50bd1f1..619b5572b06e663824e38eaf29b477e8f9f86dda 100644
|
index f8e333288e7629a59c05e07bf754b2ed565d0aec..1c5263a8b93e2a62f6cb43abc96f84583da8cf54 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2357,6 +2357,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2351,6 +2351,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean updateChatOrder(Instant timestamp) {
|
private boolean updateChatOrder(Instant timestamp) {
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ launcher can very easily fill a chunk.
|
|||||||
Prevent saving Fireworks so that chunk unloads will wipe a chunks fireworks in this case.
|
Prevent saving Fireworks so that chunk unloads will wipe a chunks fireworks in this case.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
index 5406925cd66f46ab8744123c670d72cea7bfc3a1..0061af7c377793568f292be1850644dcca9e144a 100644
|
index fca27f98989bf106060ba08196255fe32f850df5..2260bc728ce6cdbc78408aec37ac3ffe26db3d76 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||||
@@ -358,4 +358,12 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
@@ -357,4 +357,12 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||||
public boolean isAttackable() {
|
public boolean isAttackable() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
index 2175ed0c05a92d89db1cdae6983674efc4a8be08..0c7b222176f521d0c9c056c67622b8df81d967bc 100644
|
index a05f7c8815d564bf1b95b6ce35ca2ac71ec84c9f..6e75f5696a6bc56a26578dba518920ac9b069427 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||||
@@ -69,6 +69,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
@@ -70,6 +70,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||||
}
|
}
|
||||||
|
|
||||||
public void unpackLootTable(@Nullable Player player) {
|
public void unpackLootTable(@Nullable Player player) {
|
||||||
|
|||||||
@@ -17,12 +17,12 @@ Licensed under: MIT (https://opensource.org/licenses/MIT)
|
|||||||
Only do an item "suck in" action once per second
|
Only do an item "suck in" action once per second
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
index 893eb4904df79a5fc629a0fc7a0c018548eeffb1..7b0374b6e22105e59b29995983a6ac50268c722e 100644
|
index 036d7d29d7c85390b9658ddd70f17447648c265a..b77d112f74046cd35f17bada00a22402cb716482 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||||
@@ -10,11 +10,13 @@ import net.minecraft.world.entity.Entity;
|
@@ -15,11 +15,13 @@ import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.entity.EntityType;
|
|
||||||
import net.minecraft.world.entity.MoverType;
|
import net.minecraft.world.entity.MoverType;
|
||||||
|
import net.minecraft.world.entity.TraceableEntity;
|
||||||
import net.minecraft.world.entity.player.Player;
|
import net.minecraft.world.entity.player.Player;
|
||||||
+import net.minecraft.world.entity.vehicle.MinecartHopper;
|
+import net.minecraft.world.entity.vehicle.MinecartHopper;
|
||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
@@ -32,9 +32,9 @@ index 893eb4904df79a5fc629a0fc7a0c018548eeffb1..7b0374b6e22105e59b29995983a6ac50
|
|||||||
import net.minecraft.world.level.gameevent.GameEvent;
|
import net.minecraft.world.level.gameevent.GameEvent;
|
||||||
+import net.minecraft.world.phys.AABB;
|
+import net.minecraft.world.phys.AABB;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.Util;
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
@@ -199,11 +201,31 @@ public class ItemEntity extends Entity {
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
@@ -208,11 +210,31 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.discard();
|
this.discard();
|
||||||
@@ -66,7 +66,7 @@ index 893eb4904df79a5fc629a0fc7a0c018548eeffb1..7b0374b6e22105e59b29995983a6ac50
|
|||||||
// Spigot start - copied from above
|
// Spigot start - copied from above
|
||||||
@Override
|
@Override
|
||||||
public void inactiveTick() {
|
public void inactiveTick() {
|
||||||
@@ -223,7 +245,13 @@ public class ItemEntity extends Entity {
|
@@ -232,7 +254,13 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
this.discard();
|
this.discard();
|
||||||
@@ -81,18 +81,18 @@ index 893eb4904df79a5fc629a0fc7a0c018548eeffb1..7b0374b6e22105e59b29995983a6ac50
|
|||||||
// Spigot end
|
// Spigot end
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||||
index 70f1916185b79bbb9f033f4ef8119d7b17a13ef8..eb12e78d3bf504cd0d641753934491733bfafdf6 100644
|
index 1b8f22805af87dc08e0dea9fd93a5f93c0b05107..36c2da765ef520d0cbe239892b8234b81b1b8012 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartHopper.java
|
||||||
@@ -22,6 +22,7 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
@@ -17,6 +17,7 @@ import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
|
||||||
|
public class MinecartHopper extends AbstractMinecartContainer implements Hopper {
|
||||||
private boolean enabled = true;
|
private boolean enabled = true;
|
||||||
public int cooldownTime = -1;
|
|
||||||
private final BlockPos lastPosition = BlockPos.ZERO;
|
|
||||||
+ public int pickupImmunity = 0; // Gale - EMC - reduce hopper item checks
|
+ public int pickupImmunity = 0; // Gale - EMC - reduce hopper item checks
|
||||||
|
|
||||||
public MinecartHopper(EntityType<? extends MinecartHopper> type, Level world) {
|
public MinecartHopper(EntityType<? extends MinecartHopper> type, Level world) {
|
||||||
super(type, world);
|
super(type, world);
|
||||||
@@ -159,4 +160,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
@@ -132,4 +133,12 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -106,12 +106,12 @@ index 70f1916185b79bbb9f033f4ef8119d7b17a13ef8..eb12e78d3bf504cd0d64175393449173
|
|||||||
+
|
+
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||||
index 6a1405a8630e90db3b5a3c9152259ba6f5f0c784..f55af1cadca08a426d9b4741ae3f1c32c31d8fa3 100644
|
index a05acf709735b40ca86f978508c63a86065fd405..3752b4ba7fb0d680d4b4a61bf44d54d5ab11815c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/Hopper.java
|
||||||
@@ -16,6 +16,8 @@ public interface Hopper extends Container {
|
@@ -14,6 +14,8 @@ public interface Hopper extends Container {
|
||||||
|
return SUCK;
|
||||||
default net.minecraft.core.BlockPos getBlockPosition() { return new net.minecraft.core.BlockPos(getLevelX(), getLevelY(), getLevelZ()); } // Paper
|
}
|
||||||
|
|
||||||
+ long getAndIncrementAttemptCounter(); // Gale - EMC - reduce hopper item checks
|
+ long getAndIncrementAttemptCounter(); // Gale - EMC - reduce hopper item checks
|
||||||
+
|
+
|
||||||
@@ -119,10 +119,10 @@ index 6a1405a8630e90db3b5a3c9152259ba6f5f0c784..f55af1cadca08a426d9b4741ae3f1c32
|
|||||||
|
|
||||||
double getLevelY();
|
double getLevelY();
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
index 877e07c62a6235670c756edef3eebb385bccccd4..3b5b3750265ea72d6d0c33c7261f0dab9fea2413 100644
|
index b925173cba818e740f490e5b9f21ffafb043a217..81ad831d878c303efe62cc0f9b24f55bc0d5b1d7 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||||
@@ -10,6 +10,7 @@ import net.minecraft.core.Direction;
|
@@ -11,6 +11,7 @@ import net.minecraft.core.Direction;
|
||||||
import net.minecraft.core.NonNullList;
|
import net.minecraft.core.NonNullList;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
@@ -130,7 +130,7 @@ index 877e07c62a6235670c756edef3eebb385bccccd4..3b5b3750265ea72d6d0c33c7261f0dab
|
|||||||
import net.minecraft.world.CompoundContainer;
|
import net.minecraft.world.CompoundContainer;
|
||||||
import net.minecraft.world.Container;
|
import net.minecraft.world.Container;
|
||||||
import net.minecraft.world.ContainerHelper;
|
import net.minecraft.world.ContainerHelper;
|
||||||
@@ -495,7 +496,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -501,7 +502,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
});
|
});
|
||||||
@@ -139,15 +139,15 @@ index 877e07c62a6235670c756edef3eebb385bccccd4..3b5b3750265ea72d6d0c33c7261f0dab
|
|||||||
Iterator iterator = HopperBlockEntity.getItemsAtAndAbove(world, hopper).iterator();
|
Iterator iterator = HopperBlockEntity.getItemsAtAndAbove(world, hopper).iterator();
|
||||||
|
|
||||||
ItemEntity entityitem;
|
ItemEntity entityitem;
|
||||||
@@ -510,6 +511,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -516,6 +517,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
+ return false; // Gale - EMC - reduce hopper item checks
|
+ return false; // Gale - EMC - reduce hopper item checks
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper - method unused as logic is inlined above
|
@io.papermc.paper.annotation.DoNotUse // Paper - method unused as logic is inlined above
|
||||||
@@ -728,6 +730,31 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
@@ -805,6 +807,31 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||||
return !first.is(second.getItem()) ? false : (first.getDamageValue() != second.getDamageValue() ? false : (first.getCount() > first.getMaxStackSize() ? false : ItemStack.tagMatches(first, second)));
|
return !first.is(second.getItem()) ? false : (first.getDamageValue() != second.getDamageValue() ? false : (first.getCount() > first.getMaxStackSize() ? false : ItemStack.tagMatches(first, second)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index 8a548616885149fe23763b3b2cd46dc8323e5803..c5984ad4d12fec9310156a7b7c7beddd3dc0ba57 100644
|
index 3c92e6fb78cce27572709cd767fb191f9107e0eb..2dcab455bdc6b0742cd2322062678aa7cd173c79 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -261,6 +261,7 @@ public class ServerPlayer extends Player {
|
@@ -267,6 +267,7 @@ public class ServerPlayer extends Player {
|
||||||
public boolean joining = true;
|
public boolean joining = true;
|
||||||
public boolean sentListPacket = false;
|
public boolean sentListPacket = false;
|
||||||
public boolean supressTrackerForLogin = false; // Paper
|
public boolean supressTrackerForLogin = false; // Paper
|
||||||
@@ -25,25 +25,25 @@ index 8a548616885149fe23763b3b2cd46dc8323e5803..c5984ad4d12fec9310156a7b7c7beddd
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
public boolean isRealPlayer; // Paper
|
public boolean isRealPlayer; // Paper
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 619b5572b06e663824e38eaf29b477e8f9f86dda..8d14c710dbae635f0bf2c359ba1b2c144c95f536 100644
|
index 1c5263a8b93e2a62f6cb43abc96f84583da8cf54..81fbaea23646bab3c8d6425d284a1a1bd1579095 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2333,6 +2333,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2328,6 +2328,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
} else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
|
if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
|
||||||
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
|
this.send(new ClientboundSystemChatPacket(PaperAdventure.asAdventure(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED)), false)); // Paper - Adventure
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
+ // Gale start - EMC - do not process chat/commands before player has joined
|
+ // Gale start - EMC - do not process chat/commands before player has joined
|
||||||
+ } else if (!player.didPlayerJoinEvent) {
|
+ } else if (!player.didPlayerJoinEvent) {
|
||||||
+ return Optional.empty();
|
+ return Optional.empty();
|
||||||
+ // Gale end - EMC - do not process chat/commands before player has joined
|
+ // Gale end - EMC - do not process chat/commands before player has joined
|
||||||
} else {
|
} else {
|
||||||
Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(acknowledgment);
|
this.player.resetLastActionTime();
|
||||||
|
return optional;
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 4b754f6eae683248d7fe11d6d6cb168d5dd696a2..601b7cb73af55bdf8fd51c5f73e96a9656576cc2 100644
|
index c0c14766adaac855112f85a203a6163b8adfdded..804ca4ab8539a9319704628ed53d6ccca654d8e3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -322,6 +322,8 @@ public abstract class PlayerList {
|
@@ -328,6 +328,8 @@ public abstract class PlayerList {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ As part of: EmpireCraft (https://github.com/starlis/empirecraft)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
diff --git a/src/main/java/net/minecraft/stats/ServerStatsCounter.java b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||||
index 72946e324c575ef39f3939225b96b68f724da460..75e2a7d19a7056b73c1524902e44cca05b03d622 100644
|
index 9501e5f25f5c4d3069e554d4dc82b0e094156682..e81afb79d66321f70eb40c43d3bd7b92a49fa1ac 100644
|
||||||
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
--- a/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||||
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
+++ b/src/main/java/net/minecraft/stats/ServerStatsCounter.java
|
||||||
@@ -36,6 +36,7 @@ import net.minecraft.server.level.ServerPlayer;
|
@@ -36,6 +36,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||||
@@ -24,7 +24,7 @@ index 72946e324c575ef39f3939225b96b68f724da460..75e2a7d19a7056b73c1524902e44cca0
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
public class ServerStatsCounter extends StatsCounter {
|
public class ServerStatsCounter extends StatsCounter {
|
||||||
@@ -135,15 +136,15 @@ public class ServerStatsCounter extends StatsCounter {
|
@@ -131,15 +132,15 @@ public class ServerStatsCounter extends StatsCounter {
|
||||||
Util.ifElse(this.getStat(statisticwrapper, s2), (statistic) -> {
|
Util.ifElse(this.getStat(statisticwrapper, s2), (statistic) -> {
|
||||||
this.stats.put(statistic, nbttagcompound2.getInt(s2));
|
this.stats.put(statistic, nbttagcompound2.getInt(s2));
|
||||||
}, () -> {
|
}, () -> {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 8d14c710dbae635f0bf2c359ba1b2c144c95f536..ffaebc09f523d9400ed13eded9f0c39ac650ba22 100644
|
index 81fbaea23646bab3c8d6425d284a1a1bd1579095..a6af613e91015dc3b9ec31f9c0ff57072e3ab40f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -183,6 +183,7 @@ import net.minecraft.world.phys.shapes.BooleanOp;
|
@@ -185,6 +185,7 @@ import net.minecraft.world.phys.shapes.BooleanOp;
|
||||||
import net.minecraft.world.phys.shapes.Shapes;
|
import net.minecraft.world.phys.shapes.Shapes;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
|
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
|
||||||
@@ -18,7 +18,7 @@ index 8d14c710dbae635f0bf2c359ba1b2c144c95f536..ffaebc09f523d9400ed13eded9f0c39a
|
|||||||
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
@@ -2546,7 +2547,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2540,7 +2541,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
String s = message.signedContent();
|
String s = message.signedContent();
|
||||||
if (s.isEmpty()) {
|
if (s.isEmpty()) {
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||||
index a0c19503aabab5378d672a30163d35a5ba05b6c1..5ba0a756d45350dcda3caa5518c9a47a4de06f14 100644
|
index 26888ebd38280de92e41dd8006d2b24e874afe26..c953f7f2f125985eeec9563a22f9188cc979cd36 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
--- a/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
+++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java
|
||||||
@@ -47,6 +47,7 @@ import net.minecraft.server.level.ServerPlayer;
|
@@ -43,6 +43,7 @@ import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.server.players.PlayerList;
|
import net.minecraft.server.players.PlayerList;
|
||||||
import net.minecraft.util.datafix.DataFixTypes;
|
import net.minecraft.util.datafix.DataFixTypes;
|
||||||
import net.minecraft.world.level.GameRules;
|
import net.minecraft.world.level.GameRules;
|
||||||
@@ -48,12 +48,12 @@ index a0c19503aabab5378d672a30163d35a5ba05b6c1..5ba0a756d45350dcda3caa5518c9a47a
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
public class PlayerAdvancements {
|
public class PlayerAdvancements {
|
||||||
@@ -183,7 +184,7 @@ public class PlayerAdvancements {
|
@@ -147,7 +148,7 @@ public class PlayerAdvancements {
|
||||||
if (advancement == null) {
|
if (advancement == null) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (entry.getKey().getNamespace().equals("minecraft")) {
|
if (entry.getKey().getNamespace().equals("minecraft")) {
|
||||||
- PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.file);
|
- PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.playerSavePath);
|
||||||
+ if (GaleGlobalConfiguration.get().logToConsole.ignoredAdvancements) PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.file); // Gale - Purpur - do not log ignored advancements
|
+ if (GaleGlobalConfiguration.get().logToConsole.ignoredAdvancements) PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", entry.getKey(), this.playerSavePath); // Gale - Purpur - do not log ignored advancements
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index ffaebc09f523d9400ed13eded9f0c39ac650ba22..8d537d9822fd88ec92acf57cf76e903678a12301 100644
|
index a6af613e91015dc3b9ec31f9c0ff57072e3ab40f..671bdb4614e4dbc0604785ba22f5a2b5de14fe16 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -2326,7 +2326,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2318,7 +2318,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
||||||
if (!this.updateChatOrder(timestamp)) {
|
if (!this.updateChatOrder(timestamp)) {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
diff --git a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||||
index 309fe1162db195c7c3c94d785d6aa2700e42b08a..e50b9ba2a711e6d05393b833342090bcfda2c93f 100644
|
index 4d9bc4a62ebae0f3707900503576c64733de639f..37cec44082a4bf7be2ee238729aedb10cc19ea3f 100644
|
||||||
--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
--- a/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||||
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
+++ b/src/main/java/io/papermc/paper/adventure/ChatProcessor.java
|
||||||
@@ -42,6 +42,7 @@ import org.bukkit.event.player.PlayerChatEvent;
|
@@ -43,6 +43,7 @@ import org.bukkit.event.player.PlayerChatEvent;
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
import org.checkerframework.framework.qual.DefaultQualifier;
|
||||||
@@ -18,7 +18,7 @@ index 309fe1162db195c7c3c94d785d6aa2700e42b08a..e50b9ba2a711e6d05393b833342090bc
|
|||||||
|
|
||||||
import static net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection;
|
import static net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection;
|
||||||
|
|
||||||
@@ -352,7 +353,7 @@ public final class ChatProcessor {
|
@@ -353,7 +354,7 @@ public final class ChatProcessor {
|
||||||
|
|
||||||
private void sendToServer(final ChatType.Bound chatType, final @Nullable Function<Audience, net.minecraft.network.chat.Component> msgFunction) {
|
private void sendToServer(final ChatType.Bound chatType, final @Nullable Function<Audience, net.minecraft.network.chat.Component> msgFunction) {
|
||||||
final PlayerChatMessage toConsoleMessage = msgFunction == null ? ChatProcessor.this.message : ChatProcessor.this.message.withUnsignedContent(msgFunction.apply(ChatProcessor.this.server.console));
|
final PlayerChatMessage toConsoleMessage = msgFunction == null ? ChatProcessor.this.message : ChatProcessor.this.message.withUnsignedContent(msgFunction.apply(ChatProcessor.this.server.console));
|
||||||
@@ -28,10 +28,10 @@ index 309fe1162db195c7c3c94d785d6aa2700e42b08a..e50b9ba2a711e6d05393b833342090bc
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 601b7cb73af55bdf8fd51c5f73e96a9656576cc2..3725f8ff144123ce2898cd5de2a128a067e43ce4 100644
|
index 804ca4ab8539a9319704628ed53d6ccca654d8e3..e8299ed2eaae287379136f5331434bc354d58ebd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -100,6 +100,7 @@ import net.minecraft.world.scores.Objective;
|
@@ -101,6 +101,7 @@ import net.minecraft.world.scores.Objective;
|
||||||
import net.minecraft.world.scores.PlayerTeam;
|
import net.minecraft.world.scores.PlayerTeam;
|
||||||
import net.minecraft.world.scores.Scoreboard; // Paper
|
import net.minecraft.world.scores.Scoreboard; // Paper
|
||||||
import net.minecraft.world.scores.Team;
|
import net.minecraft.world.scores.Team;
|
||||||
@@ -39,12 +39,12 @@ index 601b7cb73af55bdf8fd51c5f73e96a9656576cc2..3725f8ff144123ce2898cd5de2a128a0
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -1380,7 +1381,7 @@ public abstract class PlayerList {
|
@@ -1389,7 +1390,7 @@ public abstract class PlayerList {
|
||||||
// Paper end
|
// Paper end
|
||||||
boolean flag = this.verifyChatTrusted(message);
|
boolean flag = this.verifyChatTrusted(message);
|
||||||
|
|
||||||
- this.server.logChatMessage((unsignedFunction == null ? Component.literal(message.signedContent()) : unsignedFunction.apply(this.server.console)), params, flag ? null : "Not Secure"); // Paper
|
- this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag ? null : "Not Secure"); // Paper
|
||||||
+ this.server.logChatMessage((unsignedFunction == null ? Component.literal(message.signedContent()) : unsignedFunction.apply(this.server.console)), params, flag || !GaleGlobalConfiguration.get().logToConsole.chat.notSecureMarker ? null : "Not Secure"); // Paper // Gale - do not log Not Secure marker
|
+ this.server.logChatMessage((unsignedFunction == null ? message.decoratedContent() : unsignedFunction.apply(this.server.console)), params, flag || !GaleGlobalConfiguration.get().logToConsole.chat.notSecureMarker ? null : "Not Secure"); // Paper // Gale - do not log Not Secure marker
|
||||||
OutgoingChatMessage outgoingchatmessage = OutgoingChatMessage.create(message);
|
OutgoingChatMessage outgoingchatmessage = OutgoingChatMessage.create(message);
|
||||||
boolean flag1 = false;
|
boolean flag1 = false;
|
||||||
|
|
||||||
|
|||||||
@@ -38,14 +38,17 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||||
index 0725c39d9cbec3282f93975a0ae76f060f70d86d..c222fc336c997fea2204a7960055aa706605dc22 100644
|
index 2c13147bc063a09bb7907d6f90c3a1e811a09eb1..38ba786b86de87a3e407e50b4cde40456200936f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||||
@@ -152,6 +152,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
@@ -153,6 +153,10 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
||||||
this.connection.send(new ClientboundStatusResponsePacket(ping));
|
this.connection.send(new ClientboundStatusResponsePacket(ping));
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
*/
|
*/
|
||||||
+ if (this.server.getStatus().getVersion() == null) return; // Gale - Purpur - fix 'outdated server' showing in ping before server fully boots - do not respond to pings before we know the protocol version
|
+ // Gale start - Purpur - fix 'outdated server' showing in ping before server fully boots - do not respond to pings before we know the protocol version
|
||||||
com.destroystokyo.paper.network.StandardPaperServerListPingEventImpl.processRequest(this.server, this.connection);
|
+ var version = MinecraftServer.getServer().getStatus().version();
|
||||||
|
+ if (version == null || version.isEmpty()) return;
|
||||||
|
+ // Gale end - Purpur - fix 'outdated server' showing in ping before server fully boots - do not respond to pings before we know the protocol version
|
||||||
|
com.destroystokyo.paper.network.StandardPaperServerListPingEventImpl.processRequest(MinecraftServer.getServer(), this.connection);
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
index eacb8a407fe99af2c13f23c12b5544696bda8890..df8487488bcce6a8ae4cd7c995ab61cae04acbb6 100644
|
index ce2c3c146ef64400e00084bd2245d2b87a67fbc2..2496b14c3a284d5a2f80a42e6cc23830521f87ec 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||||
@@ -130,7 +130,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -131,7 +131,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
// Paper start - fix sand duping
|
// Paper start - fix sand duping
|
||||||
@@ -49,7 +49,7 @@ index eacb8a407fe99af2c13f23c12b5544696bda8890..df8487488bcce6a8ae4cd7c995ab61ca
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end - fix sand duping
|
// Paper end - fix sand duping
|
||||||
@@ -147,7 +147,7 @@ public class FallingBlockEntity extends Entity {
|
@@ -148,7 +148,7 @@ public class FallingBlockEntity extends Entity {
|
||||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||||
|
|
||||||
// Paper start - fix sand duping
|
// Paper start - fix sand duping
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
||||||
index 18389f46902bb9879ac6d734723e9a720724dc48..613970368890d78ab589f654a66024eeef23983a 100644
|
index 35cfa366baf6747105faa93f1220bb9cc31a5bd5..2fcdb8173db167a440a5a94d1ec8f6c2eeb08c0b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
--- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
+++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java
|
||||||
@@ -83,6 +83,6 @@ public abstract class WaterAnimal extends PathfinderMob {
|
@@ -82,6 +82,6 @@ public abstract class WaterAnimal extends PathfinderMob {
|
||||||
i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i);
|
i = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.maximum.or(i);
|
||||||
j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j);
|
j = world.getMinecraftWorld().paperConfig().entities.spawning.wateranimalSpawnHeight.minimum.or(j);
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||||
index 428523feaa4f30260e32ba03937e88200246c693..29afe1f873c9c87fe5a83f22025cf7f773c4cf2c 100644
|
index 30aec9dff249ae629b22318e52902361a9fa4099..c58fab79c9425a56cd9ffdfa81e4ea97d5dff941 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java
|
||||||
@@ -283,6 +283,16 @@ public class ItemFrame extends HangingEntity {
|
@@ -287,6 +287,16 @@ public class ItemFrame extends HangingEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ the displayed hunger bar never goes down. Hunger (or any related value, includin
|
|||||||
should not go down on peaceful. See https://bugs.mojang.com/browse/MC-31819.
|
should not go down on peaceful. See https://bugs.mojang.com/browse/MC-31819.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index f6e4194856d4a2710a169b5823e74da1ba2c9130..685b69df4c63ef64d62476eb90bf82ee5f87814d 100644
|
index 2b02800666b358159c8ecb63208a14855f90657b..9e7b5b876ec7aa90bf46afa6992fc59e67aedc9b 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -1901,6 +1901,11 @@ public abstract class Player extends LivingEntity {
|
@@ -1896,6 +1896,11 @@ public abstract class Player extends LivingEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
|
public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ As part of: Mirai (https://github.com/etil2jz/Mirai)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||||
index 0bab2693b91d5bab222c7db8bc6965ccde954003..4b56e5113136039cf2714ea71f0c51bebae3ab39 100644
|
index c57efcb9a79337ec791e4e8f6671612f0a82b441..efb3570aa66d13438133b43b9e58d308edb5a478 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
|
||||||
@@ -6,6 +6,7 @@ import javax.annotation.Nullable;
|
@@ -6,6 +6,7 @@ import javax.annotation.Nullable;
|
||||||
@@ -23,8 +23,8 @@ index 0bab2693b91d5bab222c7db8bc6965ccde954003..4b56e5113136039cf2714ea71f0c51be
|
|||||||
+import net.minecraft.core.registries.BuiltInRegistries;
|
+import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.world.ContainerHelper;
|
import net.minecraft.world.Container;
|
||||||
@@ -48,6 +49,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
@@ -49,6 +50,7 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||||
public static final int DATA_BREW_TIME = 0;
|
public static final int DATA_BREW_TIME = 0;
|
||||||
public static final int DATA_FUEL_USES = 1;
|
public static final int DATA_FUEL_USES = 1;
|
||||||
public static final int NUM_DATA_VALUES = 2;
|
public static final int NUM_DATA_VALUES = 2;
|
||||||
@@ -32,7 +32,7 @@ index 0bab2693b91d5bab222c7db8bc6965ccde954003..4b56e5113136039cf2714ea71f0c51be
|
|||||||
private NonNullList<ItemStack> items;
|
private NonNullList<ItemStack> items;
|
||||||
public int brewTime;
|
public int brewTime;
|
||||||
private boolean[] lastPotionCount;
|
private boolean[] lastPotionCount;
|
||||||
@@ -300,6 +302,22 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
@@ -301,6 +303,22 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||||
ContainerHelper.loadAllItems(nbt, this.items);
|
ContainerHelper.loadAllItems(nbt, this.items);
|
||||||
this.brewTime = nbt.getShort("BrewTime");
|
this.brewTime = nbt.getShort("BrewTime");
|
||||||
this.fuel = nbt.getByte("Fuel");
|
this.fuel = nbt.getByte("Fuel");
|
||||||
@@ -55,7 +55,7 @@ index 0bab2693b91d5bab222c7db8bc6965ccde954003..4b56e5113136039cf2714ea71f0c51be
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -308,6 +326,18 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
@@ -309,6 +327,18 @@ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements
|
||||||
nbt.putShort("BrewTime", (short) this.brewTime);
|
nbt.putShort("BrewTime", (short) this.brewTime);
|
||||||
ContainerHelper.saveAllItems(nbt, this.items);
|
ContainerHelper.saveAllItems(nbt, this.items);
|
||||||
nbt.putByte("Fuel", (byte) this.fuel);
|
nbt.putByte("Fuel", (byte) this.fuel);
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 3725f8ff144123ce2898cd5de2a128a067e43ce4..f86c3b75b4b5f2d159d91c61e77dfcc3d60a8311 100644
|
index e8299ed2eaae287379136f5331434bc354d58ebd..9fed88164c5e3173e206e145ffbafa16e349d674 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -459,7 +459,13 @@ public abstract class PlayerList {
|
@@ -466,7 +466,13 @@ public abstract class PlayerList {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
// CraftBukkit - Moved from above, added world
|
// CraftBukkit - Moved from above, added world
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ index 163b1895bcbd16e93d36cd60d03e6b21df51cba7..28501ba714d313f3d349074fe49f0ced
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
diff --git a/src/main/java/net/minecraft/nbt/CompoundTag.java b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
index 42ea3573c0e8559a264fd24fc09c3a5cd7628d9b..25589dcabeb9ba189c3eddd4d1032949c326c78a 100644
|
index 7e94ebe06fc62293e665d6db19e42d947e7eb30f..1a969e51f284ca9beb54ac7eff53a4427c1c8202 100644
|
||||||
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
--- a/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
+++ b/src/main/java/net/minecraft/nbt/CompoundTag.java
|
||||||
@@ -1,6 +1,5 @@
|
@@ -1,6 +1,5 @@
|
||||||
@@ -221,7 +221,7 @@ index 42ea3573c0e8559a264fd24fc09c3a5cd7628d9b..25589dcabeb9ba189c3eddd4d1032949
|
|||||||
import net.minecraft.CrashReport;
|
import net.minecraft.CrashReport;
|
||||||
import net.minecraft.CrashReportCategory;
|
import net.minecraft.CrashReportCategory;
|
||||||
import net.minecraft.ReportedException;
|
import net.minecraft.ReportedException;
|
||||||
@@ -377,7 +378,7 @@ public class CompoundTag implements Tag {
|
@@ -379,7 +380,7 @@ public class CompoundTag implements Tag {
|
||||||
throw new ReportedException(this.createReport(key, ByteArrayTag.TYPE, var3));
|
throw new ReportedException(this.createReport(key, ByteArrayTag.TYPE, var3));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ index 42ea3573c0e8559a264fd24fc09c3a5cd7628d9b..25589dcabeb9ba189c3eddd4d1032949
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int[] getIntArray(String key) {
|
public int[] getIntArray(String key) {
|
||||||
@@ -389,7 +390,7 @@ public class CompoundTag implements Tag {
|
@@ -391,7 +392,7 @@ public class CompoundTag implements Tag {
|
||||||
throw new ReportedException(this.createReport(key, IntArrayTag.TYPE, var3));
|
throw new ReportedException(this.createReport(key, IntArrayTag.TYPE, var3));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,7 +239,7 @@ index 42ea3573c0e8559a264fd24fc09c3a5cd7628d9b..25589dcabeb9ba189c3eddd4d1032949
|
|||||||
}
|
}
|
||||||
|
|
||||||
public long[] getLongArray(String key) {
|
public long[] getLongArray(String key) {
|
||||||
@@ -401,7 +402,7 @@ public class CompoundTag implements Tag {
|
@@ -403,7 +404,7 @@ public class CompoundTag implements Tag {
|
||||||
throw new ReportedException(this.createReport(key, LongArrayTag.TYPE, var3));
|
throw new ReportedException(this.createReport(key, LongArrayTag.TYPE, var3));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,10 +346,10 @@ index a2920b8a9eff77d9c5d1d7f70ad3abdacba8f0fa..43f402d9032e4570a81a80e412215598
|
|||||||
protected CipherBase(Cipher cipher) {
|
protected CipherBase(Cipher cipher) {
|
||||||
this.cipher = cipher;
|
this.cipher = cipher;
|
||||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||||
index 38c09c65dfa4a7a0c80d36f726c1fd028cbe05f8..b6a80edbbceb85932a5fa8b9488d44d41f5c5314 100644
|
index fa1d325034dafdb9f1da546a6f9c5e88d2b67749..63ca4753898bef485a0ea832e4c1f67f249b4d1d 100644
|
||||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||||
@@ -20,7 +20,6 @@ import io.netty.channel.epoll.EpollSocketChannel;
|
@@ -21,7 +21,6 @@ import io.netty.channel.epoll.EpollSocketChannel;
|
||||||
import io.netty.channel.local.LocalChannel;
|
import io.netty.channel.local.LocalChannel;
|
||||||
import io.netty.channel.local.LocalServerChannel;
|
import io.netty.channel.local.LocalServerChannel;
|
||||||
import io.netty.channel.nio.NioEventLoopGroup;
|
import io.netty.channel.nio.NioEventLoopGroup;
|
||||||
@@ -357,7 +357,7 @@ index 38c09c65dfa4a7a0c80d36f726c1fd028cbe05f8..b6a80edbbceb85932a5fa8b9488d44d4
|
|||||||
import io.netty.channel.socket.nio.NioSocketChannel;
|
import io.netty.channel.socket.nio.NioSocketChannel;
|
||||||
import io.netty.handler.timeout.ReadTimeoutHandler;
|
import io.netty.handler.timeout.ReadTimeoutHandler;
|
||||||
import io.netty.handler.timeout.TimeoutException;
|
import io.netty.handler.timeout.TimeoutException;
|
||||||
@@ -30,7 +29,8 @@ import java.net.SocketAddress;
|
@@ -31,7 +30,8 @@ import java.net.SocketAddress;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
import java.util.concurrent.RejectedExecutionException;
|
import java.util.concurrent.RejectedExecutionException;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
@@ -367,7 +367,7 @@ index 38c09c65dfa4a7a0c80d36f726c1fd028cbe05f8..b6a80edbbceb85932a5fa8b9488d44d4
|
|||||||
import net.minecraft.Util;
|
import net.minecraft.Util;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.network.chat.MutableComponent;
|
import net.minecraft.network.chat.MutableComponent;
|
||||||
@@ -312,7 +312,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -315,7 +315,7 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setListener(PacketListener listener) {
|
public void setListener(PacketListener listener) {
|
||||||
@@ -377,10 +377,10 @@ index 38c09c65dfa4a7a0c80d36f726c1fd028cbe05f8..b6a80edbbceb85932a5fa8b9488d44d4
|
|||||||
}
|
}
|
||||||
// Paper start
|
// Paper start
|
||||||
diff --git a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
diff --git a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||||
index 88f795681f8f37a90212f6c9613f06d37b07fd0a..d2eed57fc908b719ebf17f4659ec39aefc119003 100644
|
index 8a68baf6bd46b59cf57c94ffe5651d47a7cae99c..bd7fa1b2a6fed82ce66fe2b8e3498e4de7c650e0 100644
|
||||||
--- a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
--- a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||||
+++ b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
+++ b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
|
||||||
@@ -9,6 +9,8 @@ import java.util.function.Consumer;
|
@@ -10,6 +10,8 @@ import java.util.function.Consumer;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
@@ -389,20 +389,20 @@ index 88f795681f8f37a90212f6c9613f06d37b07fd0a..d2eed57fc908b719ebf17f4659ec39ae
|
|||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
import net.minecraft.locale.Language;
|
import net.minecraft.locale.Language;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
@@ -20,7 +22,7 @@ import net.minecraft.network.chat.Style;
|
@@ -21,7 +23,7 @@ import net.minecraft.network.chat.Style;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
|
|
||||||
public class TranslatableContents implements ComponentContents {
|
public class TranslatableContents implements ComponentContents {
|
||||||
- private static final Object[] NO_ARGS = new Object[0];
|
- public static final Object[] NO_ARGS = new Object[0];
|
||||||
+ private static final Object[] NO_ARGS = ArrayConstants.emptyObjectArray; // Gale - JettPack - reduce array allocations
|
+ public static final Object[] NO_ARGS = ArrayConstants.emptyObjectArray; // Gale - JettPack - reduce array allocations
|
||||||
private static final FormattedText TEXT_PERCENT = FormattedText.of("%");
|
private static final FormattedText TEXT_PERCENT = FormattedText.of("%");
|
||||||
private static final FormattedText TEXT_NULL = FormattedText.of("null");
|
private static final FormattedText TEXT_NULL = FormattedText.of("null");
|
||||||
private final String key;
|
private final String key;
|
||||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||||
index 31faf2d6492696f7d0c99a48edbc0d6f15db1209..0c4c62674b4c7e8e3921c7eb3ef726759ac75075 100644
|
index c6fa6bcd66d61359124a8426b919493c6ec43f06..b46e64bbfe4530917ff941292464acf71c7fab60 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Main.java
|
--- a/src/main/java/net/minecraft/server/Main.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||||
@@ -88,7 +88,7 @@ public class Main {
|
@@ -93,7 +93,7 @@ public class Main {
|
||||||
OptionSpec<Void> optionspec6 = optionparser.accepts("safeMode", "Loads level with vanilla datapack only");
|
OptionSpec<Void> optionspec6 = optionparser.accepts("safeMode", "Loads level with vanilla datapack only");
|
||||||
OptionSpec<Void> optionspec7 = optionparser.accepts("help").forHelp();
|
OptionSpec<Void> optionspec7 = optionparser.accepts("help").forHelp();
|
||||||
OptionSpec<String> optionspec8 = optionparser.accepts("singleplayer").withRequiredArg();
|
OptionSpec<String> optionspec8 = optionparser.accepts("singleplayer").withRequiredArg();
|
||||||
@@ -412,10 +412,10 @@ index 31faf2d6492696f7d0c99a48edbc0d6f15db1209..0c4c62674b4c7e8e3921c7eb3ef72675
|
|||||||
OptionSpec<Integer> optionspec11 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(-1, new Integer[0]);
|
OptionSpec<Integer> optionspec11 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(-1, new Integer[0]);
|
||||||
OptionSpec<String> optionspec12 = optionparser.accepts("serverId").withRequiredArg();
|
OptionSpec<String> optionspec12 = optionparser.accepts("serverId").withRequiredArg();
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index cdac47539c8989c21e6a5edf5f63f7f5c02b2f30..c485cec0e9f4e1d55b526c8f6d915a355538a475 100644
|
index 6d32eff11c0be994003624fc12b337c9102dfd57..b254955ffc40c4d0b9a2e242f988b5c1032ae4ab 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -49,6 +49,8 @@ import java.util.stream.Collectors;
|
@@ -50,6 +50,8 @@ import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
@@ -424,24 +424,11 @@ index cdac47539c8989c21e6a5edf5f63f7f5c02b2f30..c485cec0e9f4e1d55b526c8f6d915a35
|
|||||||
import net.minecraft.CrashReport;
|
import net.minecraft.CrashReport;
|
||||||
import net.minecraft.ReportedException;
|
import net.minecraft.ReportedException;
|
||||||
import net.minecraft.SharedConstants;
|
import net.minecraft.SharedConstants;
|
||||||
@@ -1327,8 +1329,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
||||||
try {
|
|
||||||
BufferedImage bufferedimage = ImageIO.read(file);
|
|
||||||
|
|
||||||
- Validate.validState(bufferedimage.getWidth() == 64, "Must be 64 pixels wide", new Object[0]);
|
|
||||||
- Validate.validState(bufferedimage.getHeight() == 64, "Must be 64 pixels high", new Object[0]);
|
|
||||||
+ // Gale start - JettPack - reduce array allocations
|
|
||||||
+ Validate.validState(bufferedimage.getWidth() == 64, "Must be 64 pixels wide", ArrayConstants.emptyObjectArray);
|
|
||||||
+ Validate.validState(bufferedimage.getHeight() == 64, "Must be 64 pixels high", ArrayConstants.emptyObjectArray);
|
|
||||||
+ // Gale end - JettPack - reduce array allocations
|
|
||||||
ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream();
|
|
||||||
|
|
||||||
ImageIO.write(bufferedimage, "PNG", bytearrayoutputstream);
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
index 590b756842f5f9d1c2f0aed6517f9b46e3dc74db..ce7f36f38165a58e3fab7a98bece75df2d0ec6ed 100644
|
index 48adbfbb8a55f6719c92a1fe83c64d87f1b236d5..834b497053f4fa20cf94c00e1ee2db4838bdf233 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
@@ -308,7 +308,7 @@ public class ServerEntity {
|
@@ -338,7 +338,7 @@ public class ServerEntity {
|
||||||
|
|
||||||
if (this.entity instanceof LivingEntity) {
|
if (this.entity instanceof LivingEntity) {
|
||||||
List<Pair<EquipmentSlot, ItemStack>> list = Lists.newArrayList();
|
List<Pair<EquipmentSlot, ItemStack>> list = Lists.newArrayList();
|
||||||
@@ -451,7 +438,7 @@ index 590b756842f5f9d1c2f0aed6517f9b46e3dc74db..ce7f36f38165a58e3fab7a98bece75df
|
|||||||
|
|
||||||
for (int j = 0; j < i; ++j) {
|
for (int j = 0; j < i; ++j) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 89aaa846d5cb1cfd8ccf634f85bdc4180013cfd0..f69ea29648b090334d98dd8f3ed71cf8f10427ac 100644
|
index 118dfc8c87dd8f4d43332dd57addb46ddf99cc0d..945d0b28b7f58998acf5ba26b4196f3ad2fa2b7a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -38,6 +38,8 @@ import java.util.stream.Collectors;
|
@@ -38,6 +38,8 @@ import java.util.stream.Collectors;
|
||||||
@@ -463,7 +450,7 @@ index 89aaa846d5cb1cfd8ccf634f85bdc4180013cfd0..f69ea29648b090334d98dd8f3ed71cf8
|
|||||||
import net.minecraft.CrashReport;
|
import net.minecraft.CrashReport;
|
||||||
import net.minecraft.Util;
|
import net.minecraft.Util;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
@@ -899,7 +901,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -896,7 +898,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
BlockPos blockposition2 = blockposition.set(j + randomX, randomY, k + randomZ);
|
BlockPos blockposition2 = blockposition.set(j + randomX, randomY, k + randomZ);
|
||||||
BlockState iblockdata = com.destroystokyo.paper.util.maplist.IBlockDataList.getBlockDataFromRaw(raw);
|
BlockState iblockdata = com.destroystokyo.paper.util.maplist.IBlockDataList.getBlockDataFromRaw(raw);
|
||||||
|
|
||||||
@@ -472,7 +459,7 @@ index 89aaa846d5cb1cfd8ccf634f85bdc4180013cfd0..f69ea29648b090334d98dd8f3ed71cf8
|
|||||||
// We drop the fluid tick since LAVA is ALREADY TICKED by the above method (See LiquidBlock).
|
// We drop the fluid tick since LAVA is ALREADY TICKED by the above method (See LiquidBlock).
|
||||||
// TODO CHECK ON UPDATE (ping the Canadian)
|
// TODO CHECK ON UPDATE (ping the Canadian)
|
||||||
}
|
}
|
||||||
@@ -1153,7 +1155,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1150,7 +1152,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
public static List<Entity> getCurrentlyTickingEntities() {
|
public static List<Entity> getCurrentlyTickingEntities() {
|
||||||
Entity ticking = currentlyTickingEntity.get();
|
Entity ticking = currentlyTickingEntity.get();
|
||||||
@@ -482,10 +469,10 @@ index 89aaa846d5cb1cfd8ccf634f85bdc4180013cfd0..f69ea29648b090334d98dd8f3ed71cf8
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 8d537d9822fd88ec92acf57cf76e903678a12301..c6ffef9960f82eed929400296de027e4e297b8e7 100644
|
index 671bdb4614e4dbc0604785ba22f5a2b5de14fe16..4982d6dbc62bd21fa49b62f3f22ba7e101b163a1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -28,6 +28,8 @@ import java.util.function.UnaryOperator;
|
@@ -29,6 +29,8 @@ import java.util.function.UnaryOperator;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
@@ -494,7 +481,7 @@ index 8d537d9822fd88ec92acf57cf76e903678a12301..c6ffef9960f82eed929400296de027e4
|
|||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.CrashReport;
|
import net.minecraft.CrashReport;
|
||||||
import net.minecraft.CrashReportCategory;
|
import net.minecraft.CrashReportCategory;
|
||||||
@@ -62,7 +64,6 @@ import net.minecraft.network.chat.SignedMessageBody;
|
@@ -63,7 +65,6 @@ import net.minecraft.network.chat.SignedMessageBody;
|
||||||
import net.minecraft.network.chat.SignedMessageChain;
|
import net.minecraft.network.chat.SignedMessageChain;
|
||||||
import net.minecraft.network.protocol.Packet;
|
import net.minecraft.network.protocol.Packet;
|
||||||
import net.minecraft.network.protocol.PacketUtils;
|
import net.minecraft.network.protocol.PacketUtils;
|
||||||
@@ -502,7 +489,7 @@ index 8d537d9822fd88ec92acf57cf76e903678a12301..c6ffef9960f82eed929400296de027e4
|
|||||||
import net.minecraft.network.protocol.game.ClientboundBlockChangedAckPacket;
|
import net.minecraft.network.protocol.game.ClientboundBlockChangedAckPacket;
|
||||||
import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
|
import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
|
||||||
import net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket;
|
import net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket;
|
||||||
@@ -173,7 +174,6 @@ import net.minecraft.world.level.block.entity.CommandBlockEntity;
|
@@ -175,7 +176,6 @@ import net.minecraft.world.level.block.entity.CommandBlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.JigsawBlockEntity;
|
import net.minecraft.world.level.block.entity.JigsawBlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.SignBlockEntity;
|
import net.minecraft.world.level.block.entity.SignBlockEntity;
|
||||||
import net.minecraft.world.level.block.entity.StructureBlockEntity;
|
import net.minecraft.world.level.block.entity.StructureBlockEntity;
|
||||||
@@ -510,7 +497,7 @@ index 8d537d9822fd88ec92acf57cf76e903678a12301..c6ffef9960f82eed929400296de027e4
|
|||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
import net.minecraft.world.phys.BlockHitResult;
|
import net.minecraft.world.phys.BlockHitResult;
|
||||||
@@ -225,8 +225,6 @@ import org.bukkit.event.inventory.InventoryCreativeEvent;
|
@@ -227,8 +227,6 @@ import org.bukkit.event.inventory.InventoryCreativeEvent;
|
||||||
import org.bukkit.event.inventory.InventoryType.SlotType;
|
import org.bukkit.event.inventory.InventoryType.SlotType;
|
||||||
import org.bukkit.event.inventory.SmithItemEvent;
|
import org.bukkit.event.inventory.SmithItemEvent;
|
||||||
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||||
@@ -519,7 +506,7 @@ index 8d537d9822fd88ec92acf57cf76e903678a12301..c6ffef9960f82eed929400296de027e4
|
|||||||
import org.bukkit.event.player.PlayerChatEvent;
|
import org.bukkit.event.player.PlayerChatEvent;
|
||||||
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||||
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||||
@@ -401,7 +399,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -403,7 +401,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
if (this.keepAlivePending) {
|
if (this.keepAlivePending) {
|
||||||
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
||||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info
|
||||||
@@ -528,7 +515,7 @@ index 8d537d9822fd88ec92acf57cf76e903678a12301..c6ffef9960f82eed929400296de027e4
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (elapsedTime >= 15000L) { // 15 seconds
|
if (elapsedTime >= 15000L) { // 15 seconds
|
||||||
@@ -865,13 +863,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -867,13 +865,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
|
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
|
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
|
||||||
@@ -544,7 +531,7 @@ index 8d537d9822fd88ec92acf57cf76e903678a12301..c6ffef9960f82eed929400296de027e4
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -3270,7 +3268,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3284,7 +3282,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
// Paper start
|
// Paper start
|
||||||
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||||
if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
||||||
@@ -554,7 +541,7 @@ index 8d537d9822fd88ec92acf57cf76e903678a12301..c6ffef9960f82eed929400296de027e4
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
index a25306fe8a35bb70a490e6a0c01d0340bbc0d781..be73149535c5fd8914db99bb835f4cbb731b63be 100644
|
index 2ff578e4a953ffcf5176815ba8e3f06f73499989..a436ef49325c9cae1008d5763373cce8c6680e5f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||||
@@ -12,8 +12,9 @@ import java.security.PrivateKey;
|
@@ -12,8 +12,9 @@ import java.security.PrivateKey;
|
||||||
@@ -591,7 +578,7 @@ index a25306fe8a35bb70a490e6a0c01d0340bbc0d781..be73149535c5fd8914db99bb835f4cbb
|
|||||||
final String s;
|
final String s;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index f86c3b75b4b5f2d159d91c61e77dfcc3d60a8311..91d009a0e48e68711f51aaf65d4c52c291f8b4b2 100644
|
index 9fed88164c5e3173e206e145ffbafa16e349d674..15d3de14463a6b541bb408412476e6cb1ce662f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -27,6 +27,8 @@ import java.util.UUID;
|
@@ -27,6 +27,8 @@ import java.util.UUID;
|
||||||
@@ -603,7 +590,7 @@ index f86c3b75b4b5f2d159d91c61e77dfcc3d60a8311..91d009a0e48e68711f51aaf65d4c52c2
|
|||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.FileUtil;
|
import net.minecraft.FileUtil;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
@@ -118,7 +120,6 @@ import org.bukkit.Location;
|
@@ -119,7 +121,6 @@ import org.bukkit.Location;
|
||||||
import org.bukkit.craftbukkit.CraftServer;
|
import org.bukkit.craftbukkit.CraftServer;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.entity.CraftPlayer;
|
||||||
@@ -611,7 +598,7 @@ index f86c3b75b4b5f2d159d91c61e77dfcc3d60a8311..91d009a0e48e68711f51aaf65d4c52c2
|
|||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
import org.bukkit.event.player.PlayerChangedWorldEvent;
|
||||||
import org.bukkit.event.player.PlayerJoinEvent;
|
import org.bukkit.event.player.PlayerJoinEvent;
|
||||||
@@ -687,7 +688,7 @@ public abstract class PlayerList {
|
@@ -694,7 +695,7 @@ public abstract class PlayerList {
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
entityplayer = (ServerPlayer) iterator.next();
|
entityplayer = (ServerPlayer) iterator.next();
|
||||||
this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
|
this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
|
||||||
@@ -700,10 +687,10 @@ index 97ff19efa0b3943ccb7a6e02cba6ed2fea61adac..b2ae2bd8bd4ff3cb6457e8c08172e348
|
|||||||
private EquipmentSlot(EquipmentSlot.Type type, int entityId, int armorStandId, String name) {
|
private EquipmentSlot(EquipmentSlot.Type type, int entityId, int armorStandId, String name) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 6b1fb422d68f3b83fef66a8af997b2140f1d0897..8ea5861bc9ae59c15ee6db042c769046f74abeed 100644
|
index 5629a2f7f0806475b5cc661894f5a915a08d9f15..2cd662c58b0a44045b680b73f478e9d9c36f1703 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3102,7 +3102,7 @@ public abstract class LivingEntity extends Entity {
|
@@ -3068,7 +3068,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
@Nullable
|
@Nullable
|
||||||
private Map<EquipmentSlot, ItemStack> collectEquipmentChanges() {
|
private Map<EquipmentSlot, ItemStack> collectEquipmentChanges() {
|
||||||
Map<EquipmentSlot, ItemStack> map = null;
|
Map<EquipmentSlot, ItemStack> map = null;
|
||||||
@@ -713,10 +700,10 @@ index 6b1fb422d68f3b83fef66a8af997b2140f1d0897..8ea5861bc9ae59c15ee6db042c769046
|
|||||||
|
|
||||||
for (int j = 0; j < i; ++j) {
|
for (int j = 0; j < i; ++j) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index c61b13268166f1f9f4a6f39391c3458410e62edc..2e98c0ad3776ec4bf71e686e856a8c445ee95b9b 100644
|
index a19956dbbb43f64043381bd968af74550b8a359a..728ecec837e9d9051bcf3533d63d5f179d34c81c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -1015,7 +1015,7 @@ public abstract class Mob extends LivingEntity {
|
@@ -1044,7 +1044,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
@Override
|
@Override
|
||||||
protected void dropCustomDeathLoot(DamageSource source, int lootingMultiplier, boolean allowDrops) {
|
protected void dropCustomDeathLoot(DamageSource source, int lootingMultiplier, boolean allowDrops) {
|
||||||
super.dropCustomDeathLoot(source, lootingMultiplier, allowDrops);
|
super.dropCustomDeathLoot(source, lootingMultiplier, allowDrops);
|
||||||
@@ -725,7 +712,7 @@ index c61b13268166f1f9f4a6f39391c3458410e62edc..2e98c0ad3776ec4bf71e686e856a8c44
|
|||||||
int j = aenumitemslot.length;
|
int j = aenumitemslot.length;
|
||||||
|
|
||||||
for (int k = 0; k < j; ++k) {
|
for (int k = 0; k < j; ++k) {
|
||||||
@@ -1077,7 +1077,7 @@ public abstract class Mob extends LivingEntity {
|
@@ -1106,7 +1106,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
@@ -734,7 +721,7 @@ index c61b13268166f1f9f4a6f39391c3458410e62edc..2e98c0ad3776ec4bf71e686e856a8c44
|
|||||||
int j = aenumitemslot.length;
|
int j = aenumitemslot.length;
|
||||||
|
|
||||||
for (int k = 0; k < j; ++k) {
|
for (int k = 0; k < j; ++k) {
|
||||||
@@ -1164,7 +1164,7 @@ public abstract class Mob extends LivingEntity {
|
@@ -1193,7 +1193,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
float f = localDifficulty.getSpecialMultiplier();
|
float f = localDifficulty.getSpecialMultiplier();
|
||||||
|
|
||||||
this.enchantSpawnedWeapon(random, f);
|
this.enchantSpawnedWeapon(random, f);
|
||||||
@@ -743,7 +730,7 @@ index c61b13268166f1f9f4a6f39391c3458410e62edc..2e98c0ad3776ec4bf71e686e856a8c44
|
|||||||
int i = aenumitemslot.length;
|
int i = aenumitemslot.length;
|
||||||
|
|
||||||
for (int j = 0; j < i; ++j) {
|
for (int j = 0; j < i; ++j) {
|
||||||
@@ -1381,7 +1381,7 @@ public abstract class Mob extends LivingEntity {
|
@@ -1412,7 +1412,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
t0.setInvulnerable(this.isInvulnerable());
|
t0.setInvulnerable(this.isInvulnerable());
|
||||||
if (flag) {
|
if (flag) {
|
||||||
t0.setCanPickUpLoot(this.canPickUpLoot());
|
t0.setCanPickUpLoot(this.canPickUpLoot());
|
||||||
@@ -766,10 +753,10 @@ index 71a36cf9b976443cca9ab63cd0eb23253f638562..201b0e1b25d0773bbcf9c1ed69fd888a
|
|||||||
|
|
||||||
for (int j = 0; j < i; ++j) {
|
for (int j = 0; j < i; ++j) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index 31eed67d07097c7eb1b06547a9f556bcc709d96c..561e0b938cbd52e4f4bacb2c903465efd8c0eadf 100644
|
index a6253272205337b3b855679b3057c2519a807a4c..8155a806ccb200b8883ce6734c5b7e34338060ee 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -977,7 +977,7 @@ public final class ItemStack {
|
@@ -1000,7 +1000,7 @@ public final class ItemStack {
|
||||||
int k;
|
int k;
|
||||||
|
|
||||||
if (ItemStack.shouldShowInTooltip(i, ItemStack.TooltipPart.MODIFIERS)) {
|
if (ItemStack.shouldShowInTooltip(i, ItemStack.TooltipPart.MODIFIERS)) {
|
||||||
@@ -779,7 +766,7 @@ index 31eed67d07097c7eb1b06547a9f556bcc709d96c..561e0b938cbd52e4f4bacb2c903465ef
|
|||||||
k = aenumitemslot.length;
|
k = aenumitemslot.length;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java
|
diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java
|
||||||
index ecc70d770e794e0ef27ef365f5a32555c2b06544..2fbe8ffd9fbf12549adecea7d4a0efdb5efd8f1e 100644
|
index 117a376f99b1d26c5ffa64c8551ac1e666b15888..e67124e18aec0ac0bd1f21faa73a6259fd33e40c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java
|
--- a/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java
|
+++ b/src/main/java/net/minecraft/world/item/crafting/ShapedRecipe.java
|
||||||
@@ -12,6 +12,8 @@ import java.util.Iterator;
|
@@ -12,6 +12,8 @@ import java.util.Iterator;
|
||||||
@@ -789,9 +776,9 @@ index ecc70d770e794e0ef27ef365f5a32555c2b06544..2fbe8ffd9fbf12549adecea7d4a0efdb
|
|||||||
+
|
+
|
||||||
+import me.titaniumtown.ArrayConstants;
|
+import me.titaniumtown.ArrayConstants;
|
||||||
import net.minecraft.core.NonNullList;
|
import net.minecraft.core.NonNullList;
|
||||||
|
import net.minecraft.core.RegistryAccess;
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.network.FriendlyByteBuf;
|
@@ -262,7 +264,7 @@ public class ShapedRecipe implements CraftingRecipe {
|
||||||
@@ -250,7 +252,7 @@ public class ShapedRecipe implements CraftingRecipe {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pattern.length == l) {
|
if (pattern.length == l) {
|
||||||
@@ -818,7 +805,7 @@ index 2bfbdaeb2b0d99dfd956cd5936403fe8b0eeae64..84f1c4c3ded4f201899f3c74e639349b
|
|||||||
public Enchantments() {}
|
public Enchantments() {}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
index 95d8883fabc6a7ea6f9e6dfcff9e2f2fce917dfe..0ab14271e6efebe49ed9fec904e47566691b9f40 100644
|
index d4527b0f11893925c93b1846305fb3b17ba8e89a..b19e842be160748a6969e498952eb02ffece2ecc 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||||
@@ -12,6 +12,8 @@ import java.util.function.Consumer;
|
@@ -12,6 +12,8 @@ import java.util.function.Consumer;
|
||||||
@@ -830,7 +817,7 @@ index 95d8883fabc6a7ea6f9e6dfcff9e2f2fce917dfe..0ab14271e6efebe49ed9fec904e47566
|
|||||||
import net.minecraft.CrashReport;
|
import net.minecraft.CrashReport;
|
||||||
import net.minecraft.CrashReportCategory;
|
import net.minecraft.CrashReportCategory;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
@@ -1568,7 +1570,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
@@ -1581,7 +1583,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||||
public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) {
|
public org.bukkit.entity.Entity[] getChunkEntities(int chunkX, int chunkZ) {
|
||||||
io.papermc.paper.world.ChunkEntitySlices slices = ((ServerLevel)this).getEntityLookup().getChunk(chunkX, chunkZ);
|
io.papermc.paper.world.ChunkEntitySlices slices = ((ServerLevel)this).getEntityLookup().getChunk(chunkX, chunkZ);
|
||||||
if (slices == null) {
|
if (slices == null) {
|
||||||
@@ -840,7 +827,7 @@ index 95d8883fabc6a7ea6f9e6dfcff9e2f2fce917dfe..0ab14271e6efebe49ed9fec904e47566
|
|||||||
return slices.getChunkEntities();
|
return slices.getChunkEntities();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||||
index 564822911c25238900b361d564c5db3103900fb3..ad6cd860d5d2accbfdf52ee24ffa52bff2045b74 100644
|
index ae90e86327957bb784e2d81694ee7eea288bb455..d36f554e545686487e2c5198ddb5ad1a1b61af13 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
+++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java
|
||||||
@@ -3,6 +3,8 @@ package net.minecraft.world.level.block;
|
@@ -3,6 +3,8 @@ package net.minecraft.world.level.block;
|
||||||
@@ -852,7 +839,7 @@ index 564822911c25238900b361d564c5db3103900fb3..ad6cd860d5d2accbfdf52ee24ffa52bf
|
|||||||
import net.minecraft.Util;
|
import net.minecraft.Util;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
@@ -383,7 +385,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
@@ -413,7 +415,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSlotsForFace(Direction side) {
|
public int[] getSlotsForFace(Direction side) {
|
||||||
@@ -861,7 +848,7 @@ index 564822911c25238900b361d564c5db3103900fb3..ad6cd860d5d2accbfdf52ee24ffa52bf
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -432,7 +434,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
@@ -462,7 +464,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSlotsForFace(Direction side) {
|
public int[] getSlotsForFace(Direction side) {
|
||||||
@@ -870,7 +857,7 @@ index 564822911c25238900b361d564c5db3103900fb3..ad6cd860d5d2accbfdf52ee24ffa52bf
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -469,7 +471,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
@@ -504,7 +506,7 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getSlotsForFace(Direction side) {
|
public int[] getSlotsForFace(Direction side) {
|
||||||
@@ -880,7 +867,7 @@ index 564822911c25238900b361d564c5db3103900fb3..ad6cd860d5d2accbfdf52ee24ffa52bf
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||||
index cac2768fe520b591990c7bc943ae7e95f49efb31..07ef81d3d1359d10f0d2f207e671c010695f6119 100644
|
index 2a786c9fd29dc2139cf487fa645cd43345d60167..ea427d38452dddcd1ab67b469955428915ac43cb 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||||
@@ -9,6 +9,8 @@ import java.util.Iterator;
|
@@ -9,6 +9,8 @@ import java.util.Iterator;
|
||||||
@@ -892,7 +879,7 @@ index cac2768fe520b591990c7bc943ae7e95f49efb31..07ef81d3d1359d10f0d2f207e671c010
|
|||||||
import net.minecraft.SharedConstants;
|
import net.minecraft.SharedConstants;
|
||||||
import net.minecraft.Util;
|
import net.minecraft.Util;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
@@ -64,7 +66,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
@@ -65,7 +67,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||||
protected static final int SLOT_FUEL = 1;
|
protected static final int SLOT_FUEL = 1;
|
||||||
protected static final int SLOT_RESULT = 2;
|
protected static final int SLOT_RESULT = 2;
|
||||||
public static final int DATA_LIT_TIME = 0;
|
public static final int DATA_LIT_TIME = 0;
|
||||||
@@ -902,7 +889,7 @@ index cac2768fe520b591990c7bc943ae7e95f49efb31..07ef81d3d1359d10f0d2f207e671c010
|
|||||||
private static final int[] SLOTS_FOR_SIDES = new int[]{1};
|
private static final int[] SLOTS_FOR_SIDES = new int[]{1};
|
||||||
public static final int DATA_LIT_DURATION = 1;
|
public static final int DATA_LIT_DURATION = 1;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
diff --git a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||||
index 601f8099f74e81c17600566b3c9b7a6dd39c9bcb..c407ca57541763054d42ebaada10e9d14a61fd45 100644
|
index 36af81f0957d17e170d229059c66f4eb4539dfeb..ddf11cf359bf621e88c93fc43739af424faf65e3 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
--- a/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
+++ b/src/main/java/net/minecraft/world/level/storage/PlayerDataStorage.java
|
||||||
@@ -4,12 +4,12 @@ import com.mojang.datafixers.DataFixer;
|
@@ -4,12 +4,12 @@ import com.mojang.datafixers.DataFixer;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ As part of: JettPack (https://gitlab.com/Titaniumtown/JettPack)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index cd705a59d63eaaf090c63f5c3d088db3cb1afa16..73824358e299c39fe7ea2d07d90ec1e25bb29f2f 100644
|
index bd16880ba0efc2f3232431ac0a8df3c49915bafb..25f3cf277c0a23fd885d9920e0fd9d4b5f522b84 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -290,7 +290,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -290,7 +290,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@@ -25,12 +25,12 @@ index cd705a59d63eaaf090c63f5c3d088db3cb1afa16..73824358e299c39fe7ea2d07d90ec1e2
|
|||||||
public BlockPos blockPosition; // Gale - Pufferfish - optimize entity coordinate key - private -> public
|
public BlockPos blockPosition; // Gale - Pufferfish - optimize entity coordinate key - private -> public
|
||||||
private ChunkPos chunkPosition;
|
private ChunkPos chunkPosition;
|
||||||
private Vec3 deltaMovement;
|
private Vec3 deltaMovement;
|
||||||
@@ -1867,9 +1867,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1872,9 +1872,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
/** @deprecated */
|
/** @deprecated */
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public float getLightLevelDependentMagicValue() {
|
public float getLightLevelDependentMagicValue() {
|
||||||
- return this.level.hasChunkAt(this.getBlockX(), this.getBlockZ()) ? this.level.getLightLevelDependentMagicValue(new BlockPos(this.getX(), this.getEyeY(), this.getZ())) : 0.0F;
|
- return this.level.hasChunkAt(this.getBlockX(), this.getBlockZ()) ? this.level.getLightLevelDependentMagicValue(BlockPos.containing(this.getX(), this.getEyeY(), this.getZ())) : 0.0F;
|
||||||
+ return this.level.getLightLevelDependentMagicValue(new BlockPos(this.getX(), this.getEyeY(), this.getZ())); // Gale - JettPack - optimize sun burn tick - allow passing BlockPos to getLightLevelDependentMagicValue
|
+ return this.level.getLightLevelDependentMagicValue(BlockPos.containing(this.getX(), this.getEyeY(), this.getZ())); // Gale - JettPack - optimize sun burn tick - allow passing BlockPos to getLightLevelDependentMagicValue
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Gale start - JettPack - optimize sun burn tick - allow passing BlockPos to getLightLevelDependentMagicValue
|
+ // Gale start - JettPack - optimize sun burn tick - allow passing BlockPos to getLightLevelDependentMagicValue
|
||||||
@@ -45,10 +45,10 @@ index cd705a59d63eaaf090c63f5c3d088db3cb1afa16..73824358e299c39fe7ea2d07d90ec1e2
|
|||||||
this.absMoveTo(x, y, z);
|
this.absMoveTo(x, y, z);
|
||||||
this.setYRot(yaw % 360.0F);
|
this.setYRot(yaw % 360.0F);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
index 2e98c0ad3776ec4bf71e686e856a8c445ee95b9b..27fc50571305132c86497fcb1d5b1bb514610a4e 100644
|
index 728ecec837e9d9051bcf3533d63d5f179d34c81c..f2eca869a9301c8e6536396f55fd5dc871a3dfbc 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||||
@@ -1643,13 +1643,29 @@ public abstract class Mob extends LivingEntity {
|
@@ -1669,13 +1669,29 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,11 +60,11 @@ index 2e98c0ad3776ec4bf71e686e856a8c445ee95b9b..27fc50571305132c86497fcb1d5b1bb5
|
|||||||
public boolean isSunBurnTick() {
|
public boolean isSunBurnTick() {
|
||||||
if (this.level.isDay() && !this.level.isClientSide) {
|
if (this.level.isDay() && !this.level.isClientSide) {
|
||||||
- float f = this.getLightLevelDependentMagicValue();
|
- float f = this.getLightLevelDependentMagicValue();
|
||||||
- BlockPos blockposition = new BlockPos(this.getX(), this.getEyeY(), this.getZ());
|
- BlockPos blockposition = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
||||||
+ // Gale start - JettPack - optimize sun burn tick - optimizations and cache eye blockpos
|
+ // Gale start - JettPack - optimize sun burn tick - optimizations and cache eye blockpos
|
||||||
+ int positionHashCode = this.position.hashCode();
|
+ int positionHashCode = this.position.hashCode();
|
||||||
+ if (this.cached_position_hashcode != positionHashCode) {
|
+ if (this.cached_position_hashcode != positionHashCode) {
|
||||||
+ this.cached_eye_blockpos = new BlockPos(this.getX(), this.getEyeY(), this.getZ());
|
+ this.cached_eye_blockpos = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
||||||
+ this.cached_position_hashcode = positionHashCode;
|
+ this.cached_position_hashcode = positionHashCode;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
|||||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
diff --git a/src/main/java/net/minecraft/world/level/GameRules.java b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
index 19bdb2c717718f074ab2b4c5fb934ea29dd80c53..1af9fbd3f131caef18990cc8c2d3a2568207cd7a 100644
|
index 6a21a12694d7c9277e1661dfcd1fd143fd5ebcfb..7a69bf2e642077fef2cbf95ba7ddedfaff442c5a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
--- a/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
+++ b/src/main/java/net/minecraft/world/level/GameRules.java
|
||||||
@@ -19,6 +19,8 @@ import java.util.function.BiConsumer;
|
@@ -19,6 +19,8 @@ import java.util.function.BiConsumer;
|
||||||
@@ -25,7 +25,7 @@ index 19bdb2c717718f074ab2b4c5fb934ea29dd80c53..1af9fbd3f131caef18990cc8c2d3a256
|
|||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
import net.minecraft.commands.Commands;
|
import net.minecraft.commands.Commands;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
@@ -125,7 +127,7 @@ public class GameRules {
|
@@ -127,7 +129,7 @@ public class GameRules {
|
||||||
}
|
}
|
||||||
|
|
||||||
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules) {
|
private GameRules(Map<GameRules.Key<?>, GameRules.Value<?>> rules) {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRA
|
|||||||
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
index e7ff7ad3bf4dd17fdd34202ec3aef8e9512bc36d..8e68d1373a519cc12bf83de6aadcb24cbbd34af6 100644
|
index 8f52acc03943b18f87b3b2581066496a254b1156..f3bbfb472b9be083dd1f1a317b90dda5c3c4f851 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||||
@@ -1,10 +1,11 @@
|
@@ -1,10 +1,11 @@
|
||||||
@@ -49,7 +49,7 @@ index e7ff7ad3bf4dd17fdd34202ec3aef8e9512bc36d..8e68d1373a519cc12bf83de6aadcb24c
|
|||||||
import net.minecraft.network.protocol.handshake.ClientIntentionPacket;
|
import net.minecraft.network.protocol.handshake.ClientIntentionPacket;
|
||||||
import net.minecraft.network.protocol.handshake.ServerHandshakePacketListener;
|
import net.minecraft.network.protocol.handshake.ServerHandshakePacketListener;
|
||||||
import net.minecraft.network.protocol.login.ClientboundLoginDisconnectPacket;
|
import net.minecraft.network.protocol.login.ClientboundLoginDisconnectPacket;
|
||||||
@@ -12,7 +13,8 @@ import net.minecraft.server.MinecraftServer;
|
@@ -13,7 +14,8 @@ import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@@ -59,7 +59,7 @@ index e7ff7ad3bf4dd17fdd34202ec3aef8e9512bc36d..8e68d1373a519cc12bf83de6aadcb24c
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketListener {
|
public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketListener {
|
||||||
@@ -23,7 +25,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@@ -24,7 +26,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
static final java.util.regex.Pattern PROP_PATTERN = java.util.regex.Pattern.compile("\\w{0,16}");
|
static final java.util.regex.Pattern PROP_PATTERN = java.util.regex.Pattern.compile("\\w{0,16}");
|
||||||
// Spigot end
|
// Spigot end
|
||||||
// CraftBukkit start - add fields
|
// CraftBukkit start - add fields
|
||||||
@@ -68,7 +68,7 @@ index e7ff7ad3bf4dd17fdd34202ec3aef8e9512bc36d..8e68d1373a519cc12bf83de6aadcb24c
|
|||||||
private static int throttleCounter = 0;
|
private static int throttleCounter = 0;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
private static final Component IGNORE_STATUS_REASON = Component.literal("Ignoring status request");
|
private static final Component IGNORE_STATUS_REASON = Component.literal("Ignoring status request");
|
||||||
@@ -50,7 +52,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@@ -51,7 +53,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
InetAddress address = ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getAddress();
|
InetAddress address = ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getAddress();
|
||||||
|
|
||||||
synchronized (ServerHandshakePacketListenerImpl.throttleTracker) {
|
synchronized (ServerHandshakePacketListenerImpl.throttleTracker) {
|
||||||
@@ -77,7 +77,7 @@ index e7ff7ad3bf4dd17fdd34202ec3aef8e9512bc36d..8e68d1373a519cc12bf83de6aadcb24c
|
|||||||
ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime);
|
ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime);
|
||||||
Component chatmessage = io.papermc.paper.adventure.PaperAdventure.asVanilla(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.connectionThrottle); // Paper - Configurable connection throttle kick message
|
Component chatmessage = io.papermc.paper.adventure.PaperAdventure.asVanilla(io.papermc.paper.configuration.GlobalConfiguration.get().messages.kick.connectionThrottle); // Paper - Configurable connection throttle kick message
|
||||||
this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
|
this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
|
||||||
@@ -64,13 +66,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@@ -65,13 +67,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
||||||
ServerHandshakePacketListenerImpl.throttleCounter = 0;
|
ServerHandshakePacketListenerImpl.throttleCounter = 0;
|
||||||
|
|
||||||
// Cleanup stale entries
|
// Cleanup stale entries
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
|||||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
index 0a3fff9fc22f76dcef9f108bceea4da39145745c..39981cd0003eb7ee416d887ffec70fb049599320 100644
|
index 7d6fab994d1308cb83057cecfe3d837f5063a5b1..52743a5865997506b5a53fdfd99cdbab67ae3d3f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
--- a/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
+++ b/src/main/java/net/minecraft/world/level/block/Block.java
|
||||||
@@ -609,11 +609,18 @@ public class Block extends BlockBehaviour implements ItemLike {
|
@@ -605,11 +605,18 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||||
private final BlockState first;
|
private final BlockState first;
|
||||||
private final BlockState second;
|
private final BlockState second;
|
||||||
private final Direction direction;
|
private final Direction direction;
|
||||||
@@ -35,7 +35,7 @@ index 0a3fff9fc22f76dcef9f108bceea4da39145745c..39981cd0003eb7ee416d887ffec70fb0
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean equals(Object object) {
|
public boolean equals(Object object) {
|
||||||
@@ -629,11 +636,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
@@ -625,11 +632,7 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: Lithium (https://github.com/CaffeineMC/lithium-fabric)
|
|||||||
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
Licensed under: LGPL-3.0 (https://www.gnu.org/licenses/lgpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 8ea5861bc9ae59c15ee6db042c769046f74abeed..25829f5b2675e1eafef5f5a0e40db8a4bbc80ba4 100644
|
index 2cd662c58b0a44045b680b73f478e9d9c36f1703..423f3f073e63be06e37af46f5497ba20f3f10664 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -571,11 +571,10 @@ public abstract class LivingEntity extends Entity {
|
@@ -566,11 +566,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void tryAddFrost() {
|
protected void tryAddFrost() {
|
||||||
@@ -29,7 +29,7 @@ index 8ea5861bc9ae59c15ee6db042c769046f74abeed..25829f5b2675e1eafef5f5a0e40db8a4
|
|||||||
|
|
||||||
if (attributemodifiable == null) {
|
if (attributemodifiable == null) {
|
||||||
return;
|
return;
|
||||||
@@ -585,7 +584,6 @@ public abstract class LivingEntity extends Entity {
|
@@ -580,7 +579,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
attributemodifiable.addTransientModifier(new AttributeModifier(LivingEntity.SPEED_MODIFIER_POWDER_SNOW_UUID, "Powder snow slow", (double) f, AttributeModifier.Operation.ADDITION));
|
attributemodifiable.addTransientModifier(new AttributeModifier(LivingEntity.SPEED_MODIFIER_POWDER_SNOW_UUID, "Powder snow slow", (double) f, AttributeModifier.Operation.ADDITION));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ index acae3eb30e0689048937f479dc3070f0688abdad..4b79f0474a9013dd4fdb68c6363ca194
|
|||||||
int onResize(int newBits, T object);
|
int onResize(int newBits, T object);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
index 3c7ef1e8e338a84eee34f39ce73e64876632ea87..5eee4afb7bac7937155c979759bbc991f92c61fd 100644
|
index 7c770d131d39da6900fdd22df36707d5f43e8cd0..a5e8c6b99952e2d17831a9622c6f8e457e85cd35 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/PalettedContainer.java
|
||||||
@@ -22,8 +22,25 @@ import net.minecraft.util.Mth;
|
@@ -22,8 +22,25 @@ import net.minecraft.util.Mth;
|
||||||
@@ -349,7 +349,7 @@ index 3c7ef1e8e338a84eee34f39ce73e64876632ea87..5eee4afb7bac7937155c979759bbc991
|
|||||||
private static final int MIN_PALETTE_BITS = 0;
|
private static final int MIN_PALETTE_BITS = 0;
|
||||||
private final PaletteResize<T> dummyPaletteResize = (newSize, added) -> {
|
private final PaletteResize<T> dummyPaletteResize = (newSize, added) -> {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -299,30 +316,54 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
@@ -303,30 +320,54 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||||
public synchronized PalettedContainerRO.PackedData<T> pack(IdMap<T> idList, PalettedContainer.Strategy paletteProvider) { // Paper - synchronize
|
public synchronized PalettedContainerRO.PackedData<T> pack(IdMap<T> idList, PalettedContainer.Strategy paletteProvider) { // Paper - synchronize
|
||||||
this.acquire();
|
this.acquire();
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@ index 3c7ef1e8e338a84eee34f39ce73e64876632ea87..5eee4afb7bac7937155c979759bbc991
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static <T> void swapPalette(int[] is, IntUnaryOperator applier) {
|
private static <T> void swapPalette(int[] is, IntUnaryOperator applier) {
|
||||||
@@ -362,17 +403,37 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
@@ -366,17 +407,37 @@ public class PalettedContainer<T> implements PaletteResize<T>, PalettedContainer
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void count(PalettedContainer.CountConsumer<T> counter) {
|
public void count(PalettedContainer.CountConsumer<T> counter) {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java
|
diff --git a/src/main/java/net/minecraft/world/Container.java b/src/main/java/net/minecraft/world/Container.java
|
||||||
index f5bed0f18b2a3dbe7d52c1b83717298fa5acf561..5f5347ea42ea589ef3d5da88b88cc45a810e9426 100644
|
index 0d22bce549c46d686ab3402a1cad87307d0e1c00..35d7737b195b3207e45a670636aed977d5d6c4a6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/Container.java
|
--- a/src/main/java/net/minecraft/world/Container.java
|
||||||
+++ b/src/main/java/net/minecraft/world/Container.java
|
+++ b/src/main/java/net/minecraft/world/Container.java
|
||||||
@@ -118,6 +118,20 @@ public interface Container extends Clearable {
|
@@ -126,6 +126,20 @@ public interface Container extends Clearable {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,7 +212,7 @@ index 75dc06a3041bfdfb08c914eb50cfa282ae9eb2fe..53b0519bbc5d52490040eaf0fe449648
|
|||||||
} else {
|
} else {
|
||||||
brain.eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
|
brain.eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
index a4029cd16d964cd3a58f9f6e8471fbdf07de578b..825cdb927925a35a53e399ee647ea0738e67a5c9 100644
|
index cf865df0763ebbe9ebbe74f32b0863e2636de63f..583f8bbb242305bf1bf825e254209108fd323ad4 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||||
@@ -88,6 +88,7 @@ import net.minecraft.world.item.trading.MerchantOffers;
|
@@ -88,6 +88,7 @@ import net.minecraft.world.item.trading.MerchantOffers;
|
||||||
@@ -234,7 +234,7 @@ index a4029cd16d964cd3a58f9f6e8471fbdf07de578b..825cdb927925a35a53e399ee647ea073
|
|||||||
private static final int MAX_GOSSIP_TOPICS = 10;
|
private static final int MAX_GOSSIP_TOPICS = 10;
|
||||||
private static final int GOSSIP_COOLDOWN = 1200;
|
private static final int GOSSIP_COOLDOWN = 1200;
|
||||||
private static final int GOSSIP_DECAY_INTERVAL = 24000;
|
private static final int GOSSIP_DECAY_INTERVAL = 24000;
|
||||||
@@ -896,7 +898,28 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
@@ -908,7 +910,28 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||||
public boolean wantsToPickUp(ItemStack stack) {
|
public boolean wantsToPickUp(ItemStack stack) {
|
||||||
Item item = stack.getItem();
|
Item item = stack.getItem();
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 73824358e299c39fe7ea2d07d90ec1e25bb29f2f..7766e57fe4e15adb7b6b80bf9a5fd763ce1282c2 100644
|
index 25f3cf277c0a23fd885d9920e0fd9d4b5f522b84..46fc1afdba3dc550bacbec4f5da5081d8eb0051f 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -299,6 +299,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -299,6 +299,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
@@ -24,7 +24,7 @@ index 73824358e299c39fe7ea2d07d90ec1e25bb29f2f..7766e57fe4e15adb7b6b80bf9a5fd763
|
|||||||
public boolean onGround;
|
public boolean onGround;
|
||||||
public boolean horizontalCollision;
|
public boolean horizontalCollision;
|
||||||
public boolean verticalCollision;
|
public boolean verticalCollision;
|
||||||
@@ -1022,6 +1023,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1023,6 +1024,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
// Paper end - detailed watchdog information
|
// Paper end - detailed watchdog information
|
||||||
|
|
||||||
public void move(MoverType movementType, Vec3 movement) {
|
public void move(MoverType movementType, Vec3 movement) {
|
||||||
@@ -36,7 +36,7 @@ index 73824358e299c39fe7ea2d07d90ec1e25bb29f2f..7766e57fe4e15adb7b6b80bf9a5fd763
|
|||||||
// Paper start - detailed watchdog information
|
// Paper start - detailed watchdog information
|
||||||
io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
io.papermc.paper.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||||
synchronized (this.posLock) {
|
synchronized (this.posLock) {
|
||||||
@@ -3798,6 +3804,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3843,6 +3849,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void setBoundingBox(AABB boundingBox) {
|
public final void setBoundingBox(AABB boundingBox) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ As part of: VMP (https://github.com/RelativityMC/VMP-fabric)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index 41140fbf32fc4db1b2460e453420e538290f4f99..baa6aaa495c2a9d4d2f6a62527881b9442fcaeea 100644
|
index 014ca25e17915d2a3a8e2a8d37265a4d7bc09d24..0a39aaf5bc54e1fb7fb4bada2a15fea9b73af731 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -14,6 +14,7 @@ import com.mojang.datafixers.util.Either;
|
@@ -14,6 +14,7 @@ import com.mojang.datafixers.util.Either;
|
||||||
@@ -24,7 +24,7 @@ index 41140fbf32fc4db1b2460e453420e538290f4f99..baa6aaa495c2a9d4d2f6a62527881b94
|
|||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||||
import it.unimi.dsi.fastutil.longs.Long2ByteMap;
|
import it.unimi.dsi.fastutil.longs.Long2ByteMap;
|
||||||
@@ -294,7 +295,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -297,7 +298,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
// Paper - rewrite chunk system
|
// Paper - rewrite chunk system
|
||||||
this.tickingGenerated = new AtomicInteger();
|
this.tickingGenerated = new AtomicInteger();
|
||||||
this.playerMap = new PlayerMap();
|
this.playerMap = new PlayerMap();
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: Slice (https://github.com/Cryptite/Slice)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 25829f5b2675e1eafef5f5a0e40db8a4bbc80ba4..0cc1008b3db93487c8e0801895264683f6d2e439 100644
|
index 423f3f073e63be06e37af46f5497ba20f3f10664..17dbade3fa91ccc3db8792b5c2c9374ad3d61337 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -3147,7 +3147,7 @@ public abstract class LivingEntity extends Entity {
|
@@ -3113,7 +3113,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean equipmentHasChanged(ItemStack stack, ItemStack stack2) {
|
public boolean equipmentHasChanged(ItemStack stack, ItemStack stack2) {
|
||||||
@@ -26,10 +26,10 @@ index 25829f5b2675e1eafef5f5a0e40db8a4bbc80ba4..0cc1008b3db93487c8e0801895264683
|
|||||||
|
|
||||||
private void handleHandSwap(Map<EquipmentSlot, ItemStack> equipmentChanges) {
|
private void handleHandSwap(Map<EquipmentSlot, ItemStack> equipmentChanges) {
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index 561e0b938cbd52e4f4bacb2c903465efd8c0eadf..2255eaf65338443f0ec99227df0a1e64608ea525 100644
|
index 8155a806ccb200b8883ce6734c5b7e34338060ee..08638e5982083835cd90243e6edf45088ab695be 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -721,10 +721,22 @@ public final class ItemStack {
|
@@ -740,10 +740,22 @@ public final class ItemStack {
|
||||||
return left == right ? true : (!left.isEmpty() && !right.isEmpty() ? left.sameItem(right) : false);
|
return left == right ? true : (!left.isEmpty() && !right.isEmpty() ? left.sameItem(right) : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: Slice (https://github.com/Cryptite/Slice)
|
|||||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 7766e57fe4e15adb7b6b80bf9a5fd763ce1282c2..deff1fa31d41445fb796cae8e5e4e3249f235ea0 100644
|
index 46fc1afdba3dc550bacbec4f5da5081d8eb0051f..70b9efbbee8ad78538379459d4e3b10c688acad6 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -869,7 +869,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -870,7 +870,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
|
|
||||||
this.checkOutOfWorld();
|
this.checkOutOfWorld();
|
||||||
if (!this.level.isClientSide) {
|
if (!this.level.isClientSide) {
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index f69ea29648b090334d98dd8f3ed71cf8f10427ac..37e0b6212fec71ec9662e6be3b1e8bea487eb4a6 100644
|
index 945d0b28b7f58998acf5ba26b4196f3ad2fa2b7a..cc63a82665b2c5a918040a16dd97644edcd3c55f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -1554,7 +1554,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1551,7 +1551,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroyBlockProgress(int entityId, BlockPos pos, int progress) {
|
public void destroyBlockProgress(int entityId, BlockPos pos, int progress) {
|
||||||
@@ -35,7 +35,7 @@ index f69ea29648b090334d98dd8f3ed71cf8f10427ac..37e0b6212fec71ec9662e6be3b1e8bea
|
|||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
Player entityhuman = null;
|
Player entityhuman = null;
|
||||||
@@ -1577,7 +1587,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -1574,7 +1584,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
|
if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: SportPaper (https://github.com/Electroid/SportPaper)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
index ce7f36f38165a58e3fab7a98bece75df2d0ec6ed..46dc2deb8eb066e51a03a010a7bd920486914bb2 100644
|
index 834b497053f4fa20cf94c00e1ee2db4838bdf233..b79e302cf4e0eae858e2322b5b260282b1939963 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||||
@@ -331,7 +331,9 @@ public class ServerEntity {
|
@@ -361,7 +361,9 @@ public class ServerEntity {
|
||||||
|
|
||||||
// CraftBukkit start - Fix for nonsensical head yaw
|
// CraftBukkit start - Fix for nonsensical head yaw
|
||||||
this.yHeadRotp = Mth.floor(this.entity.getYHeadRot() * 256.0F / 360.0F);
|
this.yHeadRotp = Mth.floor(this.entity.getYHeadRot() * 256.0F / 360.0F);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 91d009a0e48e68711f51aaf65d4c52c291f8b4b2..aa26e6796a5b2b8247b0336a61b0cf8f4b55aa9f 100644
|
index 15d3de14463a6b541bb408412476e6cb1ce662f3..b48f8320f92ebe191d4ce3c944f2f29c711b0423 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -15,6 +15,8 @@ import java.net.SocketAddress;
|
@@ -15,6 +15,8 @@ import java.net.SocketAddress;
|
||||||
@@ -49,7 +49,7 @@ index 91d009a0e48e68711f51aaf65d4c52c291f8b4b2..aa26e6796a5b2b8247b0336a61b0cf8f
|
|||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -136,10 +138,11 @@ public abstract class PlayerList {
|
@@ -137,10 +139,11 @@ public abstract class PlayerList {
|
||||||
public static final File WHITELIST_FILE = new File("whitelist.json");
|
public static final File WHITELIST_FILE = new File("whitelist.json");
|
||||||
public static final Component CHAT_FILTERED_FULL = Component.translatable("chat.filtered_full");
|
public static final Component CHAT_FILTERED_FULL = Component.translatable("chat.filtered_full");
|
||||||
private static final Logger LOGGER = LogUtils.getLogger();
|
private static final Logger LOGGER = LogUtils.getLogger();
|
||||||
@@ -62,15 +62,15 @@ index 91d009a0e48e68711f51aaf65d4c52c291f8b4b2..aa26e6796a5b2b8247b0336a61b0cf8f
|
|||||||
private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();
|
private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();
|
||||||
private final UserBanList bans;
|
private final UserBanList bans;
|
||||||
private final IpBanList ipBans;
|
private final IpBanList ipBans;
|
||||||
@@ -301,6 +304,7 @@ public abstract class PlayerList {
|
@@ -307,6 +310,7 @@ public abstract class PlayerList {
|
||||||
player.sendServerStatus(this.server.getStatus());
|
|
||||||
// player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // Paper - use single player info update packet
|
// player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // Paper
|
||||||
this.players.add(player);
|
this.players.add(player);
|
||||||
+ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info
|
+ this.addToSendAllPlayerInfoBuckets(player); // Gale - Purpur - spread out sending all player info
|
||||||
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot
|
||||||
this.playersByUUID.put(player.getUUID(), player);
|
this.playersByUUID.put(player.getUUID(), player);
|
||||||
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
|
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
|
||||||
@@ -634,6 +638,7 @@ public abstract class PlayerList {
|
@@ -641,6 +645,7 @@ public abstract class PlayerList {
|
||||||
worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
|
worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
|
||||||
entityplayer.getAdvancements().stopListening();
|
entityplayer.getAdvancements().stopListening();
|
||||||
this.players.remove(entityplayer);
|
this.players.remove(entityplayer);
|
||||||
@@ -78,7 +78,7 @@ index 91d009a0e48e68711f51aaf65d4c52c291f8b4b2..aa26e6796a5b2b8247b0336a61b0cf8f
|
|||||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||||
this.server.getCustomBossEvents().onPlayerDisconnect(entityplayer);
|
this.server.getCustomBossEvents().onPlayerDisconnect(entityplayer);
|
||||||
UUID uuid = entityplayer.getUUID();
|
UUID uuid = entityplayer.getUUID();
|
||||||
@@ -787,6 +792,7 @@ public abstract class PlayerList {
|
@@ -794,6 +799,7 @@ public abstract class PlayerList {
|
||||||
// Paper end
|
// Paper end
|
||||||
entityplayer.stopRiding(); // CraftBukkit
|
entityplayer.stopRiding(); // CraftBukkit
|
||||||
this.players.remove(entityplayer);
|
this.players.remove(entityplayer);
|
||||||
@@ -86,7 +86,7 @@ index 91d009a0e48e68711f51aaf65d4c52c291f8b4b2..aa26e6796a5b2b8247b0336a61b0cf8f
|
|||||||
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
|
||||||
entityplayer.getLevel().removePlayerImmediately(entityplayer, Entity.RemovalReason.DISCARDED);
|
entityplayer.getLevel().removePlayerImmediately(entityplayer, Entity.RemovalReason.DISCARDED);
|
||||||
BlockPos blockposition = entityplayer.getRespawnPosition();
|
BlockPos blockposition = entityplayer.getRespawnPosition();
|
||||||
@@ -924,6 +930,7 @@ public abstract class PlayerList {
|
@@ -931,6 +937,7 @@ public abstract class PlayerList {
|
||||||
if (!entityplayer.connection.isDisconnected()) {
|
if (!entityplayer.connection.isDisconnected()) {
|
||||||
worldserver1.addRespawnedPlayer(entityplayer1);
|
worldserver1.addRespawnedPlayer(entityplayer1);
|
||||||
this.players.add(entityplayer1);
|
this.players.add(entityplayer1);
|
||||||
@@ -94,7 +94,7 @@ index 91d009a0e48e68711f51aaf65d4c52c291f8b4b2..aa26e6796a5b2b8247b0336a61b0cf8f
|
|||||||
this.playersByName.put(entityplayer1.getScoreboardName().toLowerCase(java.util.Locale.ROOT), entityplayer1); // Spigot
|
this.playersByName.put(entityplayer1.getScoreboardName().toLowerCase(java.util.Locale.ROOT), entityplayer1); // Spigot
|
||||||
this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1);
|
this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1);
|
||||||
}
|
}
|
||||||
@@ -974,20 +981,55 @@ public abstract class PlayerList {
|
@@ -983,20 +990,55 @@ public abstract class PlayerList {
|
||||||
this.sendPlayerPermissionLevel(player, i);
|
this.sendPlayerPermissionLevel(player, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ index 91d009a0e48e68711f51aaf65d4c52c291f8b4b2..aa26e6796a5b2b8247b0336a61b0cf8f
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index 685b69df4c63ef64d62476eb90bf82ee5f87814d..2737390659c08ec55731cce036c268d236da8260 100644
|
index 9e7b5b876ec7aa90bf46afa6992fc59e67aedc9b..512df472a5eca2017b8eb92b8cc6283936a1098a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -40,6 +40,7 @@ import net.minecraft.network.syncher.SynchedEntityData;
|
@@ -40,6 +40,7 @@ import net.minecraft.network.syncher.SynchedEntityData;
|
||||||
@@ -168,7 +168,7 @@ index 685b69df4c63ef64d62476eb90bf82ee5f87814d..2737390659c08ec55731cce036c268d2
|
|||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.sounds.SoundEvents;
|
import net.minecraft.sounds.SoundEvents;
|
||||||
import net.minecraft.sounds.SoundSource;
|
import net.minecraft.sounds.SoundSource;
|
||||||
@@ -194,12 +195,15 @@ public abstract class Player extends LivingEntity {
|
@@ -197,12 +198,15 @@ public abstract class Player extends LivingEntity {
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index aa26e6796a5b2b8247b0336a61b0cf8f4b55aa9f..4662b789af0bbab91102234d47b5785075762a2e 100644
|
index b48f8320f92ebe191d4ce3c944f2f29c711b0423..96c17b9a79bb2d5fc41d646b7e3714fb28fb5960 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -1017,14 +1017,18 @@ public abstract class PlayerList {
|
@@ -1026,14 +1026,18 @@ public abstract class PlayerList {
|
||||||
// Gale start - Purpur - spread out sending all player info
|
// Gale start - Purpur - spread out sending all player info
|
||||||
ServerPlayer[] sendAllPlayerInfoBucket = this.sendAllPlayerInfoBuckets[this.sendAllPlayerInfoIn];
|
ServerPlayer[] sendAllPlayerInfoBucket = this.sendAllPlayerInfoBuckets[this.sendAllPlayerInfoIn];
|
||||||
if (sendAllPlayerInfoBucket != null) {
|
if (sendAllPlayerInfoBucket != null) {
|
||||||
|
|||||||
@@ -37,10 +37,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
index 6f7b5884a82cd3a3483fbbd478c0e92987f0d833..c7083450b3466d80611b5efdac78b31ac2e70cf5 100644
|
index 28d78c5d593302d8fe376686db6402cafa5ccb86..1a28f9b348a24448bd4a327e1bf0dfab4dc301f5 100644
|
||||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||||
@@ -418,6 +418,7 @@ public class Commands {
|
@@ -447,6 +447,7 @@ public class Commands {
|
||||||
private void runSync(ServerPlayer player, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
|
private void runSync(ServerPlayer player, Collection<String> bukkit, RootCommandNode<SharedSuggestionProvider> rootcommandnode) {
|
||||||
// Paper end - Async command map building
|
// Paper end - Async command map building
|
||||||
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper
|
new com.destroystokyo.paper.event.brigadier.AsyncPlayerSendCommandsEvent<CommandSourceStack>(player.getBukkitEntity(), (RootCommandNode) rootcommandnode, false).callEvent(); // Paper
|
||||||
@@ -48,7 +48,7 @@ index 6f7b5884a82cd3a3483fbbd478c0e92987f0d833..c7083450b3466d80611b5efdac78b31a
|
|||||||
PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
|
||||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
@@ -428,6 +429,7 @@ public class Commands {
|
@@ -457,6 +458,7 @@ public class Commands {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index c6ffef9960f82eed929400296de027e4e297b8e7..aa11cb23ff5bbdc84bdbda2cad8826485e60e7f4 100644
|
index 4982d6dbc62bd21fa49b62f3f22ba7e101b163a1..15611b8970b6cfb733a9f733d64d75c9934b65f7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
|
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
|
||||||
@@ -48,8 +48,8 @@ index c6ffef9960f82eed929400296de027e4e297b8e7..aa11cb23ff5bbdc84bdbda2cad882648
|
|||||||
+import it.unimi.dsi.fastutil.longs.LongList;
|
+import it.unimi.dsi.fastutil.longs.LongList;
|
||||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
||||||
import java.time.Duration;
|
import java.net.SocketAddress;
|
||||||
@@ -260,6 +262,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -262,6 +264,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
private long keepAliveTime = Util.getMillis();
|
private long keepAliveTime = Util.getMillis();
|
||||||
private boolean keepAlivePending;
|
private boolean keepAlivePending;
|
||||||
private long keepAliveChallenge;
|
private long keepAliveChallenge;
|
||||||
@@ -57,7 +57,7 @@ index c6ffef9960f82eed929400296de027e4e297b8e7..aa11cb23ff5bbdc84bdbda2cad882648
|
|||||||
// CraftBukkit start - multithreaded fields
|
// CraftBukkit start - multithreaded fields
|
||||||
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
|
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
|
||||||
private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits
|
private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits
|
||||||
@@ -297,7 +300,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -299,7 +302,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
private final LastSeenMessagesValidator lastSeenMessages;
|
private final LastSeenMessagesValidator lastSeenMessages;
|
||||||
private final MessageSignatureCache messageSignatureCache;
|
private final MessageSignatureCache messageSignatureCache;
|
||||||
private final FutureChain chatMessageChain;
|
private final FutureChain chatMessageChain;
|
||||||
@@ -69,7 +69,7 @@ index c6ffef9960f82eed929400296de027e4e297b8e7..aa11cb23ff5bbdc84bdbda2cad882648
|
|||||||
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper
|
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper
|
||||||
|
|
||||||
private String clientBrandName = null; // Paper - Brand name
|
private String clientBrandName = null; // Paper - Brand name
|
||||||
@@ -396,6 +402,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -398,6 +404,21 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
long currentTime = Util.getMillis();
|
long currentTime = Util.getMillis();
|
||||||
long elapsedTime = currentTime - this.keepAliveTime;
|
long elapsedTime = currentTime - this.keepAliveTime;
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ index c6ffef9960f82eed929400296de027e4e297b8e7..aa11cb23ff5bbdc84bdbda2cad882648
|
|||||||
if (this.keepAlivePending) {
|
if (this.keepAlivePending) {
|
||||||
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected
|
||||||
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info
|
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info
|
||||||
@@ -3472,6 +3493,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3486,6 +3507,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
index 58b093bb1de78ee3b3b2ea364aa50474883f443a..7be34e5df2b6d33c1d7943c9c0b6fd065b010c34 100644
|
index 0a3eb5e929c605d9eb7369de8ade8b49951f5d37..adb72105dc98c9052ced2288362f58aa9f298237 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||||
@@ -173,7 +173,7 @@ public class ServerPlayerGameMode {
|
@@ -173,7 +173,7 @@ public class ServerPlayerGameMode {
|
||||||
@@ -20,10 +20,10 @@ index 58b093bb1de78ee3b3b2ea364aa50474883f443a..7be34e5df2b6d33c1d7943c9c0b6fd06
|
|||||||
this.debugLogging(pos, false, sequence, "too far");
|
this.debugLogging(pos, false, sequence, "too far");
|
||||||
} else if (pos.getY() >= worldHeight) {
|
} else if (pos.getY() >= worldHeight) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index aa11cb23ff5bbdc84bdbda2cad8826485e60e7f4..e000da425ba28330d1edcce3948d2becb39d2bd3 100644
|
index 15611b8970b6cfb733a9f733d64d75c9934b65f7..25a8d3a1302c36f46eb3e0f9a5a532a329165fd7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -250,7 +250,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -252,7 +252,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
static final Logger LOGGER = LogUtils.getLogger();
|
static final Logger LOGGER = LogUtils.getLogger();
|
||||||
private static final int LATENCY_CHECK_INTERVAL = 15000;
|
private static final int LATENCY_CHECK_INTERVAL = 15000;
|
||||||
@@ -32,7 +32,7 @@ index aa11cb23ff5bbdc84bdbda2cad8826485e60e7f4..e000da425ba28330d1edcce3948d2bec
|
|||||||
private static final int NO_BLOCK_UPDATES_TO_ACK = -1;
|
private static final int NO_BLOCK_UPDATES_TO_ACK = -1;
|
||||||
private static final int TRACKED_MESSAGE_DISCONNECT_THRESHOLD = 4096;
|
private static final int TRACKED_MESSAGE_DISCONNECT_THRESHOLD = 4096;
|
||||||
private static final Component CHAT_VALIDATION_FAILED = Component.translatable("multiplayer.disconnect.chat_validation_failed");
|
private static final Component CHAT_VALIDATION_FAILED = Component.translatable("multiplayer.disconnect.chat_validation_failed");
|
||||||
@@ -347,6 +347,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -349,6 +349,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ index aa11cb23ff5bbdc84bdbda2cad8826485e60e7f4..e000da425ba28330d1edcce3948d2bec
|
|||||||
@Override
|
@Override
|
||||||
public void tick() {
|
public void tick() {
|
||||||
if (this.ackBlockChangesUpTo > -1) {
|
if (this.ackBlockChangesUpTo > -1) {
|
||||||
@@ -1968,7 +1975,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1958,7 +1965,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
BlockPos blockposition = movingobjectpositionblock.getBlockPos();
|
BlockPos blockposition = movingobjectpositionblock.getBlockPos();
|
||||||
Vec3 vec3d1 = Vec3.atCenterOf(blockposition);
|
Vec3 vec3d1 = Vec3.atCenterOf(blockposition);
|
||||||
|
|
||||||
@@ -55,12 +55,12 @@ index aa11cb23ff5bbdc84bdbda2cad8826485e60e7f4..e000da425ba28330d1edcce3948d2bec
|
|||||||
Vec3 vec3d2 = vec3d.subtract(vec3d1);
|
Vec3 vec3d2 = vec3d.subtract(vec3d1);
|
||||||
double d0 = 1.0000001D;
|
double d0 = 1.0000001D;
|
||||||
|
|
||||||
@@ -2796,7 +2803,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2810,7 +2817,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (entity.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.MAX_INTERACTION_DISTANCE) {
|
AABB axisalignedbb = entity.getBoundingBox();
|
||||||
+ if (entity.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.getMaxInteractionDistanceSquared(this.player.level)) { // Gale - make max interaction distance configurable
|
|
||||||
|
- if (axisalignedbb.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.MAX_INTERACTION_DISTANCE) {
|
||||||
|
+ if (axisalignedbb.distanceToSqr(this.player.getEyePosition()) < ServerGamePacketListenerImpl.getMaxInteractionDistanceSquared(this.player.level)) { // Gale - make max interaction distance configurable
|
||||||
packet.dispatch(new ServerboundInteractPacket.Handler() {
|
packet.dispatch(new ServerboundInteractPacket.Handler() {
|
||||||
private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
|
private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
|
||||||
ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
|
ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index deff1fa31d41445fb796cae8e5e4e3249f235ea0..0ed0635ef581705d07934b9b17a63a4c7e19f6e1 100644
|
index 70b9efbbee8ad78538379459d4e3b10c688acad6..08f0497a51da53646c347a010e412760245290da 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -3456,6 +3456,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -3475,6 +3475,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
Entity entity = this.getType().create(worldserver);
|
Entity entity = this.getType().create(worldserver);
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 0ed0635ef581705d07934b9b17a63a4c7e19f6e1..650a0f0ada672d050c1d1d52b33fe74dfa1ef5ed 100644
|
index 08f0497a51da53646c347a010e412760245290da..3d68dabe6348b01a322c271f06b8db820d3e062e 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -4314,6 +4314,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -4378,6 +4378,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
return this.feetBlockState;
|
return this.feetBlockState;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,10 +28,10 @@ index 0ed0635ef581705d07934b9b17a63a4c7e19f6e1..650a0f0ada672d050c1d1d52b33fe74d
|
|||||||
return this.chunkPosition;
|
return this.chunkPosition;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
index 0cc1008b3db93487c8e0801895264683f6d2e439..87499e82e80a8b7d6d8ca6eeaa1819b74fcf1665 100644
|
index 17dbade3fa91ccc3db8792b5c2c9374ad3d61337..a076e8b852a87b67602a21f07048da1570226a81 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -1948,19 +1948,43 @@ public abstract class LivingEntity extends Entity {
|
@@ -1943,19 +1943,43 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
|
||||||
public boolean onClimbableCached() {
|
public boolean onClimbableCached() {
|
||||||
if (!this.blockPosition().equals(this.lastClimbingPosition)) {
|
if (!this.blockPosition().equals(this.lastClimbingPosition)) {
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index c5984ad4d12fec9310156a7b7c7beddd3dc0ba57..ef0b6db4421a0c840e6381554a3db02298f33737 100644
|
index 2dcab455bdc6b0742cd2322062678aa7cd173c79..37b6064586452c46c1417510c4130fbaeb2694db 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -1847,12 +1847,18 @@ public class ServerPlayer extends Player {
|
@@ -1850,12 +1850,18 @@ public class ServerPlayer extends Player {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void crit(Entity target) {
|
public void crit(Entity target) {
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 4662b789af0bbab91102234d47b5785075762a2e..6f139e6cbb61bfb2be9b8b886bec7cddbb2c8993 100644
|
index 96c17b9a79bb2d5fc41d646b7e3714fb28fb5960..d4323c23f58acda56fe270f34c2eb4658fec0b55 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -253,6 +253,13 @@ public abstract class PlayerList {
|
@@ -254,6 +254,13 @@ public abstract class PlayerList {
|
||||||
org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(spawnPlayer, spawnPlayer.getLocation()); // Paper use our duplicate event
|
org.spigotmc.event.player.PlayerSpawnLocationEvent ev = new com.destroystokyo.paper.event.player.PlayerInitialSpawnEvent(spawnPlayer, spawnPlayer.getLocation()); // Paper use our duplicate event
|
||||||
this.cserver.getPluginManager().callEvent(ev);
|
this.cserver.getPluginManager().callEvent(ev);
|
||||||
|
|
||||||
|
|||||||
@@ -13,10 +13,10 @@ As part of: MultiPaper (https://github.com/MultiPaper/MultiPaper)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index ab078ac735a7820b1d191fc90e51cc1b55da1303..506db21eb8a8ae566acaca6275ad95c0d59594fe 100644
|
index 02b51a9eca5796825c5d500220ff18895dea3299..f069a04d8f4a3b2f05767955f8f00becdc574dc2 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -48,6 +48,9 @@ import java.util.logging.Level;
|
@@ -41,6 +41,9 @@ import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
@@ -26,7 +26,7 @@ index ab078ac735a7820b1d191fc90e51cc1b55da1303..506db21eb8a8ae566acaca6275ad95c0
|
|||||||
import net.minecraft.advancements.Advancement;
|
import net.minecraft.advancements.Advancement;
|
||||||
import net.minecraft.commands.CommandSourceStack;
|
import net.minecraft.commands.CommandSourceStack;
|
||||||
import net.minecraft.commands.Commands;
|
import net.minecraft.commands.Commands;
|
||||||
@@ -275,6 +278,7 @@ public final class CraftServer implements Server {
|
@@ -271,6 +274,7 @@ public final class CraftServer implements Server {
|
||||||
protected final DedicatedServer console;
|
protected final DedicatedServer console;
|
||||||
protected final DedicatedPlayerList playerList;
|
protected final DedicatedPlayerList playerList;
|
||||||
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
private final Map<String, World> worlds = new LinkedHashMap<String, World>();
|
||||||
@@ -34,7 +34,7 @@ index ab078ac735a7820b1d191fc90e51cc1b55da1303..506db21eb8a8ae566acaca6275ad95c0
|
|||||||
private final Map<Class<?>, Registry<?>> registries = new HashMap<>();
|
private final Map<Class<?>, Registry<?>> registries = new HashMap<>();
|
||||||
private YamlConfiguration configuration;
|
private YamlConfiguration configuration;
|
||||||
private YamlConfiguration commandsConfiguration;
|
private YamlConfiguration commandsConfiguration;
|
||||||
@@ -1343,6 +1347,7 @@ public final class CraftServer implements Server {
|
@@ -1320,6 +1324,7 @@ public final class CraftServer implements Server {
|
||||||
this.getLogger().log(Level.SEVERE, null, ex);
|
this.getLogger().log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ index ab078ac735a7820b1d191fc90e51cc1b55da1303..506db21eb8a8ae566acaca6275ad95c0
|
|||||||
this.worlds.remove(world.getName().toLowerCase(java.util.Locale.ENGLISH));
|
this.worlds.remove(world.getName().toLowerCase(java.util.Locale.ENGLISH));
|
||||||
this.console.removeLevel(handle);
|
this.console.removeLevel(handle);
|
||||||
return true;
|
return true;
|
||||||
@@ -1361,12 +1366,7 @@ public final class CraftServer implements Server {
|
@@ -1338,12 +1343,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public World getWorld(UUID uid) {
|
public World getWorld(UUID uid) {
|
||||||
@@ -56,7 +56,7 @@ index ab078ac735a7820b1d191fc90e51cc1b55da1303..506db21eb8a8ae566acaca6275ad95c0
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
@@ -1384,6 +1384,7 @@ public final class CraftServer implements Server {
|
@@ -1361,6 +1361,7 @@ public final class CraftServer implements Server {
|
||||||
System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world.");
|
System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c
|
|||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/Eula.java b/src/main/java/net/minecraft/server/Eula.java
|
diff --git a/src/main/java/net/minecraft/server/Eula.java b/src/main/java/net/minecraft/server/Eula.java
|
||||||
index 5528a4b7a67e0c257966c587437006004a2e1292..b9403a3eafc1b30b33ac654f253d0849cacadd03 100644
|
index 4996694ec43a894cbbb363e48bfdff6b6ae17b5f..b9403a3eafc1b30b33ac654f253d0849cacadd03 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Eula.java
|
--- a/src/main/java/net/minecraft/server/Eula.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Eula.java
|
+++ b/src/main/java/net/minecraft/server/Eula.java
|
||||||
@@ -16,13 +16,29 @@ public class Eula {
|
@@ -16,17 +16,40 @@ public class Eula {
|
||||||
|
|
||||||
public Eula(Path eulaFile) {
|
public Eula(Path eulaFile) {
|
||||||
this.file = eulaFile;
|
this.file = eulaFile;
|
||||||
@@ -35,6 +35,10 @@ index 5528a4b7a67e0c257966c587437006004a2e1292..b9403a3eafc1b30b33ac654f253d0849
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean readFile() {
|
private boolean readFile() {
|
||||||
|
- try (InputStream inputStream = Files.newInputStream(this.file)) {
|
||||||
|
- Properties properties = new Properties();
|
||||||
|
- properties.load(inputStream);
|
||||||
|
- return Boolean.parseBoolean(properties.getProperty("eula", "false"));
|
||||||
+ // Gale start - YAPFA - global EULA file
|
+ // Gale start - YAPFA - global EULA file
|
||||||
+ return readFile(this.file);
|
+ return readFile(this.file);
|
||||||
+ }
|
+ }
|
||||||
@@ -51,16 +55,15 @@ index 5528a4b7a67e0c257966c587437006004a2e1292..b9403a3eafc1b30b33ac654f253d0849
|
|||||||
+
|
+
|
||||||
+ private boolean readFile(Path file) {
|
+ private boolean readFile(Path file) {
|
||||||
+ // Gale end - YAPFA - global EULA file
|
+ // Gale end - YAPFA - global EULA file
|
||||||
try {
|
+ try {
|
||||||
boolean var3;
|
+ boolean var3;
|
||||||
- try (InputStream inputStream = Files.newInputStream(this.file)) {
|
|
||||||
+ try (InputStream inputStream = Files.newInputStream(file)) { // Gale - YAPFA - global EULA file
|
+ try (InputStream inputStream = Files.newInputStream(file)) { // Gale - YAPFA - global EULA file
|
||||||
Properties properties = new Properties();
|
+ Properties properties = new Properties();
|
||||||
properties.load(inputStream);
|
+ properties.load(inputStream);
|
||||||
var3 = Boolean.parseBoolean(properties.getProperty("eula", "false"));
|
+ var3 = Boolean.parseBoolean(properties.getProperty("eula", "false"));
|
||||||
@@ -30,8 +46,10 @@ public class Eula {
|
+ }
|
||||||
|
+
|
||||||
return var3;
|
+ return var3;
|
||||||
} catch (Exception var6) {
|
} catch (Exception var6) {
|
||||||
+ if (file == this.file) { // Gale - YAPFA - global EULA file
|
+ if (file == this.file) { // Gale - YAPFA - global EULA file
|
||||||
LOGGER.warn("Failed to load {}", (Object)this.file);
|
LOGGER.warn("Failed to load {}", (Object)this.file);
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 506db21eb8a8ae566acaca6275ad95c0d59594fe..f403817c85e7a4adfcfa09c2f102ea257bbaaad4 100644
|
index f069a04d8f4a3b2f05767955f8f00becdc574dc2..ffd6decc34a5fc30893a958f7ab6bd0273fba1a8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2733,6 +2733,25 @@ public final class CraftServer implements Server {
|
@@ -2713,6 +2713,25 @@ public final class CraftServer implements Server {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -59,10 +59,10 @@ index fa56cd09102a89692b42f1d14257990508c5c720..fac07dda413002c12276131efbe4ee38
|
|||||||
setListData(vector);
|
setListData(vector);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index c485cec0e9f4e1d55b526c8f6d915a355538a475..98c8c5946b2474676a5b6af76f23140d6290a244 100644
|
index b254955ffc40c4d0b9a2e242f988b5c1032ae4ab..40895ef57a499c4c57ea120857c4e28b8ac137fe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1034,6 +1034,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1036,6 +1036,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
|
private static final long MAX_CATCHUP_BUFFER = TICK_TIME * TPS * 60L;
|
||||||
private long lastTick = 0;
|
private long lastTick = 0;
|
||||||
private long catchupTime = 0;
|
private long catchupTime = 0;
|
||||||
@@ -79,10 +79,10 @@ index c485cec0e9f4e1d55b526c8f6d915a355538a475..98c8c5946b2474676a5b6af76f23140d
|
|||||||
tps5.add(currentTps, diff);
|
tps5.add(currentTps, diff);
|
||||||
tps15.add(currentTps, diff);
|
tps15.add(currentTps, diff);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index f403817c85e7a4adfcfa09c2f102ea257bbaaad4..80274dbb800650302cf33e85833eac333bc183c7 100644
|
index ffd6decc34a5fc30893a958f7ab6bd0273fba1a8..899d37d717de53ce49ebe8fb808633398eee19d3 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2735,6 +2735,13 @@ public final class CraftServer implements Server {
|
@@ -2715,6 +2715,13 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
// Gale start - specific interval TPS API
|
// Gale start - specific interval TPS API
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c
|
|||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 98c8c5946b2474676a5b6af76f23140d6290a244..14324218723ed43f34a2ce5de9b51cb40d7bf667 100644
|
index 40895ef57a499c4c57ea120857c4e28b8ac137fe..aee8904a5de902bd70a668f1b983e07e94d29b82 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1084,6 +1084,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1086,6 +1086,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
public static volatile RuntimeException chunkSystemCrash; // Paper - rewrite chunk system
|
public static volatile RuntimeException chunkSystemCrash; // Paper - rewrite chunk system
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ The above copyright notice and this permission notice shall be included in all c
|
|||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 80274dbb800650302cf33e85833eac333bc183c7..3b64d9a7c3f759ba871c196296a1993751b93472 100644
|
index 899d37d717de53ce49ebe8fb808633398eee19d3..d278472bf407ae7c678bccb3a061437a5642749e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -2982,4 +2982,22 @@ public final class CraftServer implements Server {
|
@@ -2962,4 +2962,22 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
index 2737390659c08ec55731cce036c268d236da8260..2dcdbcb6759ae6ff1e357722a49378294cf3325d 100644
|
index 512df472a5eca2017b8eb92b8cc6283936a1098a..7b0dbfaab5951aaf09c36bc5112d953585f0098a 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
@@ -114,6 +114,7 @@ import net.minecraft.world.phys.AABB;
|
@@ -116,6 +116,7 @@ import net.minecraft.world.phys.AABB;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import net.minecraft.world.scores.PlayerTeam;
|
import net.minecraft.world.scores.PlayerTeam;
|
||||||
import net.minecraft.world.scores.Scoreboard;
|
import net.minecraft.world.scores.Scoreboard;
|
||||||
@@ -56,7 +56,7 @@ index 2737390659c08ec55731cce036c268d236da8260..2dcdbcb6759ae6ff1e357722a4937829
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||||
@@ -282,19 +283,24 @@ public abstract class Player extends LivingEntity {
|
@@ -285,19 +286,24 @@ public abstract class Player extends LivingEntity {
|
||||||
this.moveCloak();
|
this.moveCloak();
|
||||||
if (!this.level.isClientSide) {
|
if (!this.level.isClientSide) {
|
||||||
this.foodData.tick(this);
|
this.foodData.tick(this);
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ As part of: Akarin (https://github.com/Akarin-project/Akarin)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 650a0f0ada672d050c1d1d52b33fe74dfa1ef5ed..42467f5d99039bb6815b6abdf4ede39821d6be56 100644
|
index 3d68dabe6348b01a322c271f06b8db820d3e062e..45b5aa21f1429c462355b244f413e592011b2acd 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1984,8 +1984,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1989,8 +1989,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
public void playerTouch(Player player) {}
|
public void playerTouch(Player player) {}
|
||||||
|
|
||||||
public void push(Entity entity) {
|
public void push(Entity entity) {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
index 42467f5d99039bb6815b6abdf4ede39821d6be56..ce197df36b3746dbd511287ecd78e46eaec3d5e0 100644
|
index 45b5aa21f1429c462355b244f413e592011b2acd..b6404bfac381352b6ceb23a1b95ed5f3ccabe606 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||||
@@ -1188,9 +1188,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
@@ -1189,9 +1189,18 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.tryCheckInsideBlocks();
|
this.tryCheckInsideBlocks();
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index 2255eaf65338443f0ec99227df0a1e64608ea525..f8963e239354020c8e08460058541ddbaa07798c 100644
|
index 08638e5982083835cd90243e6edf45088ab695be..32d5676339365dc1a4d1ea481f40bcdb7cbf6c07 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@@ -706,14 +706,29 @@ public final class ItemStack {
|
@@ -725,14 +725,29 @@ public final class ItemStack {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean tagMatches(ItemStack left, ItemStack right) {
|
public static boolean tagMatches(ItemStack left, ItemStack right) {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ As part of: Patina (https://github.com/PatinaMC/Patina)
|
|||||||
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
Licensed under: GPL-3.0 (https://www.gnu.org/licenses/gpl-3.0.html)
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
diff --git a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||||
index 23dcdc71a8a6fd5472cdc1c22331b56c6bb3ded9..c3f88980f1ea2f7b04ad110494962725274d25a4 100644
|
index 0f094a337a7cc94b203a27e657d138749728c911..14d7223ee4552f6714945d40c29bda3f516d81d6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
--- a/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||||
+++ b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
+++ b/src/main/java/net/minecraft/server/commands/SpreadPlayersCommand.java
|
||||||
@@ -65,7 +65,7 @@ public class SpreadPlayersCommand {
|
@@ -65,7 +65,7 @@ public class SpreadPlayersCommand {
|
||||||
@@ -26,10 +26,10 @@ index 23dcdc71a8a6fd5472cdc1c22331b56c6bb3ded9..c3f88980f1ea2f7b04ad110494962725
|
|||||||
double d1 = (double) (center.y - maxRange);
|
double d1 = (double) (center.y - maxRange);
|
||||||
double d2 = (double) (center.x + maxRange);
|
double d2 = (double) (center.x + maxRange);
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
index ef0b6db4421a0c840e6381554a3db02298f33737..82dec221441ad4b76af0aebf788af801a275be64 100644
|
index 37b6064586452c46c1417510c4130fbaeb2694db..aee10fe735b4ccbafbd92908890989b6b8b3685d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||||
@@ -391,7 +391,7 @@ public class ServerPlayer extends Player {
|
@@ -397,7 +397,7 @@ public class ServerPlayer extends Player {
|
||||||
long l = k * k;
|
long l = k * k;
|
||||||
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
||||||
int j1 = this.getCoprime(i1);
|
int j1 = this.getCoprime(i1);
|
||||||
@@ -38,7 +38,7 @@ index ef0b6db4421a0c840e6381554a3db02298f33737..82dec221441ad4b76af0aebf788af801
|
|||||||
|
|
||||||
for (int l1 = 0; l1 < i1; ++l1) {
|
for (int l1 = 0; l1 < i1; ++l1) {
|
||||||
int i2 = (k1 + j1 * l1) % i1;
|
int i2 = (k1 + j1 * l1) % i1;
|
||||||
@@ -428,7 +428,7 @@ public class ServerPlayer extends Player {
|
@@ -434,7 +434,7 @@ public class ServerPlayer extends Player {
|
||||||
long l = k * k;
|
long l = k * k;
|
||||||
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
int i1 = l > 2147483647L ? Integer.MAX_VALUE : (int) l;
|
||||||
int j1 = this.getCoprime(i1);
|
int j1 = this.getCoprime(i1);
|
||||||
@@ -61,7 +61,7 @@ index 1ef089dbf83de35d875c00efdf468c397be56978..b9f5dc95f859acb8f8fd4739537485af
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
index 15fb5ee374b19366ebb23181896fb943e95819f0..a7ccb6ea2abfaca54ae174f3ec1926eb233abe25 100644
|
index d77410588a1c10d8ac902f21a8bd7e35f74fecd2..c27fdfb845eca7ffea0f7b829ed5fbddfd37e1fc 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||||
@@ -80,7 +80,7 @@ public class FishingHook extends Projectile {
|
@@ -80,7 +80,7 @@ public class FishingHook extends Projectile {
|
||||||
@@ -74,7 +74,7 @@ index 15fb5ee374b19366ebb23181896fb943e95819f0..a7ccb6ea2abfaca54ae174f3ec1926eb
|
|||||||
this.currentState = FishingHook.FishHookState.FLYING;
|
this.currentState = FishingHook.FishHookState.FLYING;
|
||||||
this.noCulling = true;
|
this.noCulling = true;
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raid.java b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raid.java b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||||
index b13ef853419d2783d09b3e685b9b506a4ff5676e..7a7e87954868c3eb267d3255652d67d34f7b04d2 100644
|
index 246584452eb01b168d2372e1ccc4b357b63891df..9d8ed30c7fac6e72d9678ca163189b93eaa4f3ff 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
--- a/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
+++ b/src/main/java/net/minecraft/world/entity/raid/Raid.java
|
||||||
@@ -111,7 +111,7 @@ public class Raid {
|
@@ -111,7 +111,7 @@ public class Raid {
|
||||||
@@ -96,7 +96,7 @@ index b13ef853419d2783d09b3e685b9b506a4ff5676e..7a7e87954868c3eb267d3255652d67d3
|
|||||||
this.level = world;
|
this.level = world;
|
||||||
this.id = nbt.getInt("Id");
|
this.id = nbt.getInt("Id");
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
index 5c7f2be28fbb5d2f7b48c04bb862fb15440dda03..10336cef8316d41f49eeb7811b84f4eea90df246 100644
|
index aa6ea4ebaa6777815f3a2245f260c5e58a7a3b21..52fb1e0f43caca93d77bf398eb759b36b84ebaec 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||||
@@ -81,7 +81,7 @@ public class Explosion {
|
@@ -81,7 +81,7 @@ public class Explosion {
|
||||||
@@ -109,7 +109,7 @@ index 5c7f2be28fbb5d2f7b48c04bb862fb15440dda03..10336cef8316d41f49eeb7811b84f4ee
|
|||||||
this.hitPlayers = Maps.newHashMap();
|
this.hitPlayers = Maps.newHashMap();
|
||||||
this.level = world;
|
this.level = world;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
index 2a596cc374206a85bb692f5e09ee2dd83cf6d1b1..74686aa52113fcd0cbd5531e4161f6a1993dba60 100644
|
index c86dea3e38d72929a4970334e3cc4e93e353c598..b618e615d9ccb9b2a29b4067d47dbbb66acf3cda 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||||
@@ -361,7 +361,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
@@ -361,7 +361,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 14324218723ed43f34a2ce5de9b51cb40d7bf667..eb951c9fda85d9620d3038a3db22d578db45e878 100644
|
index aee8904a5de902bd70a668f1b983e07e94d29b82..9102dd3291a022214e84fba8e436174ee6fe6f0a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -194,6 +194,8 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
@@ -194,6 +194,8 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||||
@@ -19,7 +19,7 @@ index 14324218723ed43f34a2ce5de9b51cb40d7bf667..eb951c9fda85d9620d3038a3db22d578
|
|||||||
private static MinecraftServer SERVER; // Paper
|
private static MinecraftServer SERVER; // Paper
|
||||||
public static final Logger LOGGER = LogUtils.getLogger();
|
public static final Logger LOGGER = LogUtils.getLogger();
|
||||||
public static final String VANILLA_BRAND = "vanilla";
|
public static final String VANILLA_BRAND = "vanilla";
|
||||||
@@ -317,7 +319,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -320,7 +322,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
|
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
|
||||||
|
|
||||||
atomicreference.set(s0);
|
atomicreference.set(s0);
|
||||||
|
|||||||
@@ -55,13 +55,13 @@ index 5a92a8f24d3a6957cc3f8404bf3458f4c4058fb4..666114daf9e9a3f9f9e0779a3a40dfac
|
|||||||
// Attempt to detect vectorization
|
// Attempt to detect vectorization
|
||||||
try {
|
try {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 3b64d9a7c3f759ba871c196296a1993751b93472..dc5020580d1a26f1fcb31af2fd272e5d8bcaa480 100644
|
index d278472bf407ae7c678bccb3a061437a5642749e..931fcce46f3941af772416f39229ed4abc7f8301 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -254,6 +254,8 @@ import org.bukkit.scoreboard.Criteria;
|
@@ -249,6 +249,8 @@ import org.bukkit.structure.StructureManager;
|
||||||
import org.bukkit.structure.StructureManager;
|
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
import org.bukkit.util.permissions.DefaultPermissions;
|
import org.bukkit.util.permissions.DefaultPermissions;
|
||||||
|
import org.yaml.snakeyaml.LoaderOptions;
|
||||||
+import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
+import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
||||||
+import org.galemc.gale.util.CPUCoresEstimation;
|
+import org.galemc.gale.util.CPUCoresEstimation;
|
||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
|
|||||||
@@ -396,10 +396,10 @@ index a82be9c7226348b6c8ed5edfa8dd8262b4f49f07..47a3580caef45ffe71446c247d4e06e3
|
|||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
index 3fad7e58a1461d897526d63efd27075f044f2962..4b8da38db72d7ebc2d498ec3d711d3b30911096c 100644
|
index fe8d2fa5fdb116762b644b08020fee23e517e57c..157f74bbbac8cbbed37c4fcc339b3b3c06d06bbe 100644
|
||||||
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
@@ -35,6 +35,7 @@ import org.bukkit.block.BlockFace;
|
@@ -36,6 +36,7 @@ import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.util.Waitable;
|
import org.bukkit.craftbukkit.util.Waitable;
|
||||||
import org.spigotmc.AsyncCatcher;
|
import org.spigotmc.AsyncCatcher;
|
||||||
@@ -407,7 +407,7 @@ index 3fad7e58a1461d897526d63efd27075f044f2962..4b8da38db72d7ebc2d498ec3d711d3b3
|
|||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
@@ -47,6 +48,7 @@ import java.util.concurrent.CompletableFuture;
|
@@ -48,6 +49,7 @@ import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
import java.util.concurrent.ThreadPoolExecutor;
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
@@ -459,7 +459,7 @@ index f25b9330e068c7d9e12cb57a7761cfef9ebaf7bc..64d957ba23d306327a26605e1e42f32f
|
|||||||
this.addEntities(list, worldserver1, vec3d, predicate);
|
this.addEntities(list, worldserver1, vec3d, predicate);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
diff --git a/src/main/java/net/minecraft/network/protocol/PacketUtils.java b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||||
index 27d4aa45e585842c04491839826d405d6f447f0e..0a54e07db5a55b6170650c070bb19e07b32410a7 100644
|
index d2f0a0755317f5fa9a1ccf7db346aa77fd287d80..79c55f3ce482d251c768b5b802e52b590ea53bc8 100644
|
||||||
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
--- a/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
+++ b/src/main/java/net/minecraft/network/protocol/PacketUtils.java
|
||||||
@@ -2,6 +2,7 @@ package net.minecraft.network.protocol;
|
@@ -2,6 +2,7 @@ package net.minecraft.network.protocol;
|
||||||
@@ -492,10 +492,10 @@ index 27d4aa45e585842c04491839826d405d6f447f0e..0a54e07db5a55b6170650c070bb19e07
|
|||||||
engine.execute(() -> { // Paper - Fix preemptive player kick on a server shutdown.
|
engine.execute(() -> { // Paper - Fix preemptive player kick on a server shutdown.
|
||||||
packetProcessing.push(listener); // Paper - detailed watchdog information
|
packetProcessing.push(listener); // Paper - detailed watchdog information
|
||||||
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
|
||||||
index 0c4c62674b4c7e8e3921c7eb3ef726759ac75075..748f24b9b09e56ed3e755b06648a9f2c21b7ee06 100644
|
index b46e64bbfe4530917ff941292464acf71c7fab60..5b9e0bf7c0915e49208fa18c46b5ba2b2ec37f83 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Main.java
|
--- a/src/main/java/net/minecraft/server/Main.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Main.java
|
+++ b/src/main/java/net/minecraft/server/Main.java
|
||||||
@@ -1,27 +1,22 @@
|
@@ -1,12 +1,10 @@
|
||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
-import com.mojang.authlib.GameProfile;
|
-import com.mojang.authlib.GameProfile;
|
||||||
@@ -508,7 +508,8 @@ index 0c4c62674b4c7e8e3921c7eb3ef726759ac75075..748f24b9b09e56ed3e755b06648a9f2c
|
|||||||
+
|
+
|
||||||
import java.awt.GraphicsEnvironment;
|
import java.awt.GraphicsEnvironment;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.net.Proxy;
|
import java.io.IOException;
|
||||||
|
@@ -16,17 +14,15 @@ import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
@@ -520,13 +521,15 @@ index 0c4c62674b4c7e8e3921c7eb3ef726759ac75075..748f24b9b09e56ed3e755b06648a9f2c
|
|||||||
-import joptsimple.NonOptionArgumentSpec;
|
-import joptsimple.NonOptionArgumentSpec;
|
||||||
-import joptsimple.OptionParser;
|
-import joptsimple.OptionParser;
|
||||||
import joptsimple.OptionSet;
|
import joptsimple.OptionSet;
|
||||||
-import joptsimple.OptionSpec;
|
import joptsimple.OptionSpec;
|
||||||
|
import joptsimple.util.PathConverter;
|
||||||
|
import joptsimple.util.PathProperties;
|
||||||
import net.minecraft.CrashReport;
|
import net.minecraft.CrashReport;
|
||||||
-import net.minecraft.DefaultUncaughtExceptionHandler;
|
-import net.minecraft.DefaultUncaughtExceptionHandler;
|
||||||
import net.minecraft.SharedConstants;
|
import net.minecraft.SharedConstants;
|
||||||
import net.minecraft.Util;
|
import net.minecraft.Util;
|
||||||
import net.minecraft.commands.Commands;
|
import net.minecraft.commands.Commands;
|
||||||
@@ -57,6 +52,8 @@ import net.minecraft.world.level.storage.LevelStorageSource;
|
@@ -63,13 +59,15 @@ import net.minecraft.world.level.storage.LevelStorageSource;
|
||||||
import net.minecraft.world.level.storage.LevelSummary;
|
import net.minecraft.world.level.storage.LevelSummary;
|
||||||
import net.minecraft.world.level.storage.PrimaryLevelData;
|
import net.minecraft.world.level.storage.PrimaryLevelData;
|
||||||
import net.minecraft.world.level.storage.WorldData;
|
import net.minecraft.world.level.storage.WorldData;
|
||||||
@@ -535,8 +538,7 @@ index 0c4c62674b4c7e8e3921c7eb3ef726759ac75075..748f24b9b09e56ed3e755b06648a9f2c
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -64,7 +61,7 @@ import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import com.mojang.bridge.game.PackType;
|
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
-import net.minecraft.SharedConstants;
|
-import net.minecraft.SharedConstants;
|
||||||
@@ -544,7 +546,7 @@ index 0c4c62674b4c7e8e3921c7eb3ef726759ac75075..748f24b9b09e56ed3e755b06648a9f2c
|
|||||||
import org.bukkit.configuration.file.YamlConfiguration;
|
import org.bukkit.configuration.file.YamlConfiguration;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -170,6 +167,29 @@ public class Main {
|
@@ -182,6 +180,29 @@ public class Main {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -574,7 +576,7 @@ index 0c4c62674b4c7e8e3921c7eb3ef726759ac75075..748f24b9b09e56ed3e755b06648a9f2c
|
|||||||
org.spigotmc.SpigotConfig.disabledAdvancements = spigotConfiguration.getStringList("advancements.disabled"); // Paper - fix SPIGOT-5885, must be set early in init
|
org.spigotmc.SpigotConfig.disabledAdvancements = spigotConfiguration.getStringList("advancements.disabled"); // Paper - fix SPIGOT-5885, must be set early in init
|
||||||
// Paper start - fix SPIGOT-5824
|
// Paper start - fix SPIGOT-5824
|
||||||
File file;
|
File file;
|
||||||
@@ -228,6 +248,12 @@ public class Main {
|
@@ -240,6 +261,12 @@ public class Main {
|
||||||
|
|
||||||
WorldStem worldstem;
|
WorldStem worldstem;
|
||||||
|
|
||||||
@@ -588,10 +590,10 @@ index 0c4c62674b4c7e8e3921c7eb3ef726759ac75075..748f24b9b09e56ed3e755b06648a9f2c
|
|||||||
WorldLoader.InitConfig worldloader_c = Main.loadOrCreateConfig(dedicatedserversettings.getProperties(), convertable_conversionsession, flag, resourcepackrepository);
|
WorldLoader.InitConfig worldloader_c = Main.loadOrCreateConfig(dedicatedserversettings.getProperties(), convertable_conversionsession, flag, resourcepackrepository);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333ad4e64b3 100644
|
index 9102dd3291a022214e84fba8e436174ee6fe6f0a..b7e231978f15ebc60fa9a8a4df369f96cfcf3966 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -40,10 +40,8 @@ import java.util.Optional;
|
@@ -41,10 +41,8 @@ import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
@@ -602,7 +604,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
@@ -108,19 +106,8 @@ import net.minecraft.util.ProgressListener;
|
@@ -109,19 +107,8 @@ import net.minecraft.util.ProgressListener;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
import net.minecraft.util.SignatureValidator;
|
import net.minecraft.util.SignatureValidator;
|
||||||
import net.minecraft.util.datafix.DataFixers;
|
import net.minecraft.util.datafix.DataFixers;
|
||||||
@@ -622,10 +624,11 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
import net.minecraft.world.Difficulty;
|
import net.minecraft.world.Difficulty;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.ai.village.VillageSiege;
|
import net.minecraft.world.entity.ai.village.VillageSiege;
|
||||||
@@ -161,7 +148,16 @@ import net.minecraft.world.level.storage.loot.PredicateManager;
|
@@ -161,7 +148,17 @@ import net.minecraft.world.level.storage.loot.LootTables;
|
||||||
|
import net.minecraft.world.level.storage.loot.PredicateManager;
|
||||||
import net.minecraft.world.phys.Vec2;
|
import net.minecraft.world.phys.Vec2;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import org.apache.commons.lang3.Validate;
|
+import org.apache.commons.lang3.Validate;
|
||||||
+import org.galemc.gale.executor.MinecraftServerBlockableEventLoop;
|
+import org.galemc.gale.executor.MinecraftServerBlockableEventLoop;
|
||||||
import org.galemc.gale.configuration.GaleConfigurations;
|
import org.galemc.gale.configuration.GaleConfigurations;
|
||||||
+import org.galemc.gale.executor.annotation.thread.OriginalServerThreadOnly;
|
+import org.galemc.gale.executor.annotation.thread.OriginalServerThreadOnly;
|
||||||
@@ -639,7 +642,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -181,23 +177,26 @@ import net.minecraft.world.level.levelgen.PatrolSpawner;
|
@@ -181,23 +178,26 @@ import net.minecraft.world.level.levelgen.PatrolSpawner;
|
||||||
import net.minecraft.world.level.levelgen.PhantomSpawner;
|
import net.minecraft.world.level.levelgen.PhantomSpawner;
|
||||||
import net.minecraft.world.level.levelgen.WorldDimensions;
|
import net.minecraft.world.level.levelgen.WorldDimensions;
|
||||||
import net.minecraft.world.level.levelgen.presets.WorldPresets;
|
import net.minecraft.world.level.levelgen.presets.WorldPresets;
|
||||||
@@ -674,7 +677,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
public static final String VANILLA_BRAND = "vanilla";
|
public static final String VANILLA_BRAND = "vanilla";
|
||||||
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
|
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
|
||||||
private static final int TICK_STATS_SPAN = 100;
|
private static final int TICK_STATS_SPAN = 100;
|
||||||
@@ -226,6 +225,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -229,6 +229,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
private int port;
|
private int port;
|
||||||
private final LayeredRegistryAccess<RegistryLayer> registries;
|
private final LayeredRegistryAccess<RegistryLayer> registries;
|
||||||
private Map<ResourceKey<Level>, ServerLevel> levels;
|
private Map<ResourceKey<Level>, ServerLevel> levels;
|
||||||
@@ -685,7 +688,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
private PlayerList playerList;
|
private PlayerList playerList;
|
||||||
private volatile boolean running;
|
private volatile boolean running;
|
||||||
private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
||||||
@@ -255,10 +258,114 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -258,10 +262,114 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
private long lastOverloadWarning;
|
private long lastOverloadWarning;
|
||||||
protected final Services services;
|
protected final Services services;
|
||||||
private long lastServerStatus;
|
private long lastServerStatus;
|
||||||
@@ -804,7 +807,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
private final PackRepository packRepository;
|
private final PackRepository packRepository;
|
||||||
private final ServerScoreboard scoreboard;
|
private final ServerScoreboard scoreboard;
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -287,7 +394,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -290,7 +398,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||||
public int autosavePeriod;
|
public int autosavePeriod;
|
||||||
public Commands vanillaCommandDispatcher;
|
public Commands vanillaCommandDispatcher;
|
||||||
@@ -813,7 +816,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
// Spigot start
|
// Spigot start
|
||||||
public static final int TPS = 20;
|
public static final int TPS = 20;
|
||||||
@@ -303,9 +410,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -306,9 +414,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public volatile boolean abnormalExit = false; // Paper
|
public volatile boolean abnormalExit = false; // Paper
|
||||||
public boolean isIteratingOverLevels = false; // Paper
|
public boolean isIteratingOverLevels = false; // Paper
|
||||||
|
|
||||||
@@ -825,7 +828,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
((MinecraftServer) atomicreference.get()).runServer();
|
((MinecraftServer) atomicreference.get()).runServer();
|
||||||
}, "Server thread");
|
}, "Server thread");
|
||||||
|
|
||||||
@@ -324,16 +431,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -327,15 +435,18 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
return s0;
|
return s0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -837,7 +840,6 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
+ // Gale end - base thread pool
|
+ // Gale end - base thread pool
|
||||||
SERVER = this; // Paper - better singleton
|
SERVER = this; // Paper - better singleton
|
||||||
+ isConstructed = true; // Gale - base thread pool
|
+ isConstructed = true; // Gale - base thread pool
|
||||||
this.status = new ServerStatus();
|
|
||||||
this.random = RandomSource.create();
|
this.random = RandomSource.create();
|
||||||
this.port = -1;
|
this.port = -1;
|
||||||
this.levels = Maps.newLinkedHashMap();
|
this.levels = Maps.newLinkedHashMap();
|
||||||
@@ -848,7 +850,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
this.scoreboard = new ServerScoreboard(this);
|
this.scoreboard = new ServerScoreboard(this);
|
||||||
this.customBossEvents = new CustomBossEvents();
|
this.customBossEvents = new CustomBossEvents();
|
||||||
this.frameTimer = new FrameTimer();
|
this.frameTimer = new FrameTimer();
|
||||||
@@ -359,7 +469,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -361,7 +472,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
HolderGetter<Block> holdergetter = this.registries.compositeAccess().registryOrThrow(Registries.BLOCK).asLookup().filterFeatures(this.worldData.enabledFeatures());
|
HolderGetter<Block> holdergetter = this.registries.compositeAccess().registryOrThrow(Registries.BLOCK).asLookup().filterFeatures(this.worldData.enabledFeatures());
|
||||||
|
|
||||||
this.structureTemplateManager = new StructureTemplateManager(worldstem.resourceManager(), convertable_conversionsession, datafixer, holdergetter);
|
this.structureTemplateManager = new StructureTemplateManager(worldstem.resourceManager(), convertable_conversionsession, datafixer, holdergetter);
|
||||||
@@ -860,7 +862,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
this.executor = Util.backgroundExecutor();
|
this.executor = Util.backgroundExecutor();
|
||||||
}
|
}
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -599,7 +712,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -601,7 +715,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.forceDifficulty();
|
this.forceDifficulty();
|
||||||
@@ -869,7 +871,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
this.prepareLevels(worldserver.getChunkSource().chunkMap.progressListener, worldserver);
|
this.prepareLevels(worldserver.getChunkSource().chunkMap.progressListener, worldserver);
|
||||||
//worldserver.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system, not required to "tick" anything
|
//worldserver.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API // Paper - rewrite chunk system, not required to "tick" anything
|
||||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||||
@@ -758,7 +871,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -760,7 +874,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
//ChunkProviderServer chunkproviderserver = worldserver.getChunkProvider(); // Paper - move up
|
//ChunkProviderServer chunkproviderserver = worldserver.getChunkProvider(); // Paper - move up
|
||||||
|
|
||||||
chunkproviderserver.getLightEngine().setTaskPerBatch(500);
|
chunkproviderserver.getLightEngine().setTaskPerBatch(500);
|
||||||
@@ -878,7 +880,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
// Paper start - configurable spawn reason
|
// Paper start - configurable spawn reason
|
||||||
int radiusBlocks = worldserver.paperConfig().spawn.keepSpawnLoadedRange * 16;
|
int radiusBlocks = worldserver.paperConfig().spawn.keepSpawnLoadedRange * 16;
|
||||||
int radiusChunks = radiusBlocks / 16 + ((radiusBlocks & 15) != 0 ? 1 : 0);
|
int radiusChunks = radiusBlocks / 16 + ((radiusBlocks & 15) != 0 ? 1 : 0);
|
||||||
@@ -802,6 +915,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -804,6 +918,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
worldserver.setSpawnSettings(worldserver.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && ((DedicatedServer) this).settings.getProperties().spawnMonsters, this.isSpawningAnimals()); // Paper - per level difficulty (from setDifficulty(ServerLevel, Difficulty, boolean))
|
worldserver.setSpawnSettings(worldserver.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && ((DedicatedServer) this).settings.getProperties().spawnMonsters, this.isSpawningAnimals()); // Paper - per level difficulty (from setDifficulty(ServerLevel, Difficulty, boolean))
|
||||||
|
|
||||||
this.forceTicks = false;
|
this.forceTicks = false;
|
||||||
@@ -890,7 +892,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -828,8 +946,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -830,8 +949,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
// Paper end - rewrite chunk system - add close param
|
// Paper end - rewrite chunk system - add close param
|
||||||
boolean flag3 = false;
|
boolean flag3 = false;
|
||||||
|
|
||||||
@@ -905,7 +907,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
|
|
||||||
if (!suppressLogs) {
|
if (!suppressLogs) {
|
||||||
MinecraftServer.LOGGER.info("Saving chunks for level '{}'/{}", worldserver, worldserver.dimension().location());
|
MinecraftServer.LOGGER.info("Saving chunks for level '{}'/{}", worldserver, worldserver.dimension().location());
|
||||||
@@ -853,14 +975,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -855,14 +978,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
*/
|
*/
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (flush) {
|
if (flush) {
|
||||||
@@ -920,7 +922,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
MinecraftServer.LOGGER.info("ThreadedAnvilChunkStorage: All dimensions are saved");
|
MinecraftServer.LOGGER.info("ThreadedAnvilChunkStorage: All dimensions are saved");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -887,7 +1001,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -889,7 +1004,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -929,7 +931,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
public volatile boolean hasFullyShutdown = false; // Paper
|
public volatile boolean hasFullyShutdown = false; // Paper
|
||||||
private boolean hasLoggedStop = false; // Paper
|
private boolean hasLoggedStop = false; // Paper
|
||||||
private final Object stopLock = new Object();
|
private final Object stopLock = new Object();
|
||||||
@@ -916,8 +1030,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -918,8 +1033,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
*/
|
*/
|
||||||
MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER - If you think this is a Gale bug, please report it at https://github.com/GaleMC/Gale/issues )");
|
MinecraftServer.LOGGER.info("Stopping main thread (Ignore any thread death message you see! - DO NOT REPORT THREAD DEATH TO PAPER - If you think this is a Gale bug, please report it at https://github.com/GaleMC/Gale/issues )");
|
||||||
// Gale end - branding changes
|
// Gale end - branding changes
|
||||||
@@ -942,7 +944,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
try {
|
try {
|
||||||
Thread.sleep(1);
|
Thread.sleep(1);
|
||||||
} catch (InterruptedException e) {}
|
} catch (InterruptedException e) {}
|
||||||
@@ -948,12 +1064,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -950,12 +1067,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
MinecraftServer.LOGGER.info("Saving worlds");
|
MinecraftServer.LOGGER.info("Saving worlds");
|
||||||
@@ -956,7 +958,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
if (worldserver != null) {
|
if (worldserver != null) {
|
||||||
worldserver.noSave = false;
|
worldserver.noSave = false;
|
||||||
}
|
}
|
||||||
@@ -1017,7 +1128,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1019,7 +1131,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
this.running = false;
|
this.running = false;
|
||||||
if (waitForShutdown) {
|
if (waitForShutdown) {
|
||||||
try {
|
try {
|
||||||
@@ -965,7 +967,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
} catch (InterruptedException interruptedexception) {
|
} catch (InterruptedException interruptedexception) {
|
||||||
MinecraftServer.LOGGER.error("Error while shutting down", interruptedexception);
|
MinecraftServer.LOGGER.error("Error while shutting down", interruptedexception);
|
||||||
}
|
}
|
||||||
@@ -1091,6 +1202,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1093,6 +1205,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
public static long lastTickOversleepTime;
|
public static long lastTickOversleepTime;
|
||||||
// Gale end - YAPFA - last tick time
|
// Gale end - YAPFA - last tick time
|
||||||
|
|
||||||
@@ -973,16 +975,16 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
protected void runServer() {
|
protected void runServer() {
|
||||||
try {
|
try {
|
||||||
long serverStartTime = Util.getNanos(); // Paper
|
long serverStartTime = Util.getNanos(); // Paper
|
||||||
@@ -1098,7 +1210,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1100,7 +1213,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
throw new IllegalStateException("Failed to initialize server");
|
throw new IllegalStateException("Failed to initialize server");
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.nextTickTime = Util.getMillis();
|
- this.nextTickTime = Util.getMillis();
|
||||||
+ this.setNextTickTime(Util.getMillis()); // Gale - base thread pool
|
+ this.setNextTickTime(Util.getMillis()); // Gale - base thread pool
|
||||||
this.status.setDescription(Component.literal(this.motd));
|
this.statusIcon = (ServerStatus.Favicon) this.loadStatusIcon().orElse(null); // CraftBukkit - decompile error
|
||||||
this.status.setVersion(new ServerStatus.Version(SharedConstants.getCurrentVersion().getName(), SharedConstants.getCurrentVersion().getProtocolVersion()));
|
this.status = this.buildServerStatus();
|
||||||
this.status.setEnforcesSecureChat(this.enforceSecureProfile());
|
|
||||||
@@ -1135,7 +1247,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1135,7 +1248,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
if (this.server.getWarnOnOverload()) // CraftBukkit
|
if (this.server.getWarnOnOverload()) // CraftBukkit
|
||||||
MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
|
MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", i, j);
|
||||||
@@ -991,7 +993,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
this.lastOverloadWarning = this.nextTickTime;
|
this.lastOverloadWarning = this.nextTickTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1159,12 +1271,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1159,12 +1272,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
//MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit // Paper - don't overwrite current tick time
|
||||||
lastTick = curTime;
|
lastTick = curTime;
|
||||||
@@ -1006,7 +1008,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
this.waitUntilNextTick();
|
this.waitUntilNextTick();
|
||||||
this.isReady = true;
|
this.isReady = true;
|
||||||
JvmProfiler.INSTANCE.onServerTick(this.averageTickTime);
|
JvmProfiler.INSTANCE.onServerTick(this.averageTickTime);
|
||||||
@@ -1245,7 +1356,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1245,7 +1357,46 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
return crashreport;
|
return crashreport;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1054,7 +1056,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
// Paper start
|
// Paper start
|
||||||
if (this.forceTicks) {
|
if (this.forceTicks) {
|
||||||
return true;
|
return true;
|
||||||
@@ -1253,13 +1403,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1253,13 +1404,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
// Paper end
|
// Paper end
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (isOversleep) return canOversleep();// Paper - because of our changes, this logic is broken
|
if (isOversleep) return canOversleep();// Paper - because of our changes, this logic is broken
|
||||||
@@ -1071,7 +1073,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean canSleepForTickNoOversleep() {
|
private boolean canSleepForTickNoOversleep() {
|
||||||
@@ -1268,7 +1418,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1268,7 +1419,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
private void executeModerately() {
|
private void executeModerately() {
|
||||||
@@ -1080,7 +1082,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
@@ -1276,61 +1426,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1276,61 +1427,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
protected void waitUntilNextTick() {
|
protected void waitUntilNextTick() {
|
||||||
//this.executeAll(); // Paper - move this into the tick method for timings
|
//this.executeAll(); // Paper - move this into the tick method for timings
|
||||||
long tickOversleepStart = System.nanoTime(); // Gale - YAPFA - last tick time
|
long tickOversleepStart = System.nanoTime(); // Gale - YAPFA - last tick time
|
||||||
@@ -1147,10 +1149,10 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
- super.doRunTask(ticktask);
|
- super.doRunTask(ticktask);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
private void updateStatusIcon(ServerStatus metadata) {
|
private Optional<ServerStatus.Favicon> loadStatusIcon() {
|
||||||
Optional<File> optional = Optional.of(this.getFile("server-icon.png")).filter(File::isFile);
|
Optional<Path> optional = Optional.of(this.getFile("server-icon.png").toPath()).filter((path) -> {
|
||||||
|
return Files.isRegularFile(path, new LinkOption[0]);
|
||||||
@@ -1378,14 +1487,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1375,14 +1485,19 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
|
|
||||||
// Paper start - move oversleep into full server tick
|
// Paper start - move oversleep into full server tick
|
||||||
isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
|
isOversleep = true;MinecraftTimings.serverOversleep.startTiming();
|
||||||
@@ -1170,7 +1172,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
this.tickChildren(shouldKeepTicking);
|
this.tickChildren(shouldKeepTicking);
|
||||||
if (i - this.lastServerStatus >= 5000000000L) {
|
if (i - this.lastServerStatus >= 5000000000L) {
|
||||||
this.lastServerStatus = i;
|
this.lastServerStatus = i;
|
||||||
@@ -1420,7 +1534,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1400,7 +1515,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
if (playerSaveInterval > 0) {
|
if (playerSaveInterval > 0) {
|
||||||
this.playerList.saveAll(playerSaveInterval);
|
this.playerList.saveAll(playerSaveInterval);
|
||||||
}
|
}
|
||||||
@@ -1179,7 +1181,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
if (level.paperConfig().chunks.autoSaveInterval.value() > 0) {
|
if (level.paperConfig().chunks.autoSaveInterval.value() > 0) {
|
||||||
level.saveIncrementally(fullSave);
|
level.saveIncrementally(fullSave);
|
||||||
}
|
}
|
||||||
@@ -1432,7 +1546,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1412,7 +1527,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||||
// Paper start - move executeAll() into full server tick timing
|
// Paper start - move executeAll() into full server tick timing
|
||||||
try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
|
try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) {
|
||||||
@@ -1188,7 +1190,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
// Paper start
|
// Paper start
|
||||||
@@ -1476,7 +1590,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1484,7 +1599,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||||
// Paper start - optimize time updates
|
// Paper start - optimize time updates
|
||||||
@@ -1197,7 +1199,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
final boolean doDaylight = world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT);
|
final boolean doDaylight = world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT);
|
||||||
final long dayTime = world.getDayTime();
|
final long dayTime = world.getDayTime();
|
||||||
long worldTime = world.getGameTime();
|
long worldTime = world.getGameTime();
|
||||||
@@ -1496,9 +1610,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1504,9 +1619,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
|
||||||
|
|
||||||
this.isIteratingOverLevels = true; // Paper
|
this.isIteratingOverLevels = true; // Paper
|
||||||
@@ -1206,9 +1208,9 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
- ServerLevel worldserver = (ServerLevel) iterator.next();
|
- ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||||
+ for (ServerLevel worldserver : this.getAllLevelsArray()) { // Paper - move down // Gale - base thread pool - optimize server levels
|
+ for (ServerLevel worldserver : this.getAllLevelsArray()) { // Paper - move down // Gale - base thread pool - optimize server levels
|
||||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
|
||||||
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
||||||
@@ -1569,7 +1681,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||||
|
@@ -1594,7 +1707,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isShutdown() {
|
public boolean isShutdown() {
|
||||||
@@ -1217,7 +1219,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
}
|
}
|
||||||
|
|
||||||
public File getFile(String path) {
|
public File getFile(String path) {
|
||||||
@@ -1577,7 +1689,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1602,7 +1715,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public final ServerLevel overworld() {
|
public final ServerLevel overworld() {
|
||||||
@@ -1231,7 +1233,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -1591,6 +1708,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1616,6 +1734,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
Map<ResourceKey<Level>, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels);
|
Map<ResourceKey<Level>, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels);
|
||||||
newLevels.put(level.dimension(), level);
|
newLevels.put(level.dimension(), level);
|
||||||
this.levels = Collections.unmodifiableMap(newLevels);
|
this.levels = Collections.unmodifiableMap(newLevels);
|
||||||
@@ -1245,7 +1247,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void removeLevel(ServerLevel level) {
|
public void removeLevel(ServerLevel level) {
|
||||||
@@ -1598,6 +1722,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1623,6 +1748,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
Map<ResourceKey<Level>, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels);
|
Map<ResourceKey<Level>, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels);
|
||||||
newLevels.remove(level.dimension());
|
newLevels.remove(level.dimension());
|
||||||
this.levels = Collections.unmodifiableMap(newLevels);
|
this.levels = Collections.unmodifiableMap(newLevels);
|
||||||
@@ -1260,7 +1262,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
@@ -1605,8 +1737,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1630,8 +1763,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
return this.levels.keySet();
|
return this.levels.keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1276,7 +1278,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getServerVersion() {
|
public String getServerVersion() {
|
||||||
@@ -1726,10 +1864,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1751,10 +1890,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateMobSpawningFlags() {
|
private void updateMobSpawningFlags() {
|
||||||
@@ -1288,7 +1290,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
|
|
||||||
worldserver.setSpawnSettings(worldserver.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && ((DedicatedServer) this).settings.getProperties().spawnMonsters, this.isSpawningAnimals()); // Paper - per level difficulty (from setDifficulty(ServerLevel, Difficulty, boolean))
|
worldserver.setSpawnSettings(worldserver.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && ((DedicatedServer) this).settings.getProperties().spawnMonsters, this.isSpawningAnimals()); // Paper - per level difficulty (from setDifficulty(ServerLevel, Difficulty, boolean))
|
||||||
}
|
}
|
||||||
@@ -1928,25 +2063,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -1954,25 +2090,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
return 29999984;
|
return 29999984;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1314,7 +1316,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
public int getCompressionThreshold() {
|
public int getCompressionThreshold() {
|
||||||
return 256;
|
return 256;
|
||||||
}
|
}
|
||||||
@@ -2013,7 +2129,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2038,7 +2155,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
net.minecraft.world.item.alchemy.PotionBrewing.reload(); // Paper
|
net.minecraft.world.item.alchemy.PotionBrewing.reload(); // Paper
|
||||||
new io.papermc.paper.event.server.ServerResourcesReloadedEvent(cause).callEvent(); // Paper
|
new io.papermc.paper.event.server.ServerResourcesReloadedEvent(cause).callEvent(); // Paper
|
||||||
// Paper start
|
// Paper start
|
||||||
@@ -1323,7 +1325,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// this.getPlayerList().saveAll(); // Paper - we don't need to save everything, just advancements
|
// this.getPlayerList().saveAll(); // Paper - we don't need to save everything, just advancements
|
||||||
@@ -2246,7 +2362,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2271,7 +2388,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
BufferedWriter bufferedwriter = Files.newBufferedWriter(path);
|
BufferedWriter bufferedwriter = Files.newBufferedWriter(path);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -1332,7 +1334,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
bufferedwriter.write(String.format(Locale.ROOT, "average_tick_time: %f\n", this.getAverageTickTime()));
|
bufferedwriter.write(String.format(Locale.ROOT, "average_tick_time: %f\n", this.getAverageTickTime()));
|
||||||
bufferedwriter.write(String.format(Locale.ROOT, "tick_times: %s\n", Arrays.toString(this.tickTimes)));
|
bufferedwriter.write(String.format(Locale.ROOT, "tick_times: %s\n", Arrays.toString(this.tickTimes)));
|
||||||
bufferedwriter.write(String.format(Locale.ROOT, "queue: %s\n", Util.backgroundExecutor()));
|
bufferedwriter.write(String.format(Locale.ROOT, "queue: %s\n", Util.backgroundExecutor()));
|
||||||
@@ -2432,7 +2548,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2457,7 +2574,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -1340,7 +1342,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
public boolean isSameThread() {
|
public boolean isSameThread() {
|
||||||
return io.papermc.paper.util.TickThread.isTickThread(); // Paper - rewrite chunk system
|
return io.papermc.paper.util.TickThread.isTickThread(); // Paper - rewrite chunk system
|
||||||
}
|
}
|
||||||
@@ -2570,7 +2685,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2595,7 +2711,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
// give all worlds a fair chance at by targetting them all.
|
// give all worlds a fair chance at by targetting them all.
|
||||||
// if we execute too many tasks, that's fine - we have logic to correctly handle overuse of allocated time.
|
// if we execute too many tasks, that's fine - we have logic to correctly handle overuse of allocated time.
|
||||||
boolean executed = false;
|
boolean executed = false;
|
||||||
@@ -1349,7 +1351,7 @@ index eb951c9fda85d9620d3038a3db22d578db45e878..f423f6322b6cbb7b73074f84debc8333
|
|||||||
long currTime = System.nanoTime();
|
long currTime = System.nanoTime();
|
||||||
if (currTime - world.lastMidTickExecuteFailure <= TASK_EXECUTION_FAILURE_BACKOFF) {
|
if (currTime - world.lastMidTickExecuteFailure <= TASK_EXECUTION_FAILURE_BACKOFF) {
|
||||||
continue;
|
continue;
|
||||||
@@ -2587,6 +2702,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -2612,6 +2728,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
}
|
}
|
||||||
|
|
||||||
public final void executeMidTickTasks() {
|
public final void executeMidTickTasks() {
|
||||||
@@ -1432,7 +1434,7 @@ index df4db98618c6c9261b4ec8e2987c4ed26af4bd4b..83a57b9bc59063ed8299f98bc33e14b5
|
|||||||
public class ServerChunkCache extends ChunkSource {
|
public class ServerChunkCache extends ChunkSource {
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 37e0b6212fec71ec9662e6be3b1e8bea487eb4a6..e7747b19685fd943d7fbefbfef656f8bb7c359f1 100644
|
index cc63a82665b2c5a918040a16dd97644edcd3c55f..1eb09eb8c5c0f46d87441c5f0aed42d1a0ebbf5a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -22,6 +22,8 @@ import java.io.Writer;
|
@@ -22,6 +22,8 @@ import java.io.Writer;
|
||||||
@@ -1453,7 +1455,7 @@ index 37e0b6212fec71ec9662e6be3b1e8bea487eb4a6..e7747b19685fd943d7fbefbfef656f8b
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
@@ -189,6 +193,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -185,6 +189,10 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
private static final int MAX_SCHEDULED_TICKS_PER_TICK = 65536;
|
private static final int MAX_SCHEDULED_TICKS_PER_TICK = 65536;
|
||||||
final List<ServerPlayer> players;
|
final List<ServerPlayer> players;
|
||||||
public final ServerChunkCache chunkSource;
|
public final ServerChunkCache chunkSource;
|
||||||
@@ -1464,7 +1466,7 @@ index 37e0b6212fec71ec9662e6be3b1e8bea487eb4a6..e7747b19685fd943d7fbefbfef656f8b
|
|||||||
private final MinecraftServer server;
|
private final MinecraftServer server;
|
||||||
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
|
public final PrimaryLevelData serverLevelData; // CraftBukkit - type
|
||||||
final EntityTickList entityTickList;
|
final EntityTickList entityTickList;
|
||||||
@@ -2558,7 +2566,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -2556,7 +2564,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
// Spigot start
|
// Spigot start
|
||||||
if ( entity instanceof Player )
|
if ( entity instanceof Player )
|
||||||
{
|
{
|
||||||
@@ -1474,10 +1476,10 @@ index 37e0b6212fec71ec9662e6be3b1e8bea487eb4a6..e7747b19685fd943d7fbefbfef656f8b
|
|||||||
for (Object o : worldData.cache.values() )
|
for (Object o : worldData.cache.values() )
|
||||||
{
|
{
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848e0251686 100644
|
index 25a8d3a1302c36f46eb3e0f9a5a532a329165fd7..1268cc3bb5106241df9af63230b6f13a479b43c9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -185,8 +185,9 @@ import net.minecraft.world.phys.shapes.BooleanOp;
|
@@ -187,8 +187,9 @@ import net.minecraft.world.phys.shapes.BooleanOp;
|
||||||
import net.minecraft.world.phys.shapes.Shapes;
|
import net.minecraft.world.phys.shapes.Shapes;
|
||||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
|
import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
|
||||||
@@ -1488,7 +1490,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
@@ -552,7 +553,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -554,7 +555,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
Objects.requireNonNull(this.connection);
|
Objects.requireNonNull(this.connection);
|
||||||
// CraftBukkit - Don't wait
|
// CraftBukkit - Don't wait
|
||||||
@@ -1497,7 +1499,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
}
|
}
|
||||||
|
|
||||||
private <T, R> CompletableFuture<R> filterTextPacket(T text, BiFunction<TextFilter, T, CompletableFuture<R>> filterer) {
|
private <T, R> CompletableFuture<R> filterTextPacket(T text, BiFunction<TextFilter, T, CompletableFuture<R>> filterer) {
|
||||||
@@ -891,13 +892,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -893,13 +894,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
|
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
|
if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable
|
||||||
@@ -1513,7 +1515,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
@@ -922,7 +923,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -924,7 +925,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
if (!event.isHandled()) {
|
if (!event.isHandled()) {
|
||||||
if (!event.isCancelled()) {
|
if (!event.isCancelled()) {
|
||||||
|
|
||||||
@@ -1522,7 +1524,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
|
ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
|
||||||
|
|
||||||
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
||||||
@@ -933,7 +934,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -935,7 +936,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
this.connection.send(new ClientboundCommandSuggestionsPacket(packet.getId(), suggestEvent.getSuggestions()));
|
this.connection.send(new ClientboundCommandSuggestionsPacket(packet.getId(), suggestEvent.getSuggestions()));
|
||||||
// Paper end - Brigadier API
|
// Paper end - Brigadier API
|
||||||
});
|
});
|
||||||
@@ -1531,7 +1533,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
}
|
}
|
||||||
} else if (!completions.isEmpty()) {
|
} else if (!completions.isEmpty()) {
|
||||||
final com.mojang.brigadier.suggestion.SuggestionsBuilder builder0 = new com.mojang.brigadier.suggestion.SuggestionsBuilder(command, stringreader.getTotalLength());
|
final com.mojang.brigadier.suggestion.SuggestionsBuilder builder0 = new com.mojang.brigadier.suggestion.SuggestionsBuilder(command, stringreader.getTotalLength());
|
||||||
@@ -1247,7 +1248,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1249,7 +1250,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
|
int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length;
|
||||||
if (byteLength > 256 * 4) {
|
if (byteLength > 256 * 4) {
|
||||||
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!");
|
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!");
|
||||||
@@ -1540,7 +1542,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
byteTotal += byteLength;
|
byteTotal += byteLength;
|
||||||
@@ -1270,14 +1271,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -1272,14 +1273,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
|
|
||||||
if (byteTotal > byteAllowed) {
|
if (byteTotal > byteAllowed) {
|
||||||
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size());
|
ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size());
|
||||||
@@ -1557,7 +1559,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.lastBookTick = MinecraftServer.currentTick;
|
this.lastBookTick = MinecraftServer.currentTick;
|
||||||
@@ -2081,10 +2082,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2071,10 +2072,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
public void handleTeleportToEntityPacket(ServerboundTeleportToEntityPacket packet) {
|
public void handleTeleportToEntityPacket(ServerboundTeleportToEntityPacket packet) {
|
||||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||||
if (this.player.isSpectator()) {
|
if (this.player.isSpectator()) {
|
||||||
@@ -1569,7 +1571,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
Entity entity = packet.getEntity(worldserver);
|
Entity entity = packet.getEntity(worldserver);
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
@@ -2233,9 +2231,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2225,9 +2223,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) {
|
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) {
|
||||||
@@ -1581,7 +1583,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
} else {
|
} else {
|
||||||
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages());
|
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages());
|
||||||
|
|
||||||
@@ -2269,9 +2267,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2261,9 +2259,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
@Override
|
@Override
|
||||||
public void handleChatCommand(ServerboundChatCommandPacket packet) {
|
public void handleChatCommand(ServerboundChatCommandPacket packet) {
|
||||||
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
|
if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) {
|
||||||
@@ -1593,7 +1595,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
} else {
|
} else {
|
||||||
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages());
|
Optional<LastSeenMessages> optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages());
|
||||||
|
|
||||||
@@ -2353,9 +2351,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -2345,9 +2343,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
private Optional<LastSeenMessages> tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) {
|
||||||
if (!this.updateChatOrder(timestamp)) {
|
if (!this.updateChatOrder(timestamp)) {
|
||||||
if (GaleGlobalConfiguration.get().logToConsole.chat.outOfOrderMessageWarning) ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper // Gale - do not log out-of-order message warnings
|
if (GaleGlobalConfiguration.get().logToConsole.chat.outOfOrderMessageWarning) ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper // Gale - do not log out-of-order message warnings
|
||||||
@@ -1604,9 +1606,9 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
+ this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause
|
+ this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause
|
||||||
+ }, ScheduledServerThreadTaskQueues.KICK_FOR_OUT_OF_ORDER_CHAT_PACKET_TASK_MAX_DELAY); // Paper - push to main // Gale - base thread pool
|
+ }, ScheduledServerThreadTaskQueues.KICK_FOR_OUT_OF_ORDER_CHAT_PACKET_TASK_MAX_DELAY); // Paper - push to main // Gale - base thread pool
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
} else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
|
} else {
|
||||||
this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
|
Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(acknowledgment);
|
||||||
@@ -3296,7 +3294,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -3310,7 +3308,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
// Paper start
|
// Paper start
|
||||||
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||||
if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) {
|
||||||
@@ -1616,7 +1618,7 @@ index e000da425ba28330d1edcce3948d2becb39d2bd3..27b6cf330216bc6e41b67940ed6aa848
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
index 6f139e6cbb61bfb2be9b8b886bec7cddbb2c8993..0cbef825129b173a5244a195ea68444c216c0b1b 100644
|
index d4323c23f58acda56fe270f34c2eb4658fec0b55..37aa57b425564ba436f202d0ff3709764a5dab05 100644
|
||||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||||
@@ -15,7 +15,6 @@ import java.net.SocketAddress;
|
@@ -15,7 +15,6 @@ import java.net.SocketAddress;
|
||||||
@@ -1627,7 +1629,7 @@ index 6f139e6cbb61bfb2be9b8b886bec7cddbb2c8993..0cbef825129b173a5244a195ea68444c
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
@@ -105,10 +104,10 @@ import net.minecraft.world.scores.PlayerTeam;
|
@@ -106,10 +105,10 @@ import net.minecraft.world.scores.PlayerTeam;
|
||||||
import net.minecraft.world.scores.Scoreboard; // Paper
|
import net.minecraft.world.scores.Scoreboard; // Paper
|
||||||
import net.minecraft.world.scores.Team;
|
import net.minecraft.world.scores.Team;
|
||||||
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
import org.galemc.gale.configuration.GaleGlobalConfiguration;
|
||||||
@@ -1639,7 +1641,7 @@ index 6f139e6cbb61bfb2be9b8b886bec7cddbb2c8993..0cbef825129b173a5244a195ea68444c
|
|||||||
import net.minecraft.server.dedicated.DedicatedServer;
|
import net.minecraft.server.dedicated.DedicatedServer;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
@@ -255,7 +254,7 @@ public abstract class PlayerList {
|
@@ -256,7 +255,7 @@ public abstract class PlayerList {
|
||||||
|
|
||||||
// Gale start - MultiPaper - do not place player in world if kicked before being spawned in
|
// Gale start - MultiPaper - do not place player in world if kicked before being spawned in
|
||||||
if (!connection.isConnected() || player.quitReason != null) {
|
if (!connection.isConnected() || player.quitReason != null) {
|
||||||
@@ -1648,7 +1650,7 @@ index 6f139e6cbb61bfb2be9b8b886bec7cddbb2c8993..0cbef825129b173a5244a195ea68444c
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Gale end - MultiPaper - do not place player in world if kicked before being spawned in
|
// Gale end - MultiPaper - do not place player in world if kicked before being spawned in
|
||||||
@@ -296,6 +295,58 @@ public abstract class PlayerList {
|
@@ -297,6 +296,58 @@ public abstract class PlayerList {
|
||||||
player.getRecipeBook().sendInitialRecipeBook(player);
|
player.getRecipeBook().sendInitialRecipeBook(player);
|
||||||
this.updateEntireScoreboard(worldserver1.getScoreboard(), player);
|
this.updateEntireScoreboard(worldserver1.getScoreboard(), player);
|
||||||
this.server.invalidateStatus();
|
this.server.invalidateStatus();
|
||||||
@@ -1707,7 +1709,7 @@ index 6f139e6cbb61bfb2be9b8b886bec7cddbb2c8993..0cbef825129b173a5244a195ea68444c
|
|||||||
MutableComponent ichatmutablecomponent;
|
MutableComponent ichatmutablecomponent;
|
||||||
|
|
||||||
if (player.getGameProfile().getName().equalsIgnoreCase(s)) {
|
if (player.getGameProfile().getName().equalsIgnoreCase(s)) {
|
||||||
@@ -1523,10 +1574,8 @@ public abstract class PlayerList {
|
@@ -1531,10 +1582,8 @@ public abstract class PlayerList {
|
||||||
public void setViewDistance(int viewDistance) {
|
public void setViewDistance(int viewDistance) {
|
||||||
this.viewDistance = viewDistance;
|
this.viewDistance = viewDistance;
|
||||||
//this.broadcastAll(new ClientboundSetChunkCacheRadiusPacket(viewDistance)); // Paper - move into setViewDistance
|
//this.broadcastAll(new ClientboundSetChunkCacheRadiusPacket(viewDistance)); // Paper - move into setViewDistance
|
||||||
@@ -1719,7 +1721,7 @@ index 6f139e6cbb61bfb2be9b8b886bec7cddbb2c8993..0cbef825129b173a5244a195ea68444c
|
|||||||
|
|
||||||
if (worldserver != null) {
|
if (worldserver != null) {
|
||||||
worldserver.getChunkSource().setViewDistance(viewDistance);
|
worldserver.getChunkSource().setViewDistance(viewDistance);
|
||||||
@@ -1538,10 +1587,8 @@ public abstract class PlayerList {
|
@@ -1546,10 +1595,8 @@ public abstract class PlayerList {
|
||||||
public void setSimulationDistance(int simulationDistance) {
|
public void setSimulationDistance(int simulationDistance) {
|
||||||
this.simulationDistance = simulationDistance;
|
this.simulationDistance = simulationDistance;
|
||||||
//this.broadcastAll(new ClientboundSetSimulationDistancePacket(simulationDistance)); // Paper - handled by playerchunkloader
|
//this.broadcastAll(new ClientboundSetSimulationDistancePacket(simulationDistance)); // Paper - handled by playerchunkloader
|
||||||
@@ -1786,10 +1788,10 @@ index 83701fbfaa56a232593ee8f11a3afb8941238bfa..392e7b4a89669f16b32043b65b69e659
|
|||||||
this.execute(runnable);
|
this.execute(runnable);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
index 93f722537a6b479561d79ba2e980c50a324f9486..728f52999ea980ea2cef97ba80d3da96dffac7d8 100644
|
index 64f6555372ba5c97891fd6742f51fa6680c690a2..9582050566c5afc4e0fc40f5d74b653e77f9aa28 100644
|
||||||
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
||||||
@@ -98,7 +98,7 @@ public abstract class Projectile extends Entity {
|
@@ -100,7 +100,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
||||||
this.cachedOwner = ((ServerLevel) this.level).getEntity(this.ownerUUID);
|
this.cachedOwner = ((ServerLevel) this.level).getEntity(this.ownerUUID);
|
||||||
// Paper start - check all worlds
|
// Paper start - check all worlds
|
||||||
if (this.cachedOwner == null) {
|
if (this.cachedOwner == null) {
|
||||||
@@ -1799,10 +1801,10 @@ index 93f722537a6b479561d79ba2e980c50a324f9486..728f52999ea980ea2cef97ba80d3da96
|
|||||||
final Entity entity = level.getEntity(this.ownerUUID);
|
final Entity entity = level.getEntity(this.ownerUUID);
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index dc5020580d1a26f1fcb31af2fd272e5d8bcaa480..a618eb60a7f6af1174e9cf1428fdd1cddceaf56d 100644
|
index 931fcce46f3941af772416f39229ed4abc7f8301..8605f089a40c56f52f1d2df28af0704677623671 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -987,7 +987,7 @@ public final class CraftServer implements Server {
|
@@ -963,7 +963,7 @@ public final class CraftServer implements Server {
|
||||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||||
this.console.galeConfigurations.reloadConfigs(this.console); // Gale - Gale configuration
|
this.console.galeConfigurations.reloadConfigs(this.console); // Gale - Gale configuration
|
||||||
@@ -1811,7 +1813,7 @@ index dc5020580d1a26f1fcb31af2fd272e5d8bcaa480..a618eb60a7f6af1174e9cf1428fdd1cd
|
|||||||
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
|
||||||
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
|
||||||
|
|
||||||
@@ -1171,7 +1171,7 @@ public final class CraftServer implements Server {
|
@@ -1148,7 +1148,7 @@ public final class CraftServer implements Server {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public World createWorld(WorldCreator creator) {
|
public World createWorld(WorldCreator creator) {
|
||||||
@@ -1820,7 +1822,7 @@ index dc5020580d1a26f1fcb31af2fd272e5d8bcaa480..a618eb60a7f6af1174e9cf1428fdd1cd
|
|||||||
//Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot create a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes.
|
//Preconditions.checkState(!this.console.isIteratingOverLevels, "Cannot create a world while worlds are being ticked"); // Paper - Cat - Temp disable. We'll see how this goes.
|
||||||
Validate.notNull(creator, "Creator may not be null");
|
Validate.notNull(creator, "Creator may not be null");
|
||||||
|
|
||||||
@@ -2527,7 +2527,7 @@ public final class CraftServer implements Server {
|
@@ -2507,7 +2507,7 @@ public final class CraftServer implements Server {
|
||||||
public Entity getEntity(UUID uuid) {
|
public Entity getEntity(UUID uuid) {
|
||||||
Validate.notNull(uuid, "UUID cannot be null");
|
Validate.notNull(uuid, "UUID cannot be null");
|
||||||
|
|
||||||
@@ -1830,7 +1832,7 @@ index dc5020580d1a26f1fcb31af2fd272e5d8bcaa480..a618eb60a7f6af1174e9cf1428fdd1cd
|
|||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
return entity.getBukkitEntity();
|
return entity.getBukkitEntity();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 54932d92b13b890b07f827c5f09bd137383d4ab5..9d7da4fcf4ab450b6f3d53a07c299884fe29cda0 100644
|
index 5e9055fdf411029ea2fed91acd6b981f79156418..5d4a68d05739414c7fd798fcfeb7567898bb42c9 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -5,7 +5,6 @@ import com.google.common.base.Predicates;
|
@@ -5,7 +5,6 @@ import com.google.common.base.Predicates;
|
||||||
@@ -1880,18 +1882,18 @@ index 54932d92b13b890b07f827c5f09bd137383d4ab5..9d7da4fcf4ab450b6f3d53a07c299884
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index 78f53ee557276de85f0431ebcb146445b1f4fb92..6176867eea06c53882dcaacfbde0334b39b903cc 100644
|
index 57a0dbb23a32123d30c3b3572f4d129be9d97847..9dbfb5cb3b5b0bfa7a6b0dc871e86871e7f1b315 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -190,6 +190,7 @@ import org.bukkit.plugin.Plugin;
|
@@ -191,6 +191,7 @@ import org.bukkit.plugin.Plugin;
|
||||||
import org.bukkit.util.BoundingBox;
|
import org.bukkit.util.BoundingBox;
|
||||||
import org.bukkit.util.NumberConversions;
|
import org.bukkit.util.NumberConversions;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
+import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues;
|
+import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues;
|
||||||
|
|
||||||
public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||||
private static PermissibleBase perm;
|
|
||||||
@@ -1280,7 +1281,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -1318,7 +1319,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
for (net.minecraft.world.level.chunk.ChunkAccess chunk : list) {
|
for (net.minecraft.world.level.chunk.ChunkAccess chunk : list) {
|
||||||
chunkProviderServer.addTicketAtLevel(net.minecraft.server.level.TicketType.POST_TELEPORT, chunk.getPos(), 33, CraftEntity.this.getEntityId());
|
chunkProviderServer.addTicketAtLevel(net.minecraft.server.level.TicketType.POST_TELEPORT, chunk.getPos(), 33, CraftEntity.this.getEntityId());
|
||||||
}
|
}
|
||||||
@@ -1900,7 +1902,7 @@ index 78f53ee557276de85f0431ebcb146445b1f4fb92..6176867eea06c53882dcaacfbde0334b
|
|||||||
try {
|
try {
|
||||||
ret.complete(CraftEntity.this.teleport(locationClone, cause) ? Boolean.TRUE : Boolean.FALSE);
|
ret.complete(CraftEntity.this.teleport(locationClone, cause) ? Boolean.TRUE : Boolean.FALSE);
|
||||||
} catch (Throwable throwable) {
|
} catch (Throwable throwable) {
|
||||||
@@ -1290,7 +1291,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -1328,7 +1329,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
net.minecraft.server.MinecraftServer.LOGGER.error("Failed to teleport entity " + CraftEntity.this, throwable);
|
net.minecraft.server.MinecraftServer.LOGGER.error("Failed to teleport entity " + CraftEntity.this, throwable);
|
||||||
ret.completeExceptionally(throwable);
|
ret.completeExceptionally(throwable);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||||
index ef633f7d1d48f8c2447c7d191f31ec646d641dca..e80a3bc48dfae7fcb22a9f4403a1fd8ef7852a58 100644
|
index fddbb312444fdc561c3795076c2874c195f29473..112a27b70079516887707d89d40f1bad16ac2a57 100644
|
||||||
--- a/build.gradle.kts
|
--- a/build.gradle.kts
|
||||||
+++ b/build.gradle.kts
|
+++ b/build.gradle.kts
|
||||||
@@ -15,6 +15,7 @@ dependencies {
|
@@ -15,6 +15,7 @@ dependencies {
|
||||||
@@ -25,8 +25,8 @@ index ef633f7d1d48f8c2447c7d191f31ec646d641dca..e80a3bc48dfae7fcb22a9f4403a1fd8e
|
|||||||
+ systemProperty("gale.detect.thread.blocks", true) // Gale - base thread pool - watch for blocking base threads
|
+ systemProperty("gale.detect.thread.blocks", true) // Gale - base thread pool - watch for blocking base threads
|
||||||
|
|
||||||
val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2")
|
val memoryGb = providers.gradleProperty("paper.runMemoryGb").getOrElse("2")
|
||||||
val modifiedJvmArgs = jvmArgs ?: arrayListOf()
|
minHeapSize = "${memoryGb}G"
|
||||||
@@ -188,6 +190,7 @@ fun TaskContainer.registerRunTask(
|
@@ -189,6 +191,7 @@ fun TaskContainer.registerRunTask(
|
||||||
modifiedJvmArgs.addAll(listOf("--add-opens=java.base/java.lang=ALL-UNNAMED"))
|
modifiedJvmArgs.addAll(listOf("--add-opens=java.base/java.lang=ALL-UNNAMED"))
|
||||||
// Gale end - enable virtual threads for development runs
|
// Gale end - enable virtual threads for development runs
|
||||||
modifiedJvmArgs.add("--add-modules=jdk.incubator.vector") // Gale - Pufferfish - SIMD support
|
modifiedJvmArgs.add("--add-modules=jdk.incubator.vector") // Gale - Pufferfish - SIMD support
|
||||||
@@ -35,10 +35,10 @@ index ef633f7d1d48f8c2447c7d191f31ec646d641dca..e80a3bc48dfae7fcb22a9f4403a1fd8e
|
|||||||
|
|
||||||
doFirst {
|
doFirst {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index fab5d1c1531fa89113bef6d17df8437b0aec4582..95d8715928a0ddccdabcb76090a3b5bdd143c5a5 100644
|
index 7c38d14671b8a9a671deece654d2f89426b26081..b3ff28d9cac66ae076179b861fd4735e4ecb279b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -4,18 +4,20 @@ import java.io.File;
|
@@ -4,16 +4,21 @@ import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -53,17 +53,18 @@ index fab5d1c1531fa89113bef6d17df8437b0aec4582..95d8715928a0ddccdabcb76090a3b5bd
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import joptsimple.OptionParser;
|
import joptsimple.OptionParser;
|
||||||
import joptsimple.OptionSet;
|
import joptsimple.OptionSet;
|
||||||
|
import joptsimple.util.PathConverter;
|
||||||
+import net.minecraft.server.MinecraftServer;
|
+import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.util.ExceptionCollector;
|
+import net.minecraft.util.ExceptionCollector;
|
||||||
import net.minecraft.world.level.lighting.LayerLightEventListener;
|
+import net.minecraft.world.level.lighting.LayerLightEventListener;
|
||||||
import net.minecrell.terminalconsole.TerminalConsoleAppender; // Paper
|
+import net.minecrell.terminalconsole.TerminalConsoleAppender; // Paper
|
||||||
+import org.galemc.gale.executor.thread.BaseThread;
|
+import org.galemc.gale.executor.thread.BaseThread;
|
||||||
+import org.spigotmc.WatchdogThread;
|
+import org.spigotmc.WatchdogThread;
|
||||||
+import reactor.blockhound.BlockHound;
|
+import reactor.blockhound.BlockHound;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
public static boolean useJline = true;
|
public static boolean useJline = true;
|
||||||
@@ -48,6 +50,49 @@ public class Main {
|
@@ -46,6 +51,49 @@ public class Main {
|
||||||
// Gale end - include time in startup logs
|
// Gale end - include time in startup logs
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|||||||
@@ -69,47 +69,8 @@ index dd9d77d7c7f1a5a130a1f4c15e5b1e68ae3753e1..c3661b25ae8b4dc5e9d7e9bb0e14f6d2
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistry.java b/src/main/java/io/papermc/paper/registry/PaperRegistry.java
|
|
||||||
index 7c265d27da034986be73921d35bf08ae250b42f3..89c4b9e4feb6e7720efbb91cf8ba380a89f34d6e 100644
|
|
||||||
--- a/src/main/java/io/papermc/paper/registry/PaperRegistry.java
|
|
||||||
+++ b/src/main/java/io/papermc/paper/registry/PaperRegistry.java
|
|
||||||
@@ -14,6 +14,7 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
|
|
||||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
|
||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
|
||||||
import org.checkerframework.framework.qual.DefaultQualifier;
|
|
||||||
+import org.galemc.gale.executor.lock.YieldingMemoizedSupplier;
|
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
@@ -29,7 +30,7 @@ import java.util.function.Supplier;
|
|
||||||
public abstract class PaperRegistry<API extends Keyed, MINECRAFT> implements org.bukkit.Registry<API> {
|
|
||||||
|
|
||||||
@SuppressWarnings("FieldMayBeFinal") // non-final for testing
|
|
||||||
- private static Supplier<RegistryAccess> REGISTRY_ACCESS = Suppliers.memoize(() -> MinecraftServer.getServer().registryAccess());
|
|
||||||
+ private static Supplier<RegistryAccess> REGISTRY_ACCESS = new YieldingMemoizedSupplier<>(() -> MinecraftServer.getServer().registryAccess()); // Gale - yielding memoized Supplier
|
|
||||||
private static final Map<RegistryKey<?, ?>, PaperRegistry<?, ?>> INTERNAL_REGISTRIES = new HashMap<>();
|
|
||||||
public static final Map<RegistryKey<?, ?>, PaperRegistry<?, ?>> REGISTRIES = Collections.unmodifiableMap(INTERNAL_REGISTRIES);
|
|
||||||
private static final Map<Class<?>, PaperRegistry<?, ?>> REGISTRY_BY_API_CLASS = new HashMap<>();
|
|
||||||
@@ -43,7 +44,7 @@ public abstract class PaperRegistry<API extends Keyed, MINECRAFT> implements org
|
|
||||||
|
|
||||||
public PaperRegistry(RegistryKey<API, MINECRAFT> registryKey) {
|
|
||||||
this.registryKey = registryKey;
|
|
||||||
- this.registry = Suppliers.memoize(() -> REGISTRY_ACCESS.get().registryOrThrow(this.registryKey.resourceKey()));
|
|
||||||
+ this.registry = new YieldingMemoizedSupplier<>(() -> REGISTRY_ACCESS.get().registryOrThrow(this.registryKey.resourceKey())); // Gale - yielding memoized Supplier
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@@ -138,7 +139,7 @@ public abstract class PaperRegistry<API extends Keyed, MINECRAFT> implements org
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static <T> Supplier<Registry<T>> registryFor(ResourceKey<? extends Registry<T>> registryKey) {
|
|
||||||
- return Suppliers.memoize(() -> REGISTRY_ACCESS.get().registryOrThrow(registryKey));
|
|
||||||
+ return new YieldingMemoizedSupplier<>(() -> REGISTRY_ACCESS.get().registryOrThrow(registryKey)); // Gale - yielding memoized Supplier
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void clearCaches() {
|
|
||||||
diff --git a/src/main/java/net/minecraft/util/ExtraCodecs.java b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
diff --git a/src/main/java/net/minecraft/util/ExtraCodecs.java b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||||
index 7591002e07271389f9ac8decea25747c0cd8a213..506e8b0b06aca455ea608b6cee2292f120ae5e90 100644
|
index 57fae84be749bd4a61a0c700a5cefce7122643e6..c695b59c17f441ab7e2065817c0c5242866c0e55 100644
|
||||||
--- a/src/main/java/net/minecraft/util/ExtraCodecs.java
|
--- a/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||||
+++ b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
+++ b/src/main/java/net/minecraft/util/ExtraCodecs.java
|
||||||
@@ -1,7 +1,6 @@
|
@@ -1,7 +1,6 @@
|
||||||
@@ -120,15 +81,15 @@ index 7591002e07271389f9ac8decea25747c0cd8a213..506e8b0b06aca455ea608b6cee2292f1
|
|||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonParseException;
|
import com.google.gson.JsonParseException;
|
||||||
@@ -47,6 +46,7 @@ import net.minecraft.core.UUIDUtil;
|
@@ -52,6 +51,7 @@ import org.apache.commons.lang3.mutable.MutableObject;
|
||||||
import net.minecraft.network.chat.Component;
|
import org.joml.AxisAngle4f;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import org.joml.Matrix4f;
|
||||||
import org.apache.commons.lang3.mutable.MutableObject;
|
import org.joml.Quaternionf;
|
||||||
+import org.galemc.gale.executor.lock.YieldingMemoizedSupplier;
|
+import org.galemc.gale.executor.lock.YieldingMemoizedSupplier;
|
||||||
import org.joml.Vector3f;
|
import org.joml.Vector3f;
|
||||||
|
|
||||||
public class ExtraCodecs {
|
public class ExtraCodecs {
|
||||||
@@ -459,7 +459,7 @@ public class ExtraCodecs {
|
@@ -542,7 +542,7 @@ public class ExtraCodecs {
|
||||||
|
|
||||||
static record LazyInitializedCodec<A>(Supplier<Codec<A>> delegate) implements Codec<A> {
|
static record LazyInitializedCodec<A>(Supplier<Codec<A>> delegate) implements Codec<A> {
|
||||||
LazyInitializedCodec {
|
LazyInitializedCodec {
|
||||||
@@ -188,7 +149,7 @@ index d6de68b4b0edabf37ba551b91bbe6682895b2a82..b4cf65c1b84a4ebcf4a362ec614f5fd7
|
|||||||
List<? extends Dynamic<?>> list = typed.getOptionalTyped(opticFinder6).map((typedx3) -> {
|
List<? extends Dynamic<?>> list = typed.getOptionalTyped(opticFinder6).map((typedx3) -> {
|
||||||
return typedx3.write().result().map((dynamic3) -> {
|
return typedx3.write().result().map((dynamic3) -> {
|
||||||
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||||
index 95ba37458e8154dbce6a8590508840d694fcbed1..24af3be284d5ed693ec932e53935a777d0a8d266 100644
|
index c84908095a93d42826b21bf5f3490410fb0a5708..6d2ef064400304fb96f9ec5174b926371d01ed7c 100644
|
||||||
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
--- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||||
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
+++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java
|
||||||
@@ -33,6 +33,7 @@ import net.minecraft.world.flag.FeatureFlagSet;
|
@@ -33,6 +33,7 @@ import net.minecraft.world.flag.FeatureFlagSet;
|
||||||
@@ -297,7 +258,7 @@ index 16bd93606ac4a9c34108a92dd4b98cb4600221d9..f4aeb2a4cafe7fe0782660c0e7fd94ae
|
|||||||
});
|
});
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
index 7e9c388179c75a233d9b179ea1e00428ac65ee99..9f0a04b8aad7dc14f87dc48b70968b55d84951b8 100644
|
index 42ecfc1237bfc724dc9134a6a8bae3670251449e..0a1ecc1a88fee4b68a69d95c417a663a320febca 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||||
@@ -76,6 +76,7 @@ import net.minecraft.world.level.levelgen.structure.placement.RandomSpreadStruct
|
@@ -76,6 +76,7 @@ import net.minecraft.world.level.levelgen.structure.placement.RandomSpreadStruct
|
||||||
@@ -318,7 +279,7 @@ index 7e9c388179c75a233d9b179ea1e00428ac65ee99..9f0a04b8aad7dc14f87dc48b70968b55
|
|||||||
return ((BiomeGenerationSettings) generationSettingsGetter.apply(holder)).features();
|
return ((BiomeGenerationSettings) generationSettingsGetter.apply(holder)).features();
|
||||||
}, true);
|
}, true);
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
diff --git a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||||
index 6c93e621d584927076b886c719e93039019e32be..4b8bf8f150030c014ccff1290d0b996441a29adf 100644
|
index 66205f6d99c629ce0e7e7d7b29394674bde115fb..14da533ccca35ba18190424c6d1074ce7e4de574 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
--- a/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
+++ b/src/main/java/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
|
||||||
@@ -49,6 +49,7 @@ import net.minecraft.world.level.levelgen.blending.Blender;
|
@@ -49,6 +49,7 @@ import net.minecraft.world.level.levelgen.blending.Blender;
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
index 4b8da38db72d7ebc2d498ec3d711d3b30911096c..80f9e70d5c4330e079feccc9a4b1b5957c79ef45 100644
|
index 157f74bbbac8cbbed37c4fcc339b3b3c06d06bbe..cd614c55aa3f9a014c2a073abf803888e082c8d4 100644
|
||||||
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
@@ -57,14 +57,7 @@ import java.util.function.Consumer;
|
@@ -58,14 +58,7 @@ import java.util.function.Consumer;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public final class MCUtil {
|
public final class MCUtil {
|
||||||
@@ -27,10 +27,10 @@ index 4b8da38db72d7ebc2d498ec3d711d3b30911096c..80f9e70d5c4330e079feccc9a4b1b595
|
|||||||
1, 1, 0L, TimeUnit.SECONDS,
|
1, 1, 0L, TimeUnit.SECONDS,
|
||||||
new LinkedBlockingQueue<>(),
|
new LinkedBlockingQueue<>(),
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index f423f6322b6cbb7b73074f84debc8333ad4e64b3..77e39c713a4d022f05ac71e27abd9799587356f0 100644
|
index b7e231978f15ebc60fa9a8a4df369f96cfcf3966..560e94eefea7f3c243ccdb26344979c44c270b30 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1081,9 +1081,6 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1084,9 +1084,6 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
||||||
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
|
MinecraftServer.LOGGER.error("Failed to unlock level {}", this.storageSource.getLevelId(), ioexception1);
|
||||||
}
|
}
|
||||||
// Spigot start
|
// Spigot start
|
||||||
@@ -40,7 +40,7 @@ index f423f6322b6cbb7b73074f84debc8333ad4e64b3..77e39c713a4d022f05ac71e27abd9799
|
|||||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||||
this.getProfileCache().save(false); // Paper
|
this.getProfileCache().save(false); // Paper
|
||||||
@@ -1093,6 +1090,12 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1096,6 +1093,12 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
||||||
LOGGER.info("Flushing Chunk IO");
|
LOGGER.info("Flushing Chunk IO");
|
||||||
io.papermc.paper.chunk.system.io.RegionFileIOThread.close(true); // Paper // Paper - rewrite chunk system
|
io.papermc.paper.chunk.system.io.RegionFileIOThread.close(true); // Paper // Paper - rewrite chunk system
|
||||||
LOGGER.info("Closing Thread Pool");
|
LOGGER.info("Closing Thread Pool");
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||||
index 5ef58831a857fd8aa4ac30147762dc17d773a53e..6b109d92dec227d4a91a455caf596beb112a8351 100644
|
index 4c90a6ee734451fe404b2255d21090b669da1aa1..0ddacb31f037feac052c5019f19bea49b43af942 100644
|
||||||
--- a/src/main/java/net/minecraft/Util.java
|
--- a/src/main/java/net/minecraft/Util.java
|
||||||
+++ b/src/main/java/net/minecraft/Util.java
|
+++ b/src/main/java/net/minecraft/Util.java
|
||||||
@@ -26,9 +26,6 @@ import java.net.URL;
|
@@ -26,9 +26,6 @@ import java.net.URL;
|
||||||
@@ -29,12 +29,13 @@ index 5ef58831a857fd8aa4ac30147762dc17d773a53e..6b109d92dec227d4a91a455caf596beb
|
|||||||
import java.util.concurrent.LinkedBlockingQueue;
|
import java.util.concurrent.LinkedBlockingQueue;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
@@ -67,11 +62,11 @@ import java.util.stream.Stream;
|
@@ -67,12 +62,12 @@ import java.util.stream.Stream;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.Bootstrap;
|
import net.minecraft.server.Bootstrap;
|
||||||
-import net.minecraft.util.Mth;
|
-import net.minecraft.util.Mth;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
|
import net.minecraft.util.SingleKeyCache;
|
||||||
import net.minecraft.util.TimeSource;
|
import net.minecraft.util.TimeSource;
|
||||||
import net.minecraft.util.datafix.DataFixers;
|
import net.minecraft.util.datafix.DataFixers;
|
||||||
import net.minecraft.world.level.block.state.properties.Property;
|
import net.minecraft.world.level.block.state.properties.Property;
|
||||||
@@ -42,18 +43,16 @@ index 5ef58831a857fd8aa4ac30147762dc17d773a53e..6b109d92dec227d4a91a455caf596beb
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
public class Util {
|
public class Util {
|
||||||
@@ -79,8 +74,8 @@ public class Util {
|
@@ -80,7 +75,7 @@ public class Util {
|
||||||
private static final int DEFAULT_MAX_THREADS = 255;
|
private static final int DEFAULT_MAX_THREADS = 255;
|
||||||
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
|
private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads";
|
||||||
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1);
|
||||||
- private static final ExecutorService BOOTSTRAP_EXECUTOR = makeExecutor("Bootstrap", -2); // Paper - add -2 priority
|
|
||||||
- private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main", -1); // Paper - add -1 priority
|
- private static final ExecutorService BACKGROUND_EXECUTOR = makeExecutor("Main", -1); // Paper - add -1 priority
|
||||||
+ private static final ExecutorService BACKGROUND_EXECUTOR = BaseTaskQueues.scheduledAsync.yieldingExecutor; // Gale - base thread pool - remove background executor
|
+ private static final ExecutorService BACKGROUND_EXECUTOR = BaseTaskQueues.scheduledAsync.yieldingExecutor; // Gale - base thread pool - remove background executor
|
||||||
+ private static final ExecutorService BOOTSTRAP_EXECUTOR = BACKGROUND_EXECUTOR; // Gale - Patina - remove bootstrap executor
|
|
||||||
// Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
// Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread
|
||||||
public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() {
|
public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() {
|
||||||
|
|
||||||
@@ -219,7 +214,6 @@ public class Util {
|
@@ -215,7 +210,6 @@ public class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void shutdownExecutors() {
|
public static void shutdownExecutors() {
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
index 27b6cf330216bc6e41b67940ed6aa848e0251686..8fd2a0a9f3990742c17d471b143c672163eb76aa 100644
|
index 1268cc3bb5106241df9af63230b6f13a479b43c9..cfa431c16d3e366b9bba3539a95286c7485993e1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||||
@@ -884,8 +884,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@@ -886,8 +886,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
|
|||||||
@@ -7,15 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
index 80f9e70d5c4330e079feccc9a4b1b5957c79ef45..e4955e8d04735b74007aae0bf323028137e34466 100644
|
index cd614c55aa3f9a014c2a073abf803888e082c8d4..2f1a8580a9b2321ec736008ade93d74c13f0392c 100644
|
||||||
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
|
||||||
@@ -2,12 +2,10 @@ package io.papermc.paper.util;
|
@@ -8,7 +8,6 @@ import com.google.gson.JsonArray;
|
||||||
|
|
||||||
import com.destroystokyo.paper.profile.CraftPlayerProfile;
|
|
||||||
import com.destroystokyo.paper.profile.PlayerProfile;
|
|
||||||
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
|
||||||
import com.google.gson.JsonArray;
|
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import com.google.gson.internal.Streams;
|
import com.google.gson.internal.Streams;
|
||||||
import com.google.gson.stream.JsonWriter;
|
import com.google.gson.stream.JsonWriter;
|
||||||
@@ -23,7 +18,7 @@ index 80f9e70d5c4330e079feccc9a4b1b5957c79ef45..e4955e8d04735b74007aae0bf3230281
|
|||||||
import it.unimi.dsi.fastutil.objects.ObjectRBTreeSet;
|
import it.unimi.dsi.fastutil.objects.ObjectRBTreeSet;
|
||||||
import java.lang.ref.Cleaner;
|
import java.lang.ref.Cleaner;
|
||||||
import it.unimi.dsi.fastutil.objects.ReferenceArrayList;
|
import it.unimi.dsi.fastutil.objects.ReferenceArrayList;
|
||||||
@@ -17,16 +15,11 @@ import net.minecraft.server.MinecraftServer;
|
@@ -18,16 +17,11 @@ import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.server.level.ChunkHolder;
|
import net.minecraft.server.level.ChunkHolder;
|
||||||
@@ -40,7 +35,7 @@ index 80f9e70d5c4330e079feccc9a4b1b5957c79ef45..e4955e8d04735b74007aae0bf3230281
|
|||||||
import net.minecraft.world.level.chunk.ChunkStatus;
|
import net.minecraft.world.level.chunk.ChunkStatus;
|
||||||
import org.apache.commons.lang.exception.ExceptionUtils;
|
import org.apache.commons.lang.exception.ExceptionUtils;
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
@@ -34,7 +27,6 @@ import org.bukkit.Location;
|
@@ -35,7 +29,6 @@ import org.bukkit.Location;
|
||||||
import org.bukkit.block.BlockFace;
|
import org.bukkit.block.BlockFace;
|
||||||
import org.bukkit.craftbukkit.CraftWorld;
|
import org.bukkit.craftbukkit.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.util.Waitable;
|
import org.bukkit.craftbukkit.util.Waitable;
|
||||||
@@ -48,7 +43,7 @@ index 80f9e70d5c4330e079feccc9a4b1b5957c79ef45..e4955e8d04735b74007aae0bf3230281
|
|||||||
import org.galemc.gale.executor.queue.BaseTaskQueues;
|
import org.galemc.gale.executor.queue.BaseTaskQueues;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
@@ -43,11 +35,8 @@ import java.io.*;
|
@@ -44,11 +37,8 @@ import java.io.*;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Queue;
|
import java.util.Queue;
|
||||||
@@ -60,7 +55,7 @@ index 80f9e70d5c4330e079feccc9a4b1b5957c79ef45..e4955e8d04735b74007aae0bf3230281
|
|||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
@@ -58,14 +47,7 @@ import java.util.function.Supplier;
|
@@ -59,14 +49,7 @@ import java.util.function.Supplier;
|
||||||
|
|
||||||
public final class MCUtil {
|
public final class MCUtil {
|
||||||
public static final Executor asyncExecutor = BaseTaskQueues.scheduledAsync.yieldingExecutor; // Gale - base thread pool - remove Paper async executor
|
public static final Executor asyncExecutor = BaseTaskQueues.scheduledAsync.yieldingExecutor; // Gale - base thread pool - remove Paper async executor
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ index e77972c4c264100ffdd824bfa2dac58dbbc6d678..b2e4fb69fd6564484e0ebd120ba87431
|
|||||||
final ChunkHolder holder = PlayerChunkLoader.this.chunkMap.getVisibleChunkIfPresent(key);
|
final ChunkHolder holder = PlayerChunkLoader.this.chunkMap.getVisibleChunkIfPresent(key);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c827f11f8 100644
|
index 0a39aaf5bc54e1fb7fb4bada2a15fea9b73af731..d7bab50d51896c6aeb6015d5c2eb130c88338ede 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||||
@@ -1,6 +1,7 @@
|
@@ -1,6 +1,7 @@
|
||||||
@@ -44,7 +44,7 @@ index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c
|
|||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.ImmutableList.Builder;
|
import com.google.common.collect.ImmutableList.Builder;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
@@ -108,6 +109,7 @@ import net.minecraft.world.level.storage.LevelStorageSource;
|
@@ -111,6 +112,7 @@ import net.minecraft.world.level.storage.LevelStorageSource;
|
||||||
import net.minecraft.world.phys.Vec3;
|
import net.minecraft.world.phys.Vec3;
|
||||||
import org.apache.commons.lang3.mutable.MutableBoolean;
|
import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||||
import org.apache.commons.lang3.mutable.MutableObject;
|
import org.apache.commons.lang3.mutable.MutableObject;
|
||||||
@@ -52,7 +52,7 @@ index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
|
import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@@ -131,7 +133,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -134,7 +136,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
// Paper - rewrite chunk system
|
// Paper - rewrite chunk system
|
||||||
public final ServerLevel level;
|
public final ServerLevel level;
|
||||||
private final ThreadedLevelLightEngine lightEngine;
|
private final ThreadedLevelLightEngine lightEngine;
|
||||||
@@ -61,7 +61,7 @@ index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c
|
|||||||
public ChunkGenerator generator;
|
public ChunkGenerator generator;
|
||||||
private final RandomState randomState;
|
private final RandomState randomState;
|
||||||
private final ChunkGeneratorStructureState chunkGeneratorState;
|
private final ChunkGeneratorStructureState chunkGeneratorState;
|
||||||
@@ -175,7 +177,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -178,7 +180,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
|
|
||||||
// these maps are named after spigot's uses
|
// these maps are named after spigot's uses
|
||||||
public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick
|
public final com.destroystokyo.paper.util.misc.PlayerAreaMap playerMobSpawnMap; // this map is absent from updateMaps since it's controlled at the start of the chunkproviderserver tick
|
||||||
@@ -70,7 +70,7 @@ index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c
|
|||||||
// Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
// Paper end - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
// Paper start - use distance map to optimise tracker
|
// Paper start - use distance map to optimise tracker
|
||||||
public static boolean isLegacyTrackingEntity(Entity entity) {
|
public static boolean isLegacyTrackingEntity(Entity entity) {
|
||||||
@@ -290,7 +292,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -293,7 +295,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c
|
|||||||
super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
super(session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
|
||||||
// Paper - rewrite chunk system
|
// Paper - rewrite chunk system
|
||||||
this.tickingGenerated = new AtomicInteger();
|
this.tickingGenerated = new AtomicInteger();
|
||||||
@@ -322,7 +324,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -325,7 +327,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
this.chunkGeneratorState = chunkGenerator.createState(iregistrycustom.lookupOrThrow(Registries.STRUCTURE_SET), this.randomState, j, world.spigotConfig); // Spigot
|
this.chunkGeneratorState = chunkGenerator.createState(iregistrycustom.lookupOrThrow(Registries.STRUCTURE_SET), this.randomState, j, world.spigotConfig); // Spigot
|
||||||
@@ -88,7 +88,7 @@ index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c
|
|||||||
// Paper - rewrite chunk system
|
// Paper - rewrite chunk system
|
||||||
|
|
||||||
Objects.requireNonNull(mainThreadExecutor);
|
Objects.requireNonNull(mainThreadExecutor);
|
||||||
@@ -383,7 +385,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -386,7 +388,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
// Paper end - use distance map to optimise entity tracker
|
// Paper end - use distance map to optimise entity tracker
|
||||||
// Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
// Paper start - optimise ChunkMap#anyPlayerCloseEnoughForSpawning
|
||||||
@@ -97,7 +97,7 @@ index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c
|
|||||||
(ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ,
|
(ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ,
|
||||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> newState) -> {
|
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> newState) -> {
|
||||||
ChunkHolder playerChunk = ChunkMap.this.getUpdatingChunkIfPresent(MCUtil.getCoordinateKey(rangeX, rangeZ));
|
ChunkHolder playerChunk = ChunkMap.this.getUpdatingChunkIfPresent(MCUtil.getCoordinateKey(rangeX, rangeZ));
|
||||||
@@ -397,7 +399,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -400,7 +402,12 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
if (playerChunk != null) {
|
if (playerChunk != null) {
|
||||||
playerChunk.playersInChunkTickRange = newState;
|
playerChunk.playersInChunkTickRange = newState;
|
||||||
}
|
}
|
||||||
@@ -110,7 +110,7 @@ index baa6aaa495c2a9d4d2f6a62527881b9442fcaeea..cb9d6b5b787ee7543d3fbe625ff4418c
|
|||||||
this.playerMobSpawnMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets,
|
this.playerMobSpawnMap = new com.destroystokyo.paper.util.misc.PlayerAreaMap(this.pooledLinkedPlayerHashSets,
|
||||||
(ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ,
|
(ServerPlayer player, int rangeX, int rangeZ, int currPosX, int currPosZ, int prevPosX, int prevPosZ,
|
||||||
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> newState) -> {
|
com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> newState) -> {
|
||||||
@@ -693,7 +700,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
@@ -696,7 +703,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void releaseLightTicket(ChunkPos pos) {
|
protected void releaseLightTicket(ChunkPos pos) {
|
||||||
@@ -267,10 +267,10 @@ index 83a57b9bc59063ed8299f98bc33e14b57f2ea0de..9ee931a6442d3f18a7521704f39297af
|
|||||||
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
// CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
|
||||||
public boolean pollTask() {
|
public boolean pollTask() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index e7747b19685fd943d7fbefbfef656f8bb7c359f1..347e231b38d20e049dbb58bbd48a93baa799790c 100644
|
index 1eb09eb8c5c0f46d87441c5f0aed42d1a0ebbf5a..195544a9f308511b86e20ed16ad73c68e60abfc2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -277,7 +277,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -273,7 +273,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
public final void loadChunksForMoveAsync(AABB axisalignedbb, ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority priority,
|
public final void loadChunksForMoveAsync(AABB axisalignedbb, ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority priority,
|
||||||
java.util.function.Consumer<List<net.minecraft.world.level.chunk.ChunkAccess>> onLoad) {
|
java.util.function.Consumer<List<net.minecraft.world.level.chunk.ChunkAccess>> onLoad) {
|
||||||
if (Thread.currentThread() != this.thread) {
|
if (Thread.currentThread() != this.thread) {
|
||||||
@@ -333,7 +333,7 @@ index 392e7b4a89669f16b32043b65b69e6593d17f10e..c2378d66bbd65f786a942eba74dd374b
|
|||||||
runnable.run();
|
runnable.run();
|
||||||
return null;
|
return null;
|
||||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
index bca581f2a192015f5461e5bf776234687e5ae9fc..b488cad0d22be10bfeff853ee56e09d458ae8343 100644
|
index 8e76062dc8f9411bc2b8b76b14d21ae6aa738a3a..3a31efd270ddd563b8f2aa27e915bc86a5896623 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||||
@@ -203,7 +203,7 @@ public class LevelChunk extends ChunkAccess {
|
@@ -203,7 +203,7 @@ public class LevelChunk extends ChunkAccess {
|
||||||
@@ -355,7 +355,7 @@ index bca581f2a192015f5461e5bf776234687e5ae9fc..b488cad0d22be10bfeff853ee56e09d4
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
index 9d7da4fcf4ab450b6f3d53a07c299884fe29cda0..5c407537b5b0d84031baf34802648eb04791d901 100644
|
index 5d4a68d05739414c7fd798fcfeb7567898bb42c9..0e55e416f3ba35b69ab6a5082aedbff977bd3d62 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||||
@@ -362,7 +362,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@@ -362,7 +362,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||||
|
|||||||
@@ -480,10 +480,10 @@ index f5c15d40094c2ddc6220b0595597d12103fcf425..79ef41d2bb30beee2355d1de3dc99c9e
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 77e39c713a4d022f05ac71e27abd9799587356f0..545f831b34fbaac1b698a90206e35a149f3606d6 100644
|
index 560e94eefea7f3c243ccdb26344979c44c270b30..346e8127aa9ce26bf18935163ba268a74429072f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1070,6 +1070,10 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1073,6 +1073,10 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
|||||||
Gale - https://galemc.org
|
Gale - https://galemc.org
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 545f831b34fbaac1b698a90206e35a149f3606d6..fe702a042cb132987e5135d2ed855484f9cef686 100644
|
index 346e8127aa9ce26bf18935163ba268a74429072f..cc31a64f97edd1c5e7b95703d7c60d80bfd177c8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -155,7 +155,6 @@ import org.galemc.gale.executor.queue.BaseTaskQueues;
|
@@ -156,7 +156,6 @@ import org.galemc.gale.executor.queue.BaseTaskQueues;
|
||||||
import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues;
|
import org.galemc.gale.executor.queue.ScheduledServerThreadTaskQueues;
|
||||||
import org.galemc.gale.executor.thread.BaseThread;
|
import org.galemc.gale.executor.thread.BaseThread;
|
||||||
import org.galemc.gale.executor.thread.OriginalServerThread;
|
import org.galemc.gale.executor.thread.OriginalServerThread;
|
||||||
@@ -18,8 +18,8 @@ index 545f831b34fbaac1b698a90206e35a149f3606d6..fe702a042cb132987e5135d2ed855484
|
|||||||
import org.galemc.gale.executor.thread.pool.BaseThreadActivation;
|
import org.galemc.gale.executor.thread.pool.BaseThreadActivation;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -1577,15 +1576,53 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1585,16 +1584,54 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
||||||
co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTimingFullServerTick(); // Paper // Gale - final timings calls
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Gale start - split tick steps
|
+ // Gale start - split tick steps
|
||||||
@@ -56,6 +56,7 @@ index 545f831b34fbaac1b698a90206e35a149f3606d6..fe702a042cb132987e5135d2ed855484
|
|||||||
MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
MinecraftTimings.bukkitSchedulerTimer.startTiming(); // Spigot // Paper
|
||||||
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
this.server.getScheduler().mainThreadHeartbeat(this.tickCount); // CraftBukkit
|
||||||
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
MinecraftTimings.bukkitSchedulerTimer.stopTiming(); // Spigot // Paper
|
||||||
|
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||||
+ // Gale start - split tick steps
|
+ // Gale start - split tick steps
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
@@ -73,7 +74,7 @@ index 545f831b34fbaac1b698a90206e35a149f3606d6..fe702a042cb132987e5135d2ed855484
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
// Run tasks that are waiting on processing
|
// Run tasks that are waiting on processing
|
||||||
MinecraftTimings.processQueueTimer.startTiming(); // Spigot
|
MinecraftTimings.processQueueTimer.startTiming(); // Spigot
|
||||||
@@ -1593,11 +1630,14 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1602,11 +1639,14 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
||||||
this.processQueue.remove().run();
|
this.processQueue.remove().run();
|
||||||
}
|
}
|
||||||
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
|
MinecraftTimings.processQueueTimer.stopTiming(); // Spigot
|
||||||
@@ -89,7 +90,7 @@ index 545f831b34fbaac1b698a90206e35a149f3606d6..fe702a042cb132987e5135d2ed855484
|
|||||||
final boolean doDaylight = world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT);
|
final boolean doDaylight = world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT);
|
||||||
final long dayTime = world.getDayTime();
|
final long dayTime = world.getDayTime();
|
||||||
long worldTime = world.getGameTime();
|
long worldTime = world.getGameTime();
|
||||||
@@ -1612,15 +1652,23 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1621,15 +1661,23 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
||||||
new ClientboundSetTimePacket(worldTime, playerTime, doDaylight);
|
new ClientboundSetTimePacket(worldTime, playerTime, doDaylight);
|
||||||
entityplayer.connection.send(packet); // Add support for per player time
|
entityplayer.connection.send(packet); // Add support for per player time
|
||||||
}
|
}
|
||||||
@@ -109,13 +110,13 @@ index 545f831b34fbaac1b698a90206e35a149f3606d6..fe702a042cb132987e5135d2ed855484
|
|||||||
+ public final void tickStep_updateEvents(ServerLevel worldserver) {
|
+ public final void tickStep_updateEvents(ServerLevel worldserver) {
|
||||||
+ // Gale end - split tick steps
|
+ // Gale end - split tick steps
|
||||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||||
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
|
||||||
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = worldserver.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper
|
||||||
|
worldserver.hasEntityMoveEvent = io.papermc.paper.event.entity.EntityMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper
|
||||||
+ } // Gale - split tick steps
|
+ } // Gale - split tick steps
|
||||||
|
|
||||||
/* Drop global time updates
|
/* Drop global time updates
|
||||||
if (this.tickCount % 20 == 0) {
|
if (this.tickCount % 20 == 0) {
|
||||||
@@ -1630,16 +1678,28 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1639,16 +1687,28 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
||||||
}
|
}
|
||||||
// CraftBukkit end */
|
// CraftBukkit end */
|
||||||
|
|
||||||
@@ -149,7 +150,7 @@ index 545f831b34fbaac1b698a90206e35a149f3606d6..fe702a042cb132987e5135d2ed855484
|
|||||||
// Spigot Start
|
// Spigot Start
|
||||||
CrashReport crashreport;
|
CrashReport crashreport;
|
||||||
try {
|
try {
|
||||||
@@ -1652,22 +1712,47 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
@@ -1661,22 +1721,47 @@ public abstract class MinecraftServer extends MinecraftServerBlockableEventLoop
|
||||||
|
|
||||||
worldserver.fillReportDetails(crashreport);
|
worldserver.fillReportDetails(crashreport);
|
||||||
throw new ReportedException(crashreport);
|
throw new ReportedException(crashreport);
|
||||||
@@ -307,7 +308,7 @@ index 9ee931a6442d3f18a7521704f39297af0d7af6d7..d4f99270c62cef94cc5ad5fc00f155c4
|
|||||||
|
|
||||||
private void tickChunks() {
|
private void tickChunks() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
index 347e231b38d20e049dbb58bbd48a93baa799790c..da4c83d4bd84ad51c6990b09b265ff3aa53f1860 100644
|
index 195544a9f308511b86e20ed16ad73c68e60abfc2..9d0d450fec629513bf810a2789eafe1883531e0b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||||
@@ -23,7 +23,6 @@ import java.nio.file.Files;
|
@@ -23,7 +23,6 @@ import java.nio.file.Files;
|
||||||
@@ -335,7 +336,7 @@ index 347e231b38d20e049dbb58bbd48a93baa799790c..da4c83d4bd84ad51c6990b09b265ff3a
|
|||||||
import org.bukkit.event.world.TimeSkipEvent;
|
import org.bukkit.event.world.TimeSkipEvent;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
import it.unimi.dsi.fastutil.ints.IntArrayList; // Paper
|
import it.unimi.dsi.fastutil.ints.IntArrayList; // Paper
|
||||||
@@ -633,7 +629,101 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -631,7 +627,101 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
return this.structureManager;
|
return this.structureManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -437,7 +438,7 @@ index 347e231b38d20e049dbb58bbd48a93baa799790c..da4c83d4bd84ad51c6990b09b265ff3a
|
|||||||
// Paper start - optimise checkDespawn
|
// Paper start - optimise checkDespawn
|
||||||
this.playersAffectingSpawning.clear();
|
this.playersAffectingSpawning.clear();
|
||||||
for (ServerPlayer player : this.players) {
|
for (ServerPlayer player : this.players) {
|
||||||
@@ -641,10 +731,35 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -639,10 +729,35 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.playersAffectingSpawning.add(player);
|
this.playersAffectingSpawning.add(player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -475,7 +476,7 @@ index 347e231b38d20e049dbb58bbd48a93baa799790c..da4c83d4bd84ad51c6990b09b265ff3a
|
|||||||
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
|
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
|
||||||
long j;
|
long j;
|
||||||
|
|
||||||
@@ -667,40 +782,155 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -665,40 +780,155 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
this.resetWeatherCycle();
|
this.resetWeatherCycle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -640,7 +641,7 @@ index 347e231b38d20e049dbb58bbd48a93baa799790c..da4c83d4bd84ad51c6990b09b265ff3a
|
|||||||
timings.entityTick.startTiming(); // Spigot
|
timings.entityTick.startTiming(); // Spigot
|
||||||
this.entityTickList.forEach((entity) -> {
|
this.entityTickList.forEach((entity) -> {
|
||||||
if (!entity.isRemoved()) {
|
if (!entity.isRemoved()) {
|
||||||
@@ -738,11 +968,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
@@ -736,11 +966,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
timings.entityTick.stopTiming(); // Spigot
|
timings.entityTick.stopTiming(); // Spigot
|
||||||
|
|||||||
Reference in New Issue
Block a user